From 690f2f11d52c7ef2348f2248a52dd79d38681e0f Mon Sep 17 00:00:00 2001
From: Hieromon Ikasamo If your sketch handles web pages, you can embed the pages into the AutoConnect menu in continuance enjoying the utility of the WiFi connection feature. Unlike the custom Web pages by AutoConnectElements, this allows to legacy web pages registered by ESP8266WebServer::on or WebServer::on function. You can use AutoConnectAux only constructed with the URI of the page to be embedding. AutoConnectElements is not required. The basic procedure for this as follows: To implement embedding your legacy web pages to the AutoConnect menu, you can use AutoConnectAux only constructed with the URI of the page to be embedding. AutoConnectElements is not required. The basic procedure for this as follows: Casts the HTML pages to be add-on into the menu¶
+
+
Change log
- [1.0.3] Sept. 30, 2019¶
+ [1.1.0] Oct. 15, 2019¶
+
+
+[1.0.3] Sept. 30, 2019¶
diff --git a/docs/credit.html b/docs/credit.html
index bfbccc5..eb5a400 100644
--- a/docs/credit.html
+++ b/docs/credit.html
@@ -772,8 +772,8 @@
int8_t load(const char* ssid, struct station_config* config) +int8_t load(const char* ssid, station_config_t* config)Load a credential entry and store to config.
bool load(int8_t entry, struct station_config* config) +bool load(int8_t entry, station_config_t* config)Load a credential entry and store to config.
bool save(const struct station_config* config) +bool save(const station_config_t* config)Save a credential entry.
void deleteAllCredentials(void) { AutoConnectCredential credential; - struct station_config config; + station_config_t config; uint8_t ent = credential.entries(); while (ent--) { @@ -1139,27 +1139,36 @@ The following function is an implementation example, and you can use it to achie
A structure is included in the ESP8266 SDK. You can use it in the sketch like as follows:
-extern "C" { -#include <user_interface.h> -} -
struct station_config { - uint8 ssid[32]; - uint8 password[64]; - uint8 bssid_set; - uint8 bssid[6]; -}; +station_config_t¶
+The saved credential structure is defined as stato_config_t in the AcutoConnectCredential header file.
++typedef struct { + uint8_t ssid[32]; + uint8_t password[64]; + uint8_t bssid[6]; + uint8_t dhcp; /**< 0:DHCP, 1:Static IP */ + union _config { + uint32_t addr[5]; + struct _sta { + uint32_t ip; + uint32_t gateway; + uint32_t netmask; + uint32_t dns1; + uint32_t dns2; + } sta; + } config; +} station_config_t;+The byte size of station_config_t in program memory and stored credentials is different
+There is a gap byte for boundary alignment between the
+dhcp
member and the static IP members of the above station_config_t. Its gap byte will be removed with saved credentials on the flash.The credential entry¶
A data structure of the credential saving area in EEPROM as the below. 4
Byte offset | +byte offset | Length | Value | |||
---|---|---|---|---|---|---|
variable | +1 | +Flag for DHCP or Static IP (0:DHCP, 1:Static IP) | +||||
The following IP address entries are stored only for static IPs. | +- | Contained the next entries. (Continuation SSID+Password+BSSID) | +||||
variable(1) | +4 | +Station IP address (uint32_t) | +||||
variable(5) | +4 | +Gateway address (uint32_t) | +||||
variable(9) | +4 | +Netmask (uint32_t) | +||||
variable(13) | +4 | +Primary DNS address (uint32_t) | +||||
variable(17) | +4 | +Secondary IP address (uint32_t) | +||||
variable | +variable | +Contained the next entries. (Continuation SSID+Password+BSSID+DHCP flag+Static IPs(if exists)) | ||||
variable | @@ -1207,6 +1251,12 @@ The following function is an implementation example, and you can use it to achie
AutoConnectCredential has changed
+It was lost AutoConnectCredential backward compatibility. Credentials saved by AutoConnect v1.0.3 (or earlier) will not work properly with AutoConnect v1.1.0. You need to erase the flash of the ESP module using the esptool before the sketch uploading. +
esptool -c esp8266 (or esp32) - p [COM_PORT] erase_flash +
Because AutoConnect does not send a login success response to the captive portal requests from the smartphone. The login success response varies iOS, Android and Windows. By analyzing the request URL of different login success inquiries for each OS, the correct behavior can be implemented, but not yet. Please resets ESP8266 from the AutoConnect menu.
If the sketch is correct, a JSON syntax error may have occurred. In this case, activate the AC_DEBUG and rerun. If you take the message of JSON syntax error, the Json Assistant helps syntax checking. This online tool is provided by the author of ArduinoJson and is most consistent for the AutoConnect.
+A structure of AutoConnect saved credentials has changed two times throughout enhancement with v1.0.3 and v1.1.0. In particular, due to enhancements in v1.1.0, AutoConnectCredential data structure has lost the backward compatibility with previous versions. You must erase the flash of the ESP module using the esptool completely to save the credentials correctly with v1.1.0. +
esptool -c esp8266 (or esp32) -p [COM_PORT] erase_flash +
It may be two possibilities as follows:
+If this issue produces with your sketch, Reloading the page may recover.
+Also, you can check the memory running out status by rebuilding the sketch with PageBuilder's debug log option turned on.
If the heap memory is insufficient, the following message is displayed on the serial console.
+[PB] Failed building, free heap:<Size of free heap> +
Is there the AutoConnectElements element named SUBMIT in the custom Web page? (case sensitive ignored) AutoConnect does not rely on the input type=submit
element for the form submission and uses HTML form element submit function instead. So, the submit function will fail if there is an element named 'submit' in the form. You can not use SUBMIT as the element name of AutoConnectElements in a custom Web page that declares the AutoConnectSubmit element.
Here, tap "Configure new AP" to connect the new access point then the SSID configuration screen would be shown. Enter the SSID and Passphrase and tap apply to start connecting the access point.
+Can be configured with static IP
+Since v1.1.0, Configure new AP menu can configure for WIFI_STA with static IP.
+After connection established, the current status screen will appear. It is already connected to WLAN with WiFi mode as WIFI_AP_STA and the IP connection status is displayed there including the SSID. Then at this screen, you have two options for the next step.
For one, continues execution of the sketch while keeping this connection. You can access ESP8266 via browser through the established IP address after cancel to "Log in" by upper right on the screen.
diff --git a/docs/images/newap.png b/docs/images/newap.png
index ebcb920e09fc47766a17dc8f406db61487e407ce..b89b3b432f939779ec43b99b112d6cf0556a1b5a 100644
GIT binary patch
literal 76246
zcmce7bx<7byX6E3F2NlF1PSi$9^4_gySqbhmk=zty9IZ5Pq5(b4DPng_xoWI4Xk)5!YBX-XhUfU
zQPAt#zwGv+1YiZuUh=CG2!w$C_WvE|XF3iD^bzz$R7k~r@p#2eTXlyR=4_Hs`zAAh
zDr^&?KN@m*Q&;xS%nU8v=x^3PSILQ~7P~{NqrV9XxSY0EwccSKZ%!Z>W$
z)5AtY+)ZhIba1te=%$r~!-==uL~u6gHL2J