Supports AutoConnect::title function

pull/41/head
Hieromon Ikasamo 6 years ago
parent b52cb26324
commit 135e8a64b8
  1. 18
      docs/404.html
  2. 18
      docs/acelements.html
  3. 18
      docs/achandling.html
  4. 22
      docs/acintro.html
  5. 18
      docs/acjson.html
  6. 115
      docs/advancedusage.html
  7. 18
      docs/api.html
  8. 18
      docs/apiaux.html
  9. 41
      docs/apiconfig.html
  10. 18
      docs/apielements.html
  11. 18
      docs/apiextra.html
  12. 4
      docs/assets/javascripts/application.a353778b.js
  13. 0
      docs/assets/javascripts/modernizr.962652e9.js
  14. 18
      docs/basicusage.html
  15. 18
      docs/changelog.html
  16. 18
      docs/examples.html
  17. 18
      docs/faq.html
  18. 18
      docs/gettingstarted.html
  19. BIN
      docs/images/fsbmenu.png
  20. BIN
      docs/images/fsbmenu_expand.png
  21. 18
      docs/index.html
  22. 18
      docs/license.html
  23. 18
      docs/menu.html
  24. 2
      docs/search/search_index.json
  25. BIN
      docs/sitemap.xml.gz
  26. 6
      examples/FSBrowser/FSBrowser.ino
  27. 1
      examples/FSBrowser/data/index.htm
  28. 4
      mkdocs/acintro.md
  29. 77
      mkdocs/advancedusage.md
  30. 11
      mkdocs/apiconfig.md
  31. BIN
      mkdocs/images/fsbmenu.png
  32. BIN
      mkdocs/images/fsbmenu_expand.png
  33. 38
      src/AutoConnect.cpp
  34. 36
      src/AutoConnect.h
  35. 2
      src/AutoConnectCredential.cpp
  36. 4
      src/AutoConnectCredential.h
  37. 2
      src/AutoConnectDefs.h
  38. 5
      src/AutoConnectPage.cpp

