Jelajahi Sumber

Enable SoftAP

jomjol 3 tahun lalu
induk
melakukan
516ebeb0b7
2 mengubah file dengan 9 tambahan dan 0 penghapusan
  1. 1 0
      code/include/defines.h
  2. 8 0
      sd-card/html/wlan_config.html

+ 1 - 0
code/include/defines.h

@@ -257,6 +257,7 @@
 #endif //USE_PWM_LEDFLASH
 
 //softAP
+#define ENABLE_SOFTAP
 #ifdef ENABLE_SOFTAP
     #define EXAMPLE_ESP_WIFI_SSID      "AI-on-the-Edge"
     #define EXAMPLE_ESP_WIFI_PASS      ""

+ 8 - 0
sd-card/html/wlan_config.html

@@ -17,6 +17,14 @@
         api = "/config?"+"ssid"+document.getElementById("ssid").value+"&pwd="+document.getElementById("password").value;+"&hn="+document.getElementById("hostname").value;+"&ip="+document.getElementById("ip").value;+"&gw="+document.getElementById("gateway").value;+"&nm="+document.getElementById("netmask").value;+"&dns="+document.getElementById("dns").value;+"&rssi="+document.getElementById("threashold").value;
         fetch(api);}
 
+
+//    var xhttp = new XMLHttpRequest();
+//    xhttp.onreadystatechange = function() {if (xhttp.readyState == 4) {if (xhttp.status == 200) {document.reload();}}};
+if (!file.name.includes("remote-setup")){if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure that you have downloaded the correct file?"))return;}
+
+if (!file.name.includes("remote-setup")){if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure that you have downloaded the correct file?"))return;}
+
+
     function upload() {
         var xhttp = new XMLHttpRequest();
         xhttp.onreadystatechange = function() {