You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
AutoConnect/mkdocs/menu.md

6.3 KiB

!!! info "Luxbar" The AutoConnect menu is developed using the LuxBar which is licensed under the MIT License. See the License.

The AutoConnect menu appears when you access the AutoConnect root path. It is assigned "/_ac" located on the local IP address of ESP8266/ESP32 module by default. This location can be changed in the sketch. The following screen will appear at access to http://{localIP}/_ac as the root path. This is the statistics of the current WiFi connection. You can access the menu from the here, to invoke it tap at right on top. (e.g. http://172.217.28.1/_ac for SoftAP mode.)

!!! note "What's the local IP?" A local IP means Local IP at connection established or SoftAP's IP.

Right on top

Currently, AutoConnect supports four menus. Undermost menu as "HOME" returns to the home path of its sketch.

  • Configure new AP: Configure SSID and Password for new access point.
  • Open SSIDs: Opens the past SSID which has been established connection from the flash.
  • Disconnect: Disconnects current connection.
  • Reset...: Rest the ESP8266/ESP32 module.
  • HOME: Return to user home page.

Configure new AP

Scan all available access point in the vicinity and display it. Strength and security of the detected AP are marked. The is indicated for the SSID that needs a security key. "Hidden:" means the number of hidden SSIDs discovered.
Enter SSID and Passphrase and tap "Apply" to starts WiFi connection.

If you want to configure with static IP, uncheck "Enable DHCP". Once the WiFi connection is established, the entered static IP1 configuration is saved in the credentials and restored to the station configuration via the Open SSIDs menu.

Open SSIDs

Once it was established WiFi connection, its SSID and password will be saved in the flash of ESP8266/ESP32 automatically. The Open SSIDs menu reads the saved SSID credentials from the flash. The stored credential data are listed by the SSID as shown below. Its label is a clickable button. Tap the SSID button, starts WiFi connection it.

!!! note "Saved credentials data structure has changed" A structure of AutoConnect saved credentials have changed in v1.1.0 and was lost backward compatibility. Credentials saved by AutoConnect v1.0.3 (or earlier) will not display 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

Disconnect

Disconnect ESP8266/ESP32 from the current connection. It can also reset the ESP8266/ESP32 automatically after disconnection by instructing with using API in the sketch.

After tapping "Disconnect", you will not be able to reach the AutoConnect menu. Once disconnected, you will need to set the SSID again for connecting the WLAN.

Reset...

Reset the ESP8266/ESP32 module, it will start rebooting. After rebooting complete, the ESP8266/ESP32 module begins establishing the previous connection with WIFI_STA mode, and esp8266ap or esp32ap of an access point will disappear from WLAN.

!!! warning "Not every ESP8266 module will be rebooted normally" The Reset menu is using the ESP.reset() function for ESP8266. This is an almost hardware reset. In order to resume the sketch normally, the state of GPIO0 is important. Since this depends on the circuit implementation for each module, not every module will be rebooted normally. See also FAQ.

Custom menu items

The menu items of the custom Web page line up at the below in the AutoConnect menu if the custom Web pages are joined. Details for Custom Web pages in AutoConnect menu.

HOME

A HOME item located at the bottom of the menu list is a link to the home path. The URI as the home path is / by default, and it is defined by AUTOCONNECT_HOMEURI with AutoConnectDefs.h file.

#define AUTOCONNECT_HOMEURI     "/"

You can change the HOME path using the AutoConnect API. The AutoConnect::home function sets the URI as a link of the HOME item of the AutoConnect menu.

by attaching AutoConnect menu

The AutoConnect menu can contain HTML pages of your owns sketch as custom items. It works for HTML pages implemented by ESP8266WebServer::on handler or WebServer::on handler for ESP32. That is, you can make it as menu items to invoke the legacy web page. The below screenshot is the result of adding an example sketch for the ESP8266WebServer library known as FSBrowser to the AutoConnect menu item. It adds Edit and List items with little modification to the legacy sketch code.

You can extend the AutoConnect menu to improve the original sketches and according to the procedure described in section Advanced Usage.


  1. AutoConnect will not check the syntax and validity of the entered IP address. If the entered static IPs are incorrect, it cannot connect to the access point.