@ -36,7 +36,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="/AutoConnect/assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -55,7 +55,7 @@
<script src="/AutoConnect/assets/javascripts/modernizr.8c900955.js"></script>
<script src="/AutoConnect/assets/javascripts/modernizr.962652e9.js"></script>
@ -72,6 +72,12 @@
<link rel="stylesheet" href="/AutoConnect/css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -624,18 +630,12 @@
</div>
<script src="/AutoConnect/assets/javascripts/application.b41f3d20.js"></script>
<script src="/AutoConnect/assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"/AutoConnect/"}})</script>
<script src="/AutoConnect/js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1762,18 +1768,12 @@ equals by using <em>ACText</em> macro.<br>
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1443,18 +1449,12 @@ ESP8266WebServer class will parse the query string and rebuilds its arguments wh
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -768,8 +774,8 @@ In the sketch below, it shows the sequence of codes to integrate three custom We
<li>Create or define <a href="acelements.html">AutoConnectElement(s)</a>.</li>
<li>Add <a href="acelements.html">AutoConnectElement(s)</a> to AutoConnectAux.</li>
<li>Create more AutoConnectAux containing <a href="acelements.html">AutoConnectElement(s)</a>, if necessary.</li>
<li>Register the request handlers for the custom Web pages</li>
<li>Join prepared AutoConnectAux(s) to <a href="api.html#join">AutoConnect</a>.</li>
<li>Register the request handlers for the custom Web pages.</li>
<li><a href="api.html#join">Join</a> prepared AutoConnectAux(s) to AutoConnect.</li>
<li>Invoke <a href="api.html#begin">AutoConnect::begin()</a>.</li>
</ol>
<h2 id="write-the-custom-web-page-with-json">Write the custom Web page with JSON<a class="headerlink" href="#write-the-custom-web-page-with-json" title="Permanent link">&para;</a></h2>
@ -982,18 +988,12 @@ The following JSON code and sketch will execute the custom Web page as the examp
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1405,18 +1411,12 @@ An example of using each function is as follows.
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -425,6 +431,20 @@
Captive portal timeout control
</a>
</li>
<li class="md-nav__item">
<a href="#cast-items-of-your-sketch-own-into-the-autoccnnect-menu" title=" Cast items of your sketch own into the AutocCnnect menu" class="md-nav__link">
Cast items of your sketch own into the AutocCnnect menu
</a>
</li>
<li class="md-nav__item">
<a href="#change-menu-title" title=" Change menu title" class="md-nav__link">
Change menu title
</a>
</li>
<li class="md-nav__item">
@ -817,6 +837,20 @@
Captive portal timeout control
</a>
</li>
<li class="md-nav__item">
<a href="#cast-items-of-your-sketch-own-into-the-autoccnnect-menu" title=" Cast items of your sketch own into the AutocCnnect menu" class="md-nav__link">
Cast items of your sketch own into the AutocCnnect menu
</a>
</li>
<li class="md-nav__item">
<a href="#change-menu-title" title=" Change menu title" class="md-nav__link">
Change menu title
</a>
</li>
<li class="md-nav__item">
@ -984,7 +1018,7 @@
<div class="admonition note">
<p class="admonition-title">In ESP32, the credentials for AutoConnect are not in NVS</p>
<p>The credentials used by AutoConnect are not saved in NVS on ESP32 module. ESP-IDF saves the WiFi connection configuration to NVS, but AutoConnect stores it on the eeprom partition. You can find the partition table for default as <a href="https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv">default.csv</a></p>
<p>The credentials used by AutoConnect are not saved in NVS on ESP32 module. ESP-IDF saves the WiFi connection configuration to NVS, but AutoConnect stores it on the EEPROM partition. You can find the partition table for default as <a href="https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv">default.csv</a></p>
</div>
<h3 id="captive-portal-start-detection"><i class="fa fa-caret-right"></i> Captive portal start detection<a class="headerlink" href="#captive-portal-start-detection" title="Permanent link">&para;</a></h3>
<p>The captive portal will only be activated if the first <em>WiFi::begin</em> fails. Sketch can detect with the <a href="api.html#ondetect"><em>AutoConnect::onDetect</em></a> function that the captive portal has started. For example, the sketch can be written like as follows that turns on the LED at the start captive portal.</p>
@ -1030,7 +1064,7 @@
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">loop</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #66d9ef">if</span> <span style="color: #f8f8f2">(WiFi.status()</span> <span style="color: #f92672">==</span> <span style="color: #f8f8f2">WL_CONNECTED)</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Some sketck code for the connected scene is here.</span>
<span style="color: #75715e">// Some sketch code for the connected scene is here.</span>
<span style="color: #f8f8f2">}</span>
<span style="color: #66d9ef">else</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Some sketch code for not connected scene is here.</span>
@ -1052,7 +1086,7 @@ Also, if you want to stop AutoConnect completely when the captive portal is time
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">loop</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #66d9ef">if</span> <span style="color: #f8f8f2">(WiFi.status()</span> <span style="color: #f92672">==</span> <span style="color: #f8f8f2">WL_CONNECTED)</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Some sketck code for the connected scene is here.</span>
<span style="color: #75715e">// Some sketch code for the connected scene is here.</span>
<span style="color: #f8f8f2">}</span>
<span style="color: #66d9ef">else</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Some sketch code for not connected scene is here.</span>
@ -1080,7 +1114,7 @@ Also, if you want to stop AutoConnect completely when the captive portal is time
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">loop</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #66d9ef">if</span> <span style="color: #f8f8f2">(WiFi.status()</span> <span style="color: #f92672">==</span> <span style="color: #f8f8f2">WL_CONNECTED)</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Some sketck code for the connected scene is here.</span>
<span style="color: #75715e">// Some sketch code for the connected scene is here.</span>
<span style="color: #f8f8f2">}</span>
<span style="color: #66d9ef">else</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Some sketch code for not connected scene is here.</span>
@ -1089,6 +1123,65 @@ Also, if you want to stop AutoConnect completely when the captive portal is time
<span style="color: #f8f8f2">}</span>
</pre></div>
<h3 id="cast-items-of-your-sketch-own-into-the-autoccnnect-menu"><i class="fa fa-caret-right"></i> Cast items of your sketch own into the AutocCnnect menu<a class="headerlink" href="#cast-items-of-your-sketch-own-into-the-autoccnnect-menu" title="Permanent link">&para;</a></h3>
<p>If your sketch is handling your own web page, you can call that page from the <a href="menu.html">AutoConnect menu</a>. Unlike the custom Web pages by <a href="apiaux.html#autoconnectaux">AutoConnectAux</a>, this allows AutoConnect menu to legacy web pages registered by <em>ESP8266WebServer::on</em>/<em>WebServer::on</em> function.</p>
<p>To implement this with your sketch, use only the <a href="apiaux.html#autoconnectaux">AutoConnectAux</a> constructed with the URI of that page. <a href="acelements.html">AutoConnectElements</a> is not required. The basic procedure for this as follows. The FSBrowser menu as the below has <strong>Edit</strong> and <strong>List</strong> item, which are implemented according to this basic procedure.</p>
<ol>
<li>Declare AutoConnectAux for each legacy page. It includes the URI of the page and item string which will display in the AutoConnect menu.</li>
<li>Sketch legacy page handlers.</li>
<li>Register those handler functions to ESP8266WebServer/WebServer with the <strong>on</strong> function.</li>
<li>Register AutoConnectAux declared with #1 to AutoConnect using <a href="api.html#join">AutoConnect::join</a> function. It serves as a menu item.</li>
<li><a href="api.html#begin">Begin</a> the portal.</li>
<li>Performs <a href="api.html#handleClient">AutoConnect::handleClient</a> in the <strong>loop</strong> function.</li>
</ol>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><span style="color: #f8f8f2">ESP8266WebServer</span> <span style="color: #f8f8f2">Server;</span>
<span style="color: #f8f8f2">AutoConnect</span> <span style="color: #a6e22e">Portal</span><span style="color: #f8f8f2">(Server);</span>
<span style="color: #75715e">// Declare for menu item for legacy pages</span>
<span style="background-color: #49483e"><span style="color: #f8f8f2">AutoConnectAux</span> <span style="color: #a6e22e">FSBedit</span><span style="color: #f8f8f2">(</span><span style="color: #e6db74">&quot;/edit&quot;</span><span style="color: #f8f8f2">,</span> <span style="color: #e6db74">&quot;Edit&quot;</span><span style="color: #f8f8f2">);</span>
</span><span style="background-color: #49483e"><span style="color: #f8f8f2">AutoConnectAux</span> <span style="color: #a6e22e">FSBlist</span><span style="color: #f8f8f2">(</span><span style="color: #e6db74">&quot;/list?dir=</span><span style="color: #ae81ff">\&quot;</span><span style="color: #e6db74">/</span><span style="color: #ae81ff">\&quot;</span><span style="color: #e6db74">&quot;</span><span style="color: #f8f8f2">,</span> <span style="color: #e6db74">&quot;List&quot;</span><span style="color: #f8f8f2">);</span>
</span>
<span style="color: #75715e">// /edit page handler</span>
<span style="color: #f8f8f2">Void</span> <span style="color: #a6e22e">handleEdit</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #f8f8f2">...</span>
<span style="color: #f8f8f2">}</span>
<span style="color: #75715e">// /list page handler</span>
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">handleList</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #f8f8f2">...</span>
<span style="color: #f8f8f2">}</span>
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">setup</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Register legacy page handler to WebServer</span>
<span style="color: #f8f8f2">Server.on(</span><span style="color: #e6db74">&quot;/edit&quot;</span><span style="color: #f8f8f2">,</span> <span style="color: #f8f8f2">handleEdit);</span>
<span style="color: #f8f8f2">Server.on(</span><span style="color: #e6db74">&quot;/list&quot;</span><span style="color: #f8f8f2">,</span> <span style="color: #f8f8f2">handleList);</span>
<span style="color: #75715e">// Insert the menu items for legacy pages</span>
<span style="background-color: #49483e"> <span style="color: #f8f8f2">Portal.join({</span> <span style="color: #f8f8f2">FSBedit,</span> <span style="color: #f8f8f2">FSBlist</span> <span style="color: #f8f8f2">});</span>
</span> <span style="color: #75715e">// Start portal</span>
<span style="color: #f8f8f2">portal.begin();</span>
<span style="color: #f8f8f2">}</span>
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">loop</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #f8f8f2">Portal.handleClient();</span>
<span style="color: #f8f8f2">}</span>
</pre></div>
<h3 id="change-menu-title"><i class="fa fa-caret-right"></i> Change menu title<a class="headerlink" href="#change-menu-title" title="Permanent link">&para;</a></h3>
<p>Although the default menu title is <strong>AutoConnect</strong>, you can change the title by setting <a href="apiconfig.html#title">AutoConnectConfig::title</a>. To set the menu title properly, you must set before calling <a href="api.html#begin">AutoConnect::begin</a>.</p>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><span style="color: #f8f8f2">AutoConnect</span> <span style="color: #f8f8f2">Portal;</span>
<span style="color: #f8f8f2">AutoConnectConfig</span> <span style="color: #f8f8f2">Config;</span>
<span style="color: #66d9ef">void</span> <span style="color: #a6e22e">setup</span><span style="color: #f8f8f2">()</span> <span style="color: #f8f8f2">{</span>
<span style="color: #75715e">// Set menu title</span>
<span style="background-color: #49483e"> <span style="color: #f8f8f2">Config.title</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">&quot;FSBrowser&quot;</span><span style="color: #f8f8f2">;</span>
</span><span style="background-color: #49483e"> <span style="color: #f8f8f2">Portal.config(Config);</span>
</span> <span style="color: #f8f8f2">Portal.begin();</span>
<span style="color: #f8f8f2">}</span>
</pre></div>
<p>Executing the above sketch will rewrite the menu title to <em>FSBrowser</em> as the below.</p>
<div style="float:left;width:40%;height:470px;overflow:hidden;"><img src="./images/fsbmenu.png"></div>
<p><img style="margin-left:70px;width:40%;height:470px;" src="./images/fsbmenu_expand.png"></p>
<h3 id="combination-with-mdns"><i class="fa fa-caret-right"></i> Combination with mDNS<a class="headerlink" href="#combination-with-mdns" title="Permanent link">&para;</a></h3>
<p>With <a href="https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266mDNS">mDNS library</a>, you can access to ESP8266 by name instead of IP address after connection. The sketch can start the MDNS responder after <a href="api.html#begin"><em>AutoConnect::begin</em></a>.</p>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><span style="color: #75715e">#include</span> <span style="color: #75715e">&lt;ESP8266WiFi.h&gt;</span>
@ -1259,7 +1352,7 @@ The above example does not connect to WiFi until TRIGGER_PIN goes LOW. When TRIG
<li>Retains the portal function after time out.</li>
<li>Length of start up time after reset.</li>
<li>Automatic starting the captive portal.</li>
<li>Start the captive portal forcely.</li>
<li>Start the captive portal forcefully.</li>
<li>Auto reset after connection establishment.</li>
<li>Home URL of the user sketch application.</li>
</ul>
@ -1392,18 +1485,12 @@ The above example does not connect to WiFi until TRIGGER_PIN goes LOW. When TRIG
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1301,18 +1307,12 @@ Returns a pointer to the AutoConnectAux object of the custom web page that cause
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1039,18 +1045,12 @@ Set the title string of the AutoConnectAux page.</p>
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -702,6 +708,13 @@
staNetmask
</a>
</li>
<li class="md-nav__item">
<a href="#title" title=" title" class="md-nav__link">
title
</a>
</li>
</ul>
@ -1009,6 +1022,13 @@
staNetmask
</a>
</li>
<li class="md-nav__item">
<a href="#title" title=" title" class="md-nav__link">
title
</a>
</li>
</ul>
@ -1243,6 +1263,12 @@ The default value is 0.
<dt><strong>Type</strong></dt>
<dd>IPAddress</dd>
</dl></p>
<h3 id="title"><i class="fa fa-caret-right"></i> title<a class="headerlink" href="#title" title="Permanent link">&para;</a></h3>
<p>Set the menu title.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>String</dd>
</dl></p>
<h2 id="autoconnectconfig-example"><i class="fa fa-code"></i> AutoConnectConfig example<a class="headerlink" href="#autoconnectconfig-example" title="Permanent link">&para;</a></h2>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><span style="color: #f8f8f2">AutoConenct</span> <span style="color: #f8f8f2">Portal;</span>
<span style="color: #f8f8f2">AutoConenctConfig</span> <span style="color: #a6e22e">Config</span><span style="color: #f8f8f2">(</span><span style="color: #e6db74">&quot;&quot;</span><span style="color: #f8f8f2">,</span> <span style="color: #e6db74">&quot;passpass&quot;</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// SoftAp name is determined at runtime</span>
@ -1255,7 +1281,8 @@ The default value is 0.
<span style="color: #f8f8f2">Config.boundaryOffet</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">64</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Reserve 64 bytes for the user data in EEPROM.</span>
<span style="color: #f8f8f2">Config.portalTimeout</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">60000</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Sets timeout value for the captive portal</span>
<span style="color: #f8f8f2">Config.retainPortal</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">true;</span> <span style="color: #75715e">// Retains the portal function after timed-out</span>
<span style="color: #f8f8f2">Config.homeUri</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">&quot;/index.html&quot;</span> <span style="color: #75715e">// Sets home path of the sketch application</span>
<span style="color: #f8f8f2">Config.homeUri</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">&quot;/index.html&quot;</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Sets home path of the sketch application</span>
<span style="color: #f8f8f2">Config.title</span> <span style="color: #f92672">=</span><span style="color: #e6db74">&quot;My menu&quot;</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Customize the menu title</span>
<span style="color: #f8f8f2">Config.staip</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets static IP</span>
<span style="color: #f8f8f2">Config.staGateway</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">1</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets WiFi router address</span>
<span style="color: #f8f8f2">Config.staNetmask</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">0</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets WLAN scope</span>
@ -1347,18 +1374,12 @@ The default value is 0.
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1884,18 +1890,12 @@ Returns current checked option of the radio buttons.
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -762,18 +768,12 @@
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1042,18 +1048,12 @@ or</p>
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -857,18 +863,12 @@
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1026,18 +1032,12 @@
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1343,18 +1349,12 @@ wdt reset
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -864,18 +870,12 @@ Or, "<strong>RESET</strong>" can be selected. The ESP8266 resets and reboots. Af
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -1002,18 +1008,12 @@ To install the PageBuilder library into your Arduino IDE, you can use the <em>Li
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -671,18 +677,12 @@ IN THE SOFTWARE.</p>
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

@ -38,7 +38,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.2.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.3.0">
@ -57,7 +57,7 @@
<script src="assets/javascripts/modernizr.8c900955.js"></script>
<script src="assets/javascripts/modernizr.962652e9.js"></script>
@ -74,6 +74,12 @@
<link rel="stylesheet" href="css/extra.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=None"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","None")</script>
</head>
@ -878,18 +884,12 @@ Enter SSID and Passphrase and tap "<strong>apply</strong>" to starts WiFi connec
</div>
<script src="assets/javascripts/application.b41f3d20.js"></script>
<script src="assets/javascripts/application.a353778b.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","None","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

Binary file not shown.

@ -53,6 +53,7 @@ WebServer server(80);
#endif
//Add a below line for AutoConnect.
AutoConnect portal(server);
AutoConnectConfig config;
AutoConnectAux FSBedit("/edit", "Edit");
AutoConnectAux FSBlist("/list?dir=\"/\"", "List");
//holds the current upload
@ -320,8 +321,9 @@ void setup(void){
json = String();
});
//Add HOME path
portal.home(String("/"));
//Set menu title
config.title = "FSBrowser";
portal.config(config);
//Register AutoConnect menu
portal.join({ FSBedit, FSBlist });
//Replacement as follows to make AutoConnect recognition.

