web: Wi-Fi Enterprise settings on the Wi-Fi page (preparation)
- library versions in the sketch headerrelease/1.1.3
parent
147a6a6b68
commit
bccdc62476
|
|
@ -4,16 +4,16 @@
|
|||
It's neccesary install support for ESP32 board to the arduino IDE. In the board manager we need add next link
|
||||
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||
Then we can install "ESP32 by Espressif Systems" board in the board manager.
|
||||
ESP32 lib version: 3.0.2 (ESP-IDF v5.1.4) by Espressif Systems
|
||||
ESP32 lib version: 3.1.3 (ESP-IDF v5.3) by Espressif Systems
|
||||
|
||||
This project uses other libraries. It is necessary to install them in the arduino IDE.
|
||||
- Library - License - Version - Link
|
||||
- ESPAsyncWebServer - LGPL 3.0 - 3.4.5 - https://github.com/mathieucarbou/ESPAsyncWebServer
|
||||
- AsyncTCP - LGPL 3.0 - 3.3.1 - https://github.com/mathieucarbou/AsyncTCP
|
||||
- ArduinoJson - MIT - 7.3.0 - https://github.com/bblanchon/ArduinoJson
|
||||
- ESPAsyncWebServer - LGPL 3.0 - 3.7.2 - https://github.com/mathieucarbou/ESPAsyncWebServer moved to https://github.com/ESP32Async/ESPAsyncWebServer
|
||||
- AsyncTCP - LGPL 3.0 - 3.3.7 - https://github.com/mathieucarbou/AsyncTCP moved to https://github.com/ESP32Async/AsyncTCP
|
||||
- ArduinoJson - MIT - 7.3.1 - https://github.com/bblanchon/ArduinoJson
|
||||
- ArduinoUniqueID - MIT - 1.3.0 - https://github.com/ricaun/ArduinoUniqueID
|
||||
- arduino-esp32 - LGPL 2.1 - 3.1.0 - https://github.com/espressif/arduino-esp32
|
||||
- DHTnew - MIT - 0.5.2 - https://github.com/RobTillaart/DHTNew
|
||||
- arduino-esp32 - LGPL 2.1 - 3.1.3 - https://github.com/espressif/arduino-esp32
|
||||
- DHTnew - MIT - 0.5.3 - https://github.com/RobTillaart/DHTNew
|
||||
|
||||
Arduino IDE configuration for the MCU are stored in the module_XXX.h file.
|
||||
|
||||
|
|
|
|||
|
|
@ -202,6 +202,11 @@ const char page_wifi_html[] PROGMEM = R"rawliteral(
|
|||
<tr><td class="w2" align="right">Default gateway</td><td><input type="text" name="net_gw" id=net_gw_id></td></tr>
|
||||
<tr><td class="w2" align="right">DNS server</td><td><input type="text" name="net_dns" id=net_dns_id></td></tr>
|
||||
<tr><td></td><td align="center"><button class="btn_save_w" onclick="setWifiNet(document.getElementById('net_ip_id').value, document.getElementById('net_mask_id').value, document.getElementById('net_gw_id').value, document.getElementById('net_dns_id').value)">Save</button></td></tr>
|
||||
<tr><td style="height: 10px;"></td></tr>
|
||||
<tr><td class="w2" align="right">Enable WPA2-Enterprise </td><td><label class="switch"><input type="checkbox" name="wpa2_eap_enable" id="wpa2_eapid" onchange="changeValue(this.checked, 'set_bool?wpa2_eap_enable=', 'wifi')"><span class="checkbox_slider round"></span></label></label> <span class="w1" id="status_wpa2_eap"></span></td></tr>
|
||||
<tr><td class="w2" align="right">Username</td><td><input type="text" name="wpa2_eap_user" id=wpa2_eap_user_id></td></tr>
|
||||
<tr><td class="w2" align="right">Password</td><td><input type="text" name="wpa2_eap_pass" id=wpa2_eap_pass_id></td></tr>
|
||||
<tr><td></td><td align="center"><button class="btn_save_w" onclick="setWPA2EAP(document.getElementById('wpa2_eap_user_id').value, document.getElementById('wpa2_eap_pass_id').value)">Save</button></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
|
@ -1165,6 +1170,14 @@ function setWifiNet(val_ip, val_mask, val_gw, val_dns) {
|
|||
get_data("wifi");
|
||||
}
|
||||
|
||||
function setWPA2EAP(val_user, val_pass) {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.open("GET", "wifi_wpa2_eap?user=" + encodeURIComponent(val_user) + "&pass=" + encodeURIComponent(val_pass), false);
|
||||
xmlHttp.send(null);
|
||||
alert(xmlHttp.responseText);
|
||||
get_data("wifi");
|
||||
}
|
||||
|
||||
function scanWifi() {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.open("GET", "wifi_scan?", false);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@
|
|||
<tr><td class="w2" align="right">Default gateway</td><td><input type="text" name="net_gw" id=net_gw_id></td></tr>
|
||||
<tr><td class="w2" align="right">DNS server</td><td><input type="text" name="net_dns" id=net_dns_id></td></tr>
|
||||
<tr><td></td><td align="center"><button class="btn_save_w" onclick="setWifiNet(document.getElementById('net_ip_id').value, document.getElementById('net_mask_id').value, document.getElementById('net_gw_id').value, document.getElementById('net_dns_id').value)">Save</button></td></tr>
|
||||
<tr><td style="height: 10px;"></td></tr>
|
||||
<tr><td class="w2" align="right">Enable WPA2-Enterprise </td><td><label class="switch"><input type="checkbox" name="wpa2_eap_enable" id="wpa2_eapid" onchange="changeValue(this.checked, 'set_bool?wpa2_eap_enable=', 'wifi')"><span class="checkbox_slider round"></span></label></label> <span class="w1" id="status_wpa2_eap"></span></td></tr>
|
||||
<tr><td class="w2" align="right">Username</td><td><input type="text" name="wpa2_eap_user" id=wpa2_eap_user_id></td></tr>
|
||||
<tr><td class="w2" align="right">Password</td><td><input type="text" name="wpa2_eap_pass" id=wpa2_eap_pass_id></td></tr>
|
||||
<tr><td></td><td align="center"><button class="btn_save_w" onclick="setWPA2EAP(document.getElementById('wpa2_eap_user_id').value, document.getElementById('wpa2_eap_pass_id').value)">Save</button></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -255,6 +255,14 @@ function setWifiNet(val_ip, val_mask, val_gw, val_dns) {
|
|||
get_data("wifi");
|
||||
}
|
||||
|
||||
function setWPA2EAP(val_user, val_pass) {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.open("GET", "wifi_wpa2_eap?user=" + encodeURIComponent(val_user) + "&pass=" + encodeURIComponent(val_pass), false);
|
||||
xmlHttp.send(null);
|
||||
alert(xmlHttp.responseText);
|
||||
get_data("wifi");
|
||||
}
|
||||
|
||||
function scanWifi() {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.open("GET", "wifi_scan?", false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue