<!doctype html><htmllang="en"class="no-js"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width,initial-scale=1"><metahttp-equiv="x-ua-compatible"content="ie=edge"><metaname="description"content="ESP8266/ESP32 WLAN configuration at run time with web interface"><linkrel="canonical"href="https://Hieromon.github.io/AutoConnect/index.html"><metaname="author"content="Hieromon Ikasamo"><metaname="lang:clipboard.copy"content="Copy to clipboard"><metaname="lang:clipboard.copied"content="Copied to clipboard"><metaname="lang:search.language"content="en"><metaname="lang:search.pipeline.stopwords"content="True"><metaname="lang:search.pipeline.trimmer"content="True"><metaname="lang:search.result.none"content="No matching documents"><metaname="lang:search.result.one"content="1 matching document"><metaname="lang:search.result.other"content="# matching documents"><metaname="lang:search.tokenizer"content="[\s\-]+"><linkrel="shortcut icon"href="assets/images/favicon.png"><metaname="generator"content="mkdocs-1.0.4, mkdocs-material-4.3.1"><title>AutoConnect for ESP8266/ESP32</title><linkrel="stylesheet"href="assets/stylesheets/application.4031d38b.css"><linkrel="stylesheet"href="assets/stylesheets/application-palette.224b79ff.css"><metaname="theme-color"content="#3f51b5"><scriptsrc="assets/javascripts/modernizr.74668098.js"></script><linkhref="https://fonts.gstatic.com"rel="preconnect"crossorigin><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=swap"><style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style><linkrel="stylesheet"href="assets/fonts/material-icons.css"><linkrel="stylesheet"href="css/paragraph.css"><linkrel="stylesheet"href="css/extra.css"><linkrel="stylesheet"href="https://use.fontawesome.com/releases/v5.6.1/css/all.css"><script>window.ga=window.ga||function(){
<p>To the dynamic configuration for joining to WLAN with SSID and PSK accordingly. It an Arduino library united with <em>ESP8266WebServer</em> class for ESP8266 or <em>WebServer</em> class for ESP32.
Easy implementing the Web interface constituting the WLAN for ESP8266/ESP32 WiFi connection. With this library to make a sketch easily which connects from ESP8266/ESP32 to the access point at runtime by the web interface without hard-coded SSID and password.</p>
<h3id="no-need-pre-coded-ssid-password"><iclass="fa fa-arrow-circle-right"aria-hidden="true"></i> No need pre-coded SSID & password<aclass="headerlink"href="#no-need-pre-coded-ssid-password"title="Permanent link">¶</a></h3>
<p><spanclass="lead">It is no needed hard-coding in advance the SSID and Password into the sketch to connect between ESP8266/ESP32 and WLAN. You can input SSID & Password from a smartphone via the web interface at runtime.</span></p>
<p><spanclass="lead">AutoConnect control screen will be displayed automatically for establishing new connections. It aids by the <ahref="https://en.wikipedia.org/wiki/Captive_portal">captive portal</a> when vested the connection cannot be detected.<br>By using the <ahref="menu.html">AutoConnect menu</a>, to manage the connections convenient.</span></p>
<h3id="store-the-established-connection"><iclass="fa fa-arrow-circle-right"aria-hidden="true"></i> Store the established connection<aclass="headerlink"href="#store-the-established-connection"title="Permanent link">¶</a></h3>
<p><spanclass="lead">The connection authentication data as credentials are saved automatically in EEPROM of ESP8266/ESP32 and You can select the past SSID from the <ahref="menu.html">AutoConnect menu</a>.</span></p>
<p><spanclass="lead">AutoConnect can be placed easily in your sketch. It's "<strong>begin</strong>" and "<strong>handleClient</strong>" only.</span></p>
<h3id="lives-with-your-sketches"><iclass="fa fa-arrow-circle-right"aria-hidden="true"></i> Lives with your sketches<aclass="headerlink"href="#lives-with-your-sketches"title="Permanent link">¶</a></h3>
<p><spanclass="lead">The sketches which provide the web page using ESP8266WebServer there is, AutoConnect will not disturb it. AutoConnect can use an already instantiated ESP8266WebServer object, or itself can assign it. This effect also applies to ESP32. The corresponding class for ESP32 will be the WebServer.</span></p>
<h3id="easy-to-add-the-custom-web-pages-enhanced-wv097"><iclass="fa fa-arrow-circle-right"aria-hidden="true"></i> Easy to add the <ahref="acintro.html">custom Web pages</a><sup><sub>ENHANCED w/v0.9.7</sub></sup><aclass="headerlink"href="#easy-to-add-the-custom-web-pages-enhanced-wv097"title="Permanent link">¶</a></h3>
<p><spanclass="lead">You can easily add your owned web pages that can consist of representative HTML elements and invoke them from the menu. Further it possible importing the custom Web pages declarations described with JSON which stored in PROGMEM, SPIFFS, or SD.</span></p>
<liclass="task-list-item"><inputtype="checkbox"disabledchecked/> And other ESP8266/ESP32 modules supported by the Additional Board Manager URLs of the Arduino-IDE.</li>
<pclass="admonition-title">About flash size on the module</p>
<p>The AutoConnect sketch size is relatively large. Large flash capacity is necessary. 512Kbyte (4Mbits) flash inclusion module such as ESP-01 is not recommended.</p>
<p>The current upstream at the 1.8 level or later is needed. Please install from the <ahref="https://www.arduino.cc/en/Main/Software">official Arduino IDE download page</a>. This step is not required if you already have a modern version.</p>
<p>AutoConnect targets sketches made on the assumption of <ahref="https://github.com/esp8266/Arduino">ESP8266 Community's Arduino core</a>. Stable 2.4.0 or higher required and the <ahref="https://github.com/esp8266/Arduino/releases/latest">latest release</a> is recommended.<br/>
Install third-party platform using the <em>Boards Manager</em> of Arduino IDE. Package URL is <ahref="http://arduino.esp8266.com/stable/package_esp8266com_index.json">http://arduino.esp8266.com/stable/package_esp8266com_index.json</a></p>
<p>Also, to apply AutoConnect to ESP32, the <ahref="https://github.com/espressif/arduino-esp32">arduino-esp32 core</a> provided by Espressif is needed. Stable 1.0.1 or required and the <ahref="https://github.com/espressif/arduino-esp32/releases/latest">latest release</a> is recommended.<br/>
Install third-party platform using the <em>Boards Manager</em> of Arduino IDE. You can add multiple URLs into <em>Additional Board Manager URLs</em> field, separating them with commas. Package URL is <ahref="https://dl.espressif.com/dl/package_esp32_index.json">https://dl.espressif.com/dl/package_esp32_index.json</a> for ESP32.</p>
To install the PageBuilder library into your Arduino IDE, you can use the <em>Library Manager</em>. Select the board of ESP8266 series in the Arduino IDE, open the library manager and search keyword '<strong>PageBuilder</strong>' with the topic '<strong>Communication</strong>', then you can see the <em>PageBuilder</em>. The latest version is required <strong>1.3.3</strong><strong>later</strong>.<supid="fnref:1"><aclass="footnote-ref"href="#fn:1"rel="footnote">1</a></sup></p>
<p>By adding the <ahref="https://github.com/bblanchon/ArduinoJson">ArduinoJson</a> library, AutoConnect will be able to handle the <ahref="acintro.html"><strong>custom Web pages</strong></a> described with JSON. Since AutoConnect v0.9.7 you can insert user-owned web pages that can consist of representative HTML elements as styled TEXT, INPUT, BUTTON, CHECKBOX, SELECT, SUBMIT and invoke them from the AutoConnect menu. These HTML elements can be added by sketches using the AutoConnect API. Further it possible importing the custom Web pages declarations described with JSON which stored in PROGMEM, SPIFFS, or SD. <ahref="https://arduinojson.org/">ArduinoJson</a> is required to use this feature.<supid="fnref:2"><aclass="footnote-ref"href="#fn:2"rel="footnote">2</a></sup> AutoConnect can work with ArduinoJson both <ahref="https://arduinojson.org/v5/doc/">version 5</a> and <ahref="https://arduinojson.org/v6/doc/">version 6</a>.</p>
<p>When you select Download, you can import it to Arduino IDE immediately. After downloaded, the AutoConnect-master.zip file will be saved in your download folder. Then in the Arduino IDE, navigate to <em>"Sketch > Include Library"</em>. At the top of the drop down list, select the option to <em>"Add .ZIP Library..."</em>. Details for <ahref="https://www.arduino.cc/en/Guide/Libraries#toc4">Arduino official page</a>.</p>
<p>Since AutoConnect v0.9.8, PageBuilder v1.3.3 later is required. <aclass="footnote-backref"href="#fnref:1"rev="footnote"title="Jump back to footnote 1 in the text">↩</a></p>
<p>Using the AutoConnect API natively allows you to sketch custom Web pages without JSON. <aclass="footnote-backref"href="#fnref:2"rev="footnote"title="Jump back to footnote 2 in the text">↩</a></p>