Edit: A simpler and more powerful tool is available: https://www.b4x.com/android/forum/threads/esp-configurator-based-on-b4rserializator.81452/
The attached project allows the user to configure the ESP8266 WiFi settings (SSID and password).
When the program starts it does several things:
1. Creates an access point named 'esp'.
2. Creates a WiFiServerSocket that listens on port 80.
3. Tries to connect to a network based on the last settings stored in the EEPROM (if such are available).
The ip address of the device in the esp network is known. It is 192.168.4.1.
This means that we can connect to the esp network and then access the board with this ip address from any browser.
The server accepts two requests:
http://192.168.4.1 - Shows the current status
http://192.168.4.1/set/<ssid>/<password> - Sets the new ssid and password. Note that the password is optional.
Examples:
http://192.168.4.1/set/dlink
http://192.168.4.1/set/iPhone (2)/12345678
The SSID and password are stored in the EEPROM so the values are kept after a restart.
Note that the #StackBufferSize attribute is set to 600 as the string related methods require a larger stack buffer.
The attached project allows the user to configure the ESP8266 WiFi settings (SSID and password).
When the program starts it does several things:
1. Creates an access point named 'esp'.
2. Creates a WiFiServerSocket that listens on port 80.
3. Tries to connect to a network based on the last settings stored in the EEPROM (if such are available).
The ip address of the device in the esp network is known. It is 192.168.4.1.
This means that we can connect to the esp network and then access the board with this ip address from any browser.
The server accepts two requests:
http://192.168.4.1 - Shows the current status
http://192.168.4.1/set/<ssid>/<password> - Sets the new ssid and password. Note that the password is optional.
Examples:
http://192.168.4.1/set/dlink
http://192.168.4.1/set/iPhone (2)/12345678
The SSID and password are stored in the EEPROM so the values are kept after a restart.
Note that the #StackBufferSize attribute is set to 600 as the string related methods require a larger stack buffer.
Attachments
Last edited: