From e40b37579d56da4f8e03e8aa7699549cc1443e5b Mon Sep 17 00:00:00 2001 From: Hieromon Ikasamo Date: Fri, 23 Mar 2018 17:42:43 +0900 Subject: [PATCH] Release for the static IP support --- docs/advancedusage/index.html | 40 ++++++++++++- docs/api/index.html | 104 ++++++++++++++++++++++++++++++++++ docs/changelog/index.html | 22 ++++++- mkdocs/advancedusage.md | 25 +++++++- mkdocs/api.md | 44 ++++++++++++++ mkdocs/changelog.md | 4 ++ src/AutoConnect.cpp | 21 ++++++- src/AutoConnect.h | 28 +++++++-- 8 files changed, 275 insertions(+), 13 deletions(-) diff --git a/docs/advancedusage/index.html b/docs/advancedusage/index.html index 8fad89b..fe241d6 100644 --- a/docs/advancedusage/index.html +++ b/docs/advancedusage/index.html @@ -462,6 +462,13 @@ Relocate the AutoConnect home path + + +
  • + + Static IP assignment + +
  • @@ -668,6 +675,13 @@ Relocate the AutoConnect home path + + +
  • + + Static IP assignment + +
  • @@ -701,7 +715,7 @@

    By default, AutoConnect saves the credentials of the established connection in EEPROM. You can disable it with the autoSave parameter specified by AutoConnectConfig.

    AutoConnect       Portal;
     AutoConnectConfig Config;
    -Config.autoSave = AC_SAVECREDENTIAL_NEVER;
    +Config.autoSave = AC_SAVECREDENTIAL_NEVER;f
     Portal.config(Config);
     Portal.begin();
     
    @@ -849,7 +863,7 @@

    Configuration functions

    Configuration for Soft AP

    -

    AutoConnect will activate SoftAP at failed initial WiFi.Begin. It SoftAP settings are stored in AutoConnectConfig as the following parameters. The sketch could be configured SoftAP using these parameters, refer the AutoConnectConfig API for details.

    +

    AutoConnect will activate SoftAP at failed the first WiFi.begin. It SoftAP settings are stored in AutoConnectConfig as the following parameters. The sketch could be configured SoftAP using these parameters, refer the AutoConnectConfig API for details.

    @@ -952,6 +987,20 @@ channel + + +
  • + + dns1 + + +
  • + +
  • + + dns2 + +
  • @@ -987,6 +1036,27 @@ psk +
  • + +
  • + + staip + + +
  • + +
  • + + staGateway + + +
  • + +
  • + + staNetmask + +
  • @@ -1252,6 +1322,18 @@ The default value is 0.

    How do I choose Channel

    Espressif Systems had announced the application note about Wi-Fi channel selection.

    +

    dns1

    +

    Set primary DNS server address when using static IP address. +

    +
    Type
    +
    IPAddress
    +

    +

    dns2

    +

    Set secondary DNS server address when using static IP address. +

    +
    Type
    +
    IPAddress
    +

    gateway

    Sets gateway address for Soft AP in captive portal. When AutoConnect fails the initial WiFi.begin, it starts the captive portal with the IP address specified this.

    @@ -1285,6 +1367,24 @@ The default value is 0.
    Type
    String

    +

    staip

    +

    Set a static IP address. The IP will behave with STA mode. +

    +
    Type
    +
    IPAddress
    +

    +

    staGateway

    +

    Set the gateway address when using static IP address. +

    +
    Type
    +
    IPAddress
    +

    +

    staNetmask

    +

    Set the subnetmask when using static IP address. +

    +
    Type
    +
    IPAddress
    +

    AutoConnectConfig example

    AutoConenct        Portal;
     AutoConenctConfig  Config("", "passpass");    // SoftAp name is determined at runtime
    @@ -1295,6 +1395,10 @@ The default value is 0.
     Config.autoSave = AC_SAVECREDENTIAL_NEVER;    // No save credential
     COnfig.boundaryOffet = 64;                    // Reserve 64 bytes for the user data in EEPROM. 
     Config.homeUri = "/index.html"                // Sets home path of the sketch application
    +Config.staip = IPAddress(192,168,10,10);      // Sets static IP
    +Config.staGateway = IPAddress(192,168,10,1);  // Sets WiFi router address
    +Config.staNetmask = IPAddress(255,255,255,0); // Sets WLAN scope
    +Config.dns1 = IPAddress(192,168,10,1);        // Sets primary DNS address
     Portal.config(Config);                        // Configure AutoConnect
     Portal.begin();                               // Starts and behaves captive portal
     
    diff --git a/docs/changelog/index.html b/docs/changelog/index.html index 169d6de..ee582f8 100644 --- a/docs/changelog/index.html +++ b/docs/changelog/index.html @@ -101,7 +101,7 @@ - + Skip to content @@ -400,6 +400,13 @@