Supports ESP32

pull/11/head
Hieromon Ikasamo 6 years ago
parent 679f1798d7
commit cbdfe4a557
  1. 4
      mkdocs.yml
  2. 2
      mkdocs/advancedusage.md
  3. 10
      mkdocs/gettingstarted.md
  4. 6
      mkdocs/index.md
  5. 14
      mkdocs/menu.md

@ -1,6 +1,6 @@
# Project information # Project information
site_name: 'AutoConnect for ESP8266' site_name: 'AutoConnect for ESP8266/ESP32'
site_description: 'ESP8266 WLAN configuration at run time with web interface' site_description: 'ESP8266/ESP32 WLAN configuration at run time with web interface'
site_author: 'Hieromon Ikasamo' site_author: 'Hieromon Ikasamo'
site_url: 'https://Hieromon.github.io/AutoConnect/' site_url: 'https://Hieromon.github.io/AutoConnect/'

@ -6,7 +6,7 @@ Registering the "not found" handler is a different way than ESP8266WebServer. Th
### <i class="fa fa-caret-right"></i> Automatic reconnect ### <i class="fa fa-caret-right"></i> Automatic reconnect
When the captive portal is started, SoftAP starts and the STA is disconnected. The current SSID setting memorized in ESP8266 will be lost. When the captive portal is started, SoftAP starts and the STA is disconnected. The current SSID setting memorized in ESP8266/ESP32 will be lost.
If the [**autoReconnect**](api.md#autoreconnect) option of the [**AutoConnectConfig**](api.md#autoconnectconfig-api) class is enabled, it automatically attempts to reconnect to the disconnected past access point. When the autoReconnect option is specified, AutoConnect will not start SoftAP immediately if the first WiFi.begin fails. It will scan WiFi signal and the same connection information as the detected BSSID is stored in EEPROM as AutoConnect's credentials, explicitly apply it with WiFi.begin and rerun. If the [**autoReconnect**](api.md#autoreconnect) option of the [**AutoConnectConfig**](api.md#autoconnectconfig-api) class is enabled, it automatically attempts to reconnect to the disconnected past access point. When the autoReconnect option is specified, AutoConnect will not start SoftAP immediately if the first WiFi.begin fails. It will scan WiFi signal and the same connection information as the detected BSSID is stored in EEPROM as AutoConnect's credentials, explicitly apply it with WiFi.begin and rerun.
```arduino hl_lines="3" ```arduino hl_lines="3"

@ -3,11 +3,11 @@
Open the Arduino IDE, write the following sketch and upload it. The feature of this sketch is that the SSID and Password are not coded. Open the Arduino IDE, write the following sketch and upload it. The feature of this sketch is that the SSID and Password are not coded.
```arduino ```arduino
#include <ESP8266WiFi.h> #include <ESP8266WiFi.h> // Replace with WiFi.h for ESP32
#include <ESP8266WebServer.h> #include <ESP8266WebServer.h> // Replace with WebServer.h for ESP32
#include <AutoConnect.h> #include <AutoConnect.h>
ESP8266WebServer Server; ESP8266WebServer Server; // Replace with WebServer for ESP32
AutoConnect Portal(Server); AutoConnect Portal(Server);
void rootPage() { void rootPage() {
@ -33,7 +33,9 @@ void loop() {
### <i class="fa fa-play-circle"></i> Run at first ### <i class="fa fa-play-circle"></i> Run at first
After about 30 seconds, if the ESP8266 cannot connect to nearby Wi-Fi spot, you pull out your smartphone and open *Wi-Fi settings* from the *Settings* Apps. You can see the **esp8266ap** in the list of *"CHOOSE A NETWORK..."*. Then tap the esp8266ap and enter password **12345678**, a something screen pops up automatically as shown below. After about 30 seconds, if the ESP8266 cannot connect to nearby Wi-Fi spot, you pull out your smartphone and open *Wi-Fi settings* from the *Settings* Apps. You can see the **esp8266ap** [^1] in the list of *"CHOOSE A NETWORK..."*. Then tap the esp8266ap and enter password **12345678**, a something screen pops up automatically as shown below.
[^1]:When applied to ESP32, **esp32ap**
<span style="display:inline-block;width:282px;height:501px;border:1px solid lightgrey;"><img data-gifffer="../images/login_ani.gif" data-gifffer-width="280" style="width:280px;" /></span><img src="../images/arrow_right.svg" style="vertical-align:top;padding-top:120px;width:48px;margin-left:30px;margin-right:30px;" /><img src="../images/stat.png" style="border:1px solid lightgrey;width:280px;" /></span> <span style="display:inline-block;width:282px;height:501px;border:1px solid lightgrey;"><img data-gifffer="../images/login_ani.gif" data-gifffer-width="280" style="width:280px;" /></span><img src="../images/arrow_right.svg" style="vertical-align:top;padding-top:120px;width:48px;margin-left:30px;margin-right:30px;" /><img src="../images/stat.png" style="border:1px solid lightgrey;width:280px;" /></span>

@ -79,10 +79,6 @@ To install the PageBuilder library into your Arduino IDE, you can use the *Libra
<img src="./images/lm.png" width="640"/> <img src="./images/lm.png" width="640"/>
!!! warning "Library Manager of Arduino IDE"
The version of PageBuilder may not have been updated yet. If the library manager shows only version 0.93.0, please install the latest PageBuilder version than 1.0.0 from the Github repository. [The PageBuilder release](https://github.com/Hieromon/PageBuilder/releases/latest) of the Github repository is the latest version. The [PlatformIO library](https://platformio.org/lib/show/2010/PageBuilder) has the latest version of 1.0.0.
In 0.93.0, the PageBuilder class has a compile error about without the 'cancel' method.
### Install the AutoConnect ### Install the AutoConnect
Clone or download from the [AutoConnect GitHub repository](https://github.com/Hieromon/AutoConnect). Clone or download from the [AutoConnect GitHub repository](https://github.com/Hieromon/AutoConnect).
@ -94,7 +90,7 @@ When you select Download, you can import it to Arduino IDE immediately. After do
<img src="./images/ins_lib.png" /> <img src="./images/ins_lib.png" />
!!! info "Supported by Library manager." !!! info "Supported by Library manager."
AutoConnect was added to the Arduino IDE library manager as of March 17, 2018. It can be used with the PlatformIO library also. AutoConnect was added to the Arduino IDE library manager. It can be used with the PlatformIO library also.
<script> <script>
window.onload = function() { window.onload = function() {

@ -3,7 +3,7 @@
## <i class="fa fa-external-link"></i> Where the from ## <i class="fa fa-external-link"></i> Where the from
The AutoConnect menu appears when you access the **AutoConnect root path**. It is assigned "**/_ac**" located on ESP8266 *local IP address* 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 <i class="fa fa-bars"></i> at right on top. (e.g. `http://192.168.244.1/_ac` for SoftAP mode.) The AutoConnect menu appears when you access the **AutoConnect root path**. It is assigned "**/_ac**" located on ESP8266/ESP32 *local IP address* 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 <i class="fa fa-bars"></i> at right on top. (e.g. `http://192.168.244.1/_ac` for SoftAP mode.)
<img src="../images/ac.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" /> <img src="../images/ac.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" />
@ -17,7 +17,7 @@ Currently, AutoConnect supports four menus. Undermost menu as "HOME" returns to
- **Configure new AP**: Configure SSID and Password for new access point. - **Configure new AP**: Configure SSID and Password for new access point.
- **Open SSIDs**: Opens the past SSID which has been established connection from EEPROM. - **Open SSIDs**: Opens the past SSID which has been established connection from EEPROM.
- **Disconnect**: Disconnects current connection. - **Disconnect**: Disconnects current connection.
- **Reset...**: Rest the ESP8266 module. - **Reset...**: Rest the ESP8266/ESP32 module.
- **HOME**: Return to user home page. - **HOME**: Return to user home page.
<img src="../images/menu.png" style="width:280px;" /> <img src="../images/menu.png" style="width:280px;" />
@ -31,21 +31,21 @@ Enter SSID and Passphrase and tap "**apply**" to starts a connection.
## <i class="fa fa-bars"></i> Open SSIDs ## <i class="fa fa-bars"></i> Open SSIDs
Once it was established connection, its SSID and Password will be stored to the EEPROM of ESP8266 automatically. The **Open SSIDs** menu reads the saved SSID credentials from the EEPROM. The stored credential data are listed by the SSID as shown below. Its label is a clickable button. Tap the SSID button, starts connection it. Once it was established connection, its SSID and Password will be stored to the EEPROM of ESP8266/ESP32 automatically. The **Open SSIDs** menu reads the saved SSID credentials from the EEPROM. The stored credential data are listed by the SSID as shown below. Its label is a clickable button. Tap the SSID button, starts connection it.
<img src="../images/open.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" /> <img src="../images/open.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" />
## <i class="fa fa-bars"></i> Disconnect ## <i class="fa fa-bars"></i> Disconnect
Disconnect ESP8266 from the current connection. It can also reset the ESP8266 automatically after disconnection by instructing with using [API](api.md#autoreset) in the sketch. Disconnect ESP8266/ESP32 from the current connection. It can also reset the ESP8266/ESP32 automatically after disconnection by instructing with using [API](api.md#autoreset) 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. 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.
## <i class="fa fa-bars"></i> Reset... ## <i class="fa fa-bars"></i> Reset...
Reset the ESP8266, it will start rebooting. After rebooting complete, the ESP8266 begins establishing the previous connection with WIFI_STA mode, and *esp8266ap* of an access point will disappear from WLAN. Reset the ESP8266/ESP32, 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.
<img src="../images/resetting.png" style="width:280px;" /> <img src="../images/resetting.png" style="width:280px;" />
!!! warning "Not every module will be rebooted normally" !!! warning "Not every ESP8266 module will be rebooted normally"
The Reset menu is using the **ESP.reset()** function. This is an almost hardware reset. In order to resume the sketch normally, the [state of GPIO0](https://github.com/esp8266/esp8266-wiki/wiki/Boot-Process#esp-boot-modes) is important. Since this depends on the circuit implementation for each module, not every module will be rebooted normally. See also [FAQ](faq.md#hang-up-after-reset). 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](https://github.com/esp8266/esp8266-wiki/wiki/Boot-Process#esp-boot-modes) is important. Since this depends on the circuit implementation for each module, not every module will be rebooted normally. See also [FAQ](faq.md#hang-up-after-reset).
Loading…
Cancel
Save