@ -19,6 +19,7 @@
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>ESP Monitor</title>
<script type="text/javascript" src="graphs.js"></script>
<script type="text/javascript">

@ -71,8 +71,8 @@ So, the basic procedure for handling of the custom Web pages is as follows:
2. Create or define [AutoConnectElement(s)](acelements.md).
3. Add [AutoConnectElement(s)](acelements.md) to AutoConnectAux.
4. Create more AutoConnectAux containing [AutoConnectElement(s)](acelements.md), if necessary.
5. Register the request handlers for the custom Web pages
6. Join prepared AutoConnectAux(s) to [AutoConnect](api.md#join).
5. Register the request handlers for the custom Web pages.
6. [Join](api.md#join) prepared AutoConnectAux(s) to AutoConnect.
7. Invoke [AutoConnect::begin()](api.md#begin).
## Write the custom Web page with JSON

@ -38,7 +38,7 @@ Portal.begin();
```
!!! note "In ESP32, the credentials for AutoConnect are not in NVS"
The credentials used by AutoConnect are not saved in NVS on ESP32 module. ESP-IDF saves the WiFi connection configuration to NVS, but AutoConnect stores it on the eeprom partition. You can find the partition table for default as [default.csv](https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv)
The credentials used by AutoConnect are not saved in NVS on ESP32 module. ESP-IDF saves the WiFi connection configuration to NVS, but AutoConnect stores it on the EEPROM partition. You can find the partition table for default as [default.csv](https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv)
### <i class="fa fa-caret-right"></i> Captive portal start detection
@ -67,6 +67,7 @@ void loop() {
Portal.handleClient();
}
```
### <i class="fa fa-caret-right"></i> Captive portal timeout control
AutoConnect has two parameters for timeout control. One is a timeout value used when trying to connect to the specified AP. It behaves the same as general timeout control in connection attempt by WiFi.begin. This control is specified by the third parameter of [*AutoConnect::begin*](api.md#begin). Default value is macro defined by [**AUTOCONNECT_TIMEOUT**](api.md#defined-macros) in the `AutoConnectDef.h` file.
@ -91,7 +92,7 @@ void setup() {
void loop() {
if (WiFi.status() == WL_CONNECTED) {
// Some sketck code for the connected scene is here.
// Some sketch code for the connected scene is here.
}
else {
// Some sketch code for not connected scene is here.
@ -115,7 +116,7 @@ void setup() {
void loop() {
if (WiFi.status() == WL_CONNECTED) {
// Some sketck code for the connected scene is here.
// Some sketch code for the connected scene is here.
}
else {
// Some sketch code for not connected scene is here.
@ -145,7 +146,7 @@ void setup() {
void loop() {
if (WiFi.status() == WL_CONNECTED) {
// Some sketck code for the connected scene is here.
// Some sketch code for the connected scene is here.
}
else {
// Some sketch code for not connected scene is here.
@ -154,6 +155,72 @@ void loop() {
}
```
### <i class="fa fa-caret-right"></i> Cast items of your sketch own into the AutocCnnect menu
If your sketch is handling your own web page, you can call that page from the [AutoConnect menu](menu.md). Unlike the custom Web pages by [AutoConnectAux](apiaux.md#autoconnectaux), this allows AutoConnect menu to legacy web pages registered by *ESP8266WebServer::on*/*WebServer::on* function.
To implement this with your sketch, use only the [AutoConnectAux](apiaux.md#autoconnectaux) constructed with the URI of that page. [AutoConnectElements](acelements.md) is not required. The basic procedure for this as follows. The FSBrowser menu as the below has **Edit** and **List** item, which are implemented according to this basic procedure.
1. Declare AutoConnectAux for each legacy page. It includes the URI of the page and item string which will display in the AutoConnect menu.
2. Sketch legacy page handlers.
3. Register those handler functions to ESP8266WebServer/WebServer with the **on** function.
4. Register AutoConnectAux declared with #1 to AutoConnect using [AutoConnect::join](api.md#join) function. It serves as a menu item.
5. [Begin](api.md#begin) the portal.
6. Performs [AutoConnect::handleClient](api.md#handleClient) in the **loop** function.
```cpp hl_lines="4 5 22"
ESP8266WebServer Server;
AutoConnect Portal(Server);
// Declare for menu item for legacy pages
AutoConnectAux FSBedit("/edit", "Edit");
AutoConnectAux FSBlist("/list?dir=\"/\"", "List");
// /edit page handler
Void handleEdit() {
...
}
// /list page handler
void handleList() {
...
}
void setup() {
// Register legacy page handler to WebServer
Server.on("/edit", handleEdit);
Server.on("/list", handleList);
// Insert the menu items for legacy pages
Portal.join({ FSBedit, FSBlist });
// Start portal
portal.begin();
}
void loop() {
Portal.handleClient();
}
```
### <i class="fa fa-caret-right"></i> Change menu title
Although the default menu title is **AutoConnect**, you can change the title by setting [AutoConnectConfig::title](apiconfig.md#title). To set the menu title properly, you must set before calling [AutoConnect::begin](api.md#begin).
```cpp hl_lines="6 7"
AutoConnect Portal;
AutoConnectConfig Config;
void setup() {
// Set menu title
Config.title = "FSBrowser";
Portal.config(Config);
Portal.begin();
}
```
Executing the above sketch will rewrite the menu title to *FSBrowser* as the below.
<div style="float:left;width:40%;height:470px;overflow:hidden;"><img src="./images/fsbmenu.png"></div>
<img style="margin-left:70px;width:40%;height:470px;" src="./images/fsbmenu_expand.png">
### <i class="fa fa-caret-right"></i> Combination with mDNS
With [mDNS library](https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266mDNS), you can access to ESP8266 by name instead of IP address after connection. The sketch can start the MDNS responder after [*AutoConnect::begin*](api.md#begin).
@ -355,7 +422,7 @@ AutoConnect will activate SoftAP at failed the first *WiFi.begin*. It SoftAP set
- Retains the portal function after time out.
- Length of start up time after reset.
- Automatic starting the captive portal.
- Start the captive portal forcely.
- Start the captive portal forcefully.
- Auto reset after connection establishment.
- Home URL of the user sketch application.

@ -250,6 +250,14 @@ Set the subnetmask when using static IP address.
<dd>IPAddress</dd>
</dl>
### <i class="fa fa-caret-right"></i> title
Set the menu title.
<dl class="apidl">
<dt>**Type**</dt>
<dd>String</dd>
</dl>
## <i class="fa fa-code"></i> AutoConnectConfig example
```cpp
@ -264,7 +272,8 @@ Config.autoSave = AC_SAVECREDENTIAL_NEVER; // No save credential
Config.boundaryOffet = 64; // Reserve 64 bytes for the user data in EEPROM.
Config.portalTimeout = 60000; // Sets timeout value for the captive portal
Config.retainPortal = true; // Retains the portal function after timed-out
Config.homeUri = "/index.html" // Sets home path of the sketch application
Config.homeUri = "/index.html"; // Sets home path of the sketch application
Config.title ="My menu"; // Customize the menu title
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -11,7 +11,6 @@
#ifdef ARDUINO_ARCH_ESP32
#include <esp_wifi.h>
#endif
/**
* An actual reset function dependent on the architecture
*/
@ -46,12 +45,12 @@ AutoConnect::AutoConnect(WebServerClass& webServer) {
_webServerAlloc = AC_WEBSERVER_PARASITIC;
}
void AutoConnect::_initialize() {
void AutoConnect::_initialize(void) {
_rfConnect = false;
_rfReset = false;
_responsePage = nullptr;
_currentPageElement = nullptr;
_menuTitle = String(F(AUTOCONNECT_MENU_TITLE));
_menuTitle = _apConfig.title;
_connectTimeout = AUTOCONNECT_TIMEOUT;
_scanCount = 0;
memset(&_credential, 0x00, sizeof(struct station_config));
@ -73,7 +72,7 @@ AutoConnect::~AutoConnect() {
/**
* Starts establishing WiFi connection without SSID and password.
*/
bool AutoConnect::begin() {
bool AutoConnect::begin(void) {
return begin(nullptr, nullptr);
}
@ -280,7 +279,7 @@ bool AutoConnect::config(AutoConnectConfig& Config) {
* Set up access point with internal AucoConnectConfig parameter corrected
* by Config method.
*/
bool AutoConnect::_config() {
bool AutoConnect::_config(void) {
bool rc = WiFi.softAPConfig(_apConfig.apip, _apConfig.gateway, _apConfig.netmask);
AC_DBG("SoftAP configure %s, %s, %s %s\n", _apConfig.apip.toString().c_str(), _apConfig.gateway.toString().c_str(), _apConfig.netmask.toString().c_str(), rc ? "" : "failed");
return rc;
@ -292,14 +291,14 @@ bool AutoConnect::_config() {
* portal menu.
* @param uri A URI string of user site's home.
*/
void AutoConnect::home(String uri) {
void AutoConnect::home(const String& uri) {
_apConfig.homeUri = uri;
}
/**
* Stops AutoConnect captive portal service.
*/
void AutoConnect::end() {
void AutoConnect::end(void) {
if (_responsePage != nullptr) {
_responsePage->~PageBuilder();
delete _responsePage;
@ -330,7 +329,7 @@ void AutoConnect::end() {
/**
* Returns the current hosted ESP8266WebServer.
*/
WebServerClass& AutoConnect::host() {
WebServerClass& AutoConnect::host(void) {
return *_webServer;
}
@ -376,7 +375,7 @@ void AutoConnect::join(AutoConnectAuxVT auxVector) {
/**
* Starts Web server for AutoConnect service.
*/
void AutoConnect::_startWebServer() {
void AutoConnect::_startWebServer(void) {
// Boot Web server
if (!_webServer) {
// Only when hosting WebServer internally
@ -406,7 +405,7 @@ void AutoConnect::_startWebServer() {
/**
* Starts DNS server for Captive portal.
*/
void AutoConnect::_startDNSServer() {
void AutoConnect::_startDNSServer(void) {
// Boot DNS server, set up for captive portal redirection.
if (!_dnsServer) {
_dnsServer.reset(new DNSServer());
@ -422,7 +421,7 @@ void AutoConnect::_startDNSServer() {
* AutoConnect WEB interface.
* No effects when the web server is not available.
*/
void AutoConnect::handleClient() {
void AutoConnect::handleClient(void) {
// Is there DNS Server process next request?
if (_dnsServer)
_dnsServer->processNextRequest();
@ -436,7 +435,7 @@ void AutoConnect::handleClient() {
/**
* Handling for the AutoConnect menu request.
*/
void AutoConnect::handleRequest() {
void AutoConnect::handleRequest(void) {
// Handling processing requests to AutoConnect.
if (_rfConnect) {
// Leave from the AP currently.
@ -552,7 +551,7 @@ void AutoConnect::onNotFound(WebServerClass::THandlerFunction fn) {
* Load stored credentials that match nearby WLANs.
* @return true A matched credential of BSSID was loaded.
*/
bool AutoConnect::_loadAvailCredential() {
bool AutoConnect::_loadAvailCredential(void) {
AutoConnectCredential credential(_apConfig.boundaryOffset);
if (credential.entries() > 0) {
@ -578,7 +577,7 @@ bool AutoConnect::_loadAvailCredential() {
* Disconnect from the AP and stop the AutoConnect portal.
* Stops DNS server and flush tcp sending.
*/
void AutoConnect::_stopPortal() {
void AutoConnect::_stopPortal(void) {
if (_dnsServer && _webServerAlloc == AC_WEBSERVER_HOSTED)
_dnsServer->stop();
@ -596,9 +595,10 @@ void AutoConnect::_stopPortal() {
* Redirect to captive portal if we got a request for another domain.
* Return true in that case so the page handler do not try to handle the request again.
*/
bool AutoConnect::_captivePortal() {
bool AutoConnect::_captivePortal(void) {
String hostHeader = _webServer->hostHeader();
if (!_isIP(hostHeader) && (hostHeader != WiFi.localIP().toString())) {
if (!_isIP(hostHeader) && (hostHeader != WiFi.localIP().toString()) && (!hostHeader.endsWith(F(".local")))) {
AC_DBG("Detected appliaction, %s, %s\n", hostHeader.c_str(), WiFi.localIP().toString().c_str());
String location = String(F("http://")) + _webServer->client().localIP().toString() + String(AUTOCONNECT_URI);
_webServer->sendHeader(String(F("Location")), location, true);
_webServer->send(302, String(F("text/plain")), _emptyString);
@ -643,7 +643,7 @@ bool AutoConnect::_hasTimeout(unsigned long timeout) {
* A handler that redirects access to the captive portal to the connection
* configuration page.
*/
void AutoConnect::_handleNotFound() {
void AutoConnect::_handleNotFound(void) {
if (!_captivePortal()) {
if (_notFoundHandler) {
_notFoundHandler();
@ -832,7 +832,7 @@ bool AutoConnect::_classifyHandle(HTTPMethod method, String uri) {
/**
* Purge allocated pages.
*/
void AutoConnect::_purgePages() {
void AutoConnect::_purgePages(void) {
_responsePage->clearElement();
if (_currentPageElement != nullptr) {
delete _currentPageElement;
@ -945,7 +945,7 @@ void AutoConnect::_setReconnect(const AC_STARECONNECT_t order) {
* Wait for the end of transmission of the http response by closed
* from the http client.
*/
void AutoConnect::_waitForEndTransmission() {
void AutoConnect::_waitForEndTransmission(void) {
#ifdef AC_DEBUG
AC_DBG("Leaves:");
unsigned long lt = millis();

@ -71,6 +71,7 @@ class AutoConnectConfig {
portalTimeout(AUTOCONNECT_CAPTIVEPORTAL_TIMEOUT),
hostName(String("")),
homeUri(AUTOCONNECT_HOMEURI),
title(AUTOCONNECT_MENU_TITLE),
staip(0U),
staGateway(0U),
staNetmask(0U),
@ -99,6 +100,7 @@ class AutoConnectConfig {
portalTimeout(portalTimeout),
hostName(String("")),
homeUri(AUTOCONNECT_HOMEURI),
title(AUTOCONNECT_MENU_TITLE),
staip(0U),
staGateway(0U),
staNetmask(0U),
@ -127,6 +129,7 @@ class AutoConnectConfig {
portalTimeout = o.portalTimeout;
hostName = o.hostName;
homeUri = o.homeUri;
title = o.title;
staip = o.staip;
staGateway = o.staGateway;
staNetmask = o.staNetmask;
@ -154,6 +157,7 @@ class AutoConnectConfig {
unsigned long portalTimeout; /**< Timeout value for stay in the captive portal */
String hostName; /**< host name */
String homeUri; /**< A URI of user site */
String title; /**< Menu title */
IPAddress staip; /**< Station static IP address */
IPAddress staGateway; /**< Station gateway address */
IPAddress staNetmask; /**< Station subnet mask */
@ -171,13 +175,13 @@ class AutoConnect {
AutoConnectAux* aux(const String& uri) const;
bool config(AutoConnectConfig& Config);
bool config(const char* ap, const char* password = nullptr);
void home(String uri);
bool begin();
void home(const String& uri);
bool begin(void);
bool begin(const char* ssid, const char* passphrase = nullptr, unsigned long timeout = AUTOCONNECT_TIMEOUT);
void end();
void handleClient();
void handleRequest();
WebServerClass& host();
void end(void);
void handleClient(void);
void handleRequest(void);
WebServerClass& host(void);
void join(AutoConnectAux& aux);
void join(AutoConnectAuxVT auxVector);
bool on(const String& uri, const AuxHandlerFunctionT handler, AutoConnectExitOrder_t order = AC_EXIT_AHEAD);
@ -204,13 +208,13 @@ class AutoConnect {
AC_RECONNECT_SET,
AC_RECONNECT_RESET
} AC_STARECONNECT_t;
void _initialize();
bool _config();
void _startWebServer();
void _startDNSServer();
void _handleNotFound();
bool _loadAvailCredential();
void _stopPortal();
void _initialize(void);
bool _config(void);
void _startWebServer(void);
void _startDNSServer(void);
void _handleNotFound(void);
bool _loadAvailCredential(void);
void _stopPortal(void);
bool _classifyHandle(HTTPMethod mothod, String uri);
void _purgePages(void);
PageElement* _setupPage(String uri);
@ -225,7 +229,7 @@ class AutoConnect {
String _invokeResult(PageArgument& args);
/** For portal control */
bool _captivePortal();
bool _captivePortal(void);
bool _hasTimeout(unsigned long timeout);
bool _isIP(String ipStr);
wl_status_t _waitForConnect(unsigned long timeout);
@ -234,8 +238,8 @@ class AutoConnect {
void _setReconnect(const AC_STARECONNECT_t order);
/** Utilities */
static uint32_t _getChipId();
static uint32_t _getFlashChipRealSize();
static uint32_t _getChipId(void);
static uint32_t _getFlashChipRealSize(void);
static String _toMACAddressString(const uint8_t mac[]);
static unsigned int _toWiFiQuality(int32_t rssi);
DetectExit_ft _onDetectExit;

@ -43,7 +43,7 @@ AutoConnectCredential::AutoConnectCredential(uint16_t offset) {
_allocateEntry();
}
void AutoConnectCredential::_allocateEntry() {
void AutoConnectCredential::_allocateEntry(void) {
char id_c[sizeof(AC_IDENTIFIER) - 1];
uint8_t c;

@ -40,14 +40,14 @@ class AutoConnectCredential {
AutoConnectCredential();
explicit AutoConnectCredential(uint16_t offset);
~AutoConnectCredential();
uint8_t entries() { return _entries; }
uint8_t entries(void) { return _entries; }
bool del(const char* ssid);
int8_t load(const char* ssid, struct station_config* config);
bool load(int8_t entry, struct station_config* config);
bool save(const struct station_config* config);
private:
void _allocateEntry(); /**< Initialize storage for credentials. */
void _allocateEntry(void); /**< Initialize storage for credentials. */
void _retrieveEntry(char* ssid, char* password, uint8_t* bssid); /**< Read an available entry. */
uint8_t _entries; /**< Count of the available entry */

@ -53,7 +53,7 @@
#define AUTOCONNECT_AP_NM 0x00FFFFFF //*< 255.255.255.0 */
#endif // !AUTOCONNECT_AP_NM
#ifndef AUTOCONNECT_AP_CH
#define AUTOCONNECT_AP_CH 1
#define AUTOCONNECT_AP_CH 11
#endif // !AUTOCONNECT_AP_CH
// AutoConnect menu root path

@ -220,6 +220,9 @@ const char AutoConnect::_CSS_INPUT_TEXT[] PROGMEM = {
".aux-page label{"
"padding:10px 0.5em;"
"}"
".aux-page input[type=\"text\"]:invalid{"
"background:pink;"
"}"
};
/**< TABLE style */
@ -1193,7 +1196,7 @@ PageElement* AutoConnect::_setupPage(String uri) {
PageElement *elm = new PageElement();
// Restore menu title
_menuTitle = String(AUTOCONNECT_MENU_TITLE);
_menuTitle = _apConfig.title;
// Build the elements of current requested page.
if (uri == String(AUTOCONNECT_URI)) {

Loading…
Cancel
Save