Merge branch 'patches/v101'

pull/131/head v1.0.1
Hieromon Ikasamo 5 years ago
commit 3938f5af64
  1. 1
      .travis.yml
  2. 3
      README.md
  3. 22
      docs/changelog.html
  4. 21
      docs/faq.html
  5. BIN
      docs/images/creditmigrate.png
  6. 2
      docs/search/search_index.json
  7. 57
      docs/sitemap.xml
  8. BIN
      docs/sitemap.xml.gz
  9. 115
      examples/CreditMigrate/CreditMigrate.ino
  10. 24
      examples/CreditMigrate/README.md
  11. 2
      library.json
  12. 2
      library.properties
  13. 3
      mkdocs/changelog.md
  14. 9
      mkdocs/faq.md
  15. BIN
      mkdocs/images/creditmigrate.png

@ -34,6 +34,7 @@ install:
script: script:
- buildExampleSketch ConfigIP - buildExampleSketch ConfigIP
- buildExampleSketch Credential - buildExampleSketch Credential
- if [[ "$BOARD" =~ "esp32:esp32:" ]]; then buildExampleSketch CreditMigrate; fi
- buildExampleSketch Elements - buildExampleSketch Elements
- buildExampleSketch FileUpload - buildExampleSketch FileUpload
- buildExampleSketch FSBrowser - buildExampleSketch FSBrowser

@ -101,6 +101,9 @@ Full documentation is available on https://Hieromon.github.io/AutoConnect, some
## Change log ## Change log
### [1.0.1] Sept. 13, 2019
- Added a sketch for ESP32 boards that migrates credentials stored in EEPROM partition to the Preferences.
### [1.0.0] Sept. 7, 2019 ### [1.0.0] Sept. 7, 2019
- Supports Arduino core for ESP32 1.0.3. - Supports Arduino core for ESP32 1.0.3.
- Supports AutoConnectUpdate for the OTA update. - Supports AutoConnectUpdate for the OTA update.

@ -122,7 +122,7 @@
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label> <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#100-sept-7-2019" tabindex="1" class="md-skip"> <a href="#101-sept-13-2019" tabindex="1" class="md-skip">
Skip to content Skip to content
</a> </a>
@ -725,6 +725,13 @@
<label class="md-nav__title" for="__toc">Table of contents</label> <label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#101-sept-13-2019" title="[1.0.1] Sept. 13, 2019" class="md-nav__link">
[1.0.1] Sept. 13, 2019
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="#100-sept-7-2019" title="[1.0.0] Sept. 7, 2019" class="md-nav__link"> <a href="#100-sept-7-2019" title="[1.0.0] Sept. 7, 2019" class="md-nav__link">
[1.0.0] Sept. 7, 2019 [1.0.0] Sept. 7, 2019
@ -857,6 +864,13 @@
<label class="md-nav__title" for="__toc">Table of contents</label> <label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#101-sept-13-2019" title="[1.0.1] Sept. 13, 2019" class="md-nav__link">
[1.0.1] Sept. 13, 2019
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="#100-sept-7-2019" title="[1.0.0] Sept. 7, 2019" class="md-nav__link"> <a href="#100-sept-7-2019" title="[1.0.0] Sept. 7, 2019" class="md-nav__link">
[1.0.0] Sept. 7, 2019 [1.0.0] Sept. 7, 2019
@ -967,7 +981,11 @@
<h1>Change log</h1> <h1>Change log</h1>
<h4 id="100-sept-7-2019">[1.0.0] Sept. 7, 2019<a class="headerlink" href="#100-sept-7-2019" title="Permanent link">&para;</a></h4> <h4 id="101-sept-13-2019">[1.0.1] Sept. 13, 2019<a class="headerlink" href="#101-sept-13-2019" title="Permanent link">&para;</a></h4>
<ul>
<li>Added a sketch for ESP32 boards that migrates credentials stored in EEPROM partition to the Preferences.</li>
</ul>
<h4 id="100-sept-7-2019">[1.0.0] Sept. 7, 2019<a class="headerlink" href="#100-sept-7-2019" title="Permanent link">&para;</a></h4>
<ul> <ul>
<li>Supports Arduino core for ESP32 1.0.3.</li> <li>Supports Arduino core for ESP32 1.0.3.</li>
<li>Supports AutoConnectUpdate for the <a href="otaupdate.html">OTA update</a>.</li> <li>Supports AutoConnectUpdate for the <a href="otaupdate.html">OTA update</a>.</li>

@ -718,6 +718,13 @@
After connected, AutoConnect menu performs but no happens. After connected, AutoConnect menu performs but no happens.
</a> </a>
</li>
<li class="md-nav__item">
<a href="#after-updating-to-autoconnect-v100-established-aps-disappear-from-open-ssids-with-esp32" title=" After updating to AutoConnect v1.0.0, established APs disappear from Open SSIDs with ESP32." class="md-nav__link">
After updating to AutoConnect v1.0.0, established APs disappear from Open SSIDs with ESP32.
</a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
@ -964,6 +971,13 @@
After connected, AutoConnect menu performs but no happens. After connected, AutoConnect menu performs but no happens.
</a> </a>
</li>
<li class="md-nav__item">
<a href="#after-updating-to-autoconnect-v100-established-aps-disappear-from-open-ssids-with-esp32" title=" After updating to AutoConnect v1.0.0, established APs disappear from Open SSIDs with ESP32." class="md-nav__link">
After updating to AutoConnect v1.0.0, established APs disappear from Open SSIDs with ESP32.
</a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
@ -1175,6 +1189,13 @@
<p>If you can access the <strong>AutoConnect root path</strong> as http://ESP8266IPADDRESS/_ac from browser, probably the sketch uses <em>ESP8266WebServer::handleClient()</em> without <a href="api.html#handlerequest"><em>AutoConnect::handleRequest()</em></a>.<br /> <p>If you can access the <strong>AutoConnect root path</strong> as http://ESP8266IPADDRESS/_ac from browser, probably the sketch uses <em>ESP8266WebServer::handleClient()</em> without <a href="api.html#handlerequest"><em>AutoConnect::handleRequest()</em></a>.<br />
For AutoConnect menus to work properly, call <a href="api.html#handlerequest"><em>AutoConnect::handleRequest()</em></a> after <em>ESP8266WebServer::handleClient()</em> invoked, or use <a href="api.html#handleclient"><em>AutoConnect::handleClient()</em></a>. <a href="api.html#handleclient"><em>AutoConnect::handleClient()</em></a> is equivalent <em>ESP8266WebServer::handleClient</em> combined <a href="api.html#handlerequest"><em>AutoConnect::handleRequest()</em></a>.</p> For AutoConnect menus to work properly, call <a href="api.html#handlerequest"><em>AutoConnect::handleRequest()</em></a> after <em>ESP8266WebServer::handleClient()</em> invoked, or use <a href="api.html#handleclient"><em>AutoConnect::handleClient()</em></a>. <a href="api.html#handleclient"><em>AutoConnect::handleClient()</em></a> is equivalent <em>ESP8266WebServer::handleClient</em> combined <a href="api.html#handlerequest"><em>AutoConnect::handleRequest()</em></a>.</p>
<p>See also the explanation <a href="basicusage.html#esp8266webserver-hosted-or-parasitic">here</a>.</p> <p>See also the explanation <a href="basicusage.html#esp8266webserver-hosted-or-parasitic">here</a>.</p>
<h2 id="after-updating-to-autoconnect-v100-established-aps-disappear-from-open-ssids-with-esp32"><i class="fa fa-question-circle"></i> After updating to AutoConnect v1.0.0, established APs disappear from Open SSIDs with ESP32.<a class="headerlink" href="#after-updating-to-autoconnect-v100-established-aps-disappear-from-open-ssids-with-esp32" title="Permanent link">&para;</a></h2>
<p>Since AutoConnect v1.0.0 for ESP32, the storage location in the flash of established credentials has moved from EEPROM to Preferences. After You update AutoConnect to v1.0.0, past credentials saved by v0.9.12 earlier will <em>not be accessible</em> from the AutoConnect menu - <strong>Open SSIDs</strong>. You need to transfer once the stored credentials from the EEPROM area to the Preferences area.</p>
<p>You can migrate the past saved credentials using <a href="https://github.com/Hieromon/AutoConnect/tree/master/examples/CreditMigrate"><strong>CreditMigrate.ino</strong></a> which the examples folder contains.</p>
<div class="admonition info">
<p class="admonition-title">Needs to Arduino core for ESP32 1.0.2 or earlier</p>
<p>EEPROM area with arduino-esp32 core <strong>1.0.3</strong> has moved from <strong>partition</strong> to the <strong>nvs</strong>. CreditMigrate.ino requires arduino-esp32 core <strong>1.0.2</strong> or earlier to migrate saved credentials.</p>
</div>
<h2 id="an-esp8266ap-as-softap-was-connected-but-captive-portal-does-not-start"><i class="fa fa-question-circle"></i> An esp8266ap as SoftAP was connected but Captive portal does not start.<a class="headerlink" href="#an-esp8266ap-as-softap-was-connected-but-captive-portal-does-not-start" title="Permanent link">&para;</a></h2> <h2 id="an-esp8266ap-as-softap-was-connected-but-captive-portal-does-not-start"><i class="fa fa-question-circle"></i> An esp8266ap as SoftAP was connected but Captive portal does not start.<a class="headerlink" href="#an-esp8266ap-as-softap-was-connected-but-captive-portal-does-not-start" title="Permanent link">&para;</a></h2>
<p>Captive portal detection could not be trapped. It is necessary to disconnect and reset ESP8266 to clear memorized connection data in ESP8266. Also, It may be displayed on the smartphone if the connection information of esp8266ap is wrong. In that case, delete the connection information of esp8266ap memorized by the smartphone once.</p> <p>Captive portal detection could not be trapped. It is necessary to disconnect and reset ESP8266 to clear memorized connection data in ESP8266. Also, It may be displayed on the smartphone if the connection information of esp8266ap is wrong. In that case, delete the connection information of esp8266ap memorized by the smartphone once.</p>
<h2 id="connection-lost-immediately-after-establishment-with-ap"><i class="fa fa-question-circle"></i> Connection lost immediately after establishment with AP<a class="headerlink" href="#connection-lost-immediately-after-establishment-with-ap" title="Permanent link">&para;</a></h2> <h2 id="connection-lost-immediately-after-establishment-with-ap"><i class="fa fa-question-circle"></i> Connection lost immediately after establishment with AP<a class="headerlink" href="#connection-lost-immediately-after-establishment-with-ap" title="Permanent link">&para;</a></h2>

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

@ -2,147 +2,146 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/index.html</loc> <loc>https://Hieromon.github.io/AutoConnect/index.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/gettingstarted.html</loc> <loc>https://Hieromon.github.io/AutoConnect/gettingstarted.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/menu.html</loc> <loc>https://Hieromon.github.io/AutoConnect/menu.html</loc>
<lastmod>2019-09-12</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/basicusage.html</loc> <loc>https://Hieromon.github.io/AutoConnect/basicusage.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/advancedusage.html</loc> <loc>https://Hieromon.github.io/AutoConnect/advancedusage.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/acintro.html</loc> <loc>https://Hieromon.github.io/AutoConnect/acintro.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/acelements.html</loc> <loc>https://Hieromon.github.io/AutoConnect/acelements.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/acjson.html</loc> <loc>https://Hieromon.github.io/AutoConnect/acjson.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/achandling.html</loc> <loc>https://Hieromon.github.io/AutoConnect/achandling.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/otaupdate.html</loc> <loc>https://Hieromon.github.io/AutoConnect/otaupdate.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/otabrowser.html</loc> <loc>https://Hieromon.github.io/AutoConnect/otabrowser.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/otaserver.html</loc> <loc>https://Hieromon.github.io/AutoConnect/otaserver.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/api.html</loc> <loc>https://Hieromon.github.io/AutoConnect/api.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/apiaux.html</loc> <loc>https://Hieromon.github.io/AutoConnect/apiaux.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/apiconfig.html</loc> <loc>https://Hieromon.github.io/AutoConnect/apiconfig.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/apielements.html</loc> <loc>https://Hieromon.github.io/AutoConnect/apielements.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/apiupdate.html</loc> <loc>https://Hieromon.github.io/AutoConnect/apiupdate.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/apiextra.html</loc> <loc>https://Hieromon.github.io/AutoConnect/apiextra.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/howtoembed.html</loc> <loc>https://Hieromon.github.io/AutoConnect/howtoembed.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/datatips.html</loc> <loc>https://Hieromon.github.io/AutoConnect/datatips.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/menuize.html</loc> <loc>https://Hieromon.github.io/AutoConnect/menuize.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/wojson.html</loc> <loc>https://Hieromon.github.io/AutoConnect/wojson.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/lsbegin.html</loc> <loc>https://Hieromon.github.io/AutoConnect/lsbegin.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/credit.html</loc> <loc>https://Hieromon.github.io/AutoConnect/credit.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/acupload.html</loc> <loc>https://Hieromon.github.io/AutoConnect/acupload.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/colorized.html</loc> <loc>https://Hieromon.github.io/AutoConnect/colorized.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/faq.html</loc> <loc>https://Hieromon.github.io/AutoConnect/faq.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/changelog.html</loc> <loc>https://Hieromon.github.io/AutoConnect/changelog.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://Hieromon.github.io/AutoConnect/license.html</loc> <loc>https://Hieromon.github.io/AutoConnect/license.html</loc>
<lastmod>2019-09-12</lastmod> <lastmod>2019-09-13</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>

Binary file not shown.

@ -0,0 +1,115 @@
/*
CreditMigrate.ino
Copyright (c) 2019, Hieromon Ikasamo
https://github.com/Hieromon/AutoConnect
This software is released under the MIT License.
https://opensource.org/licenses/MIT
This sketch migrates the credentials past saved to EEPROM in ESP32 to
Preferences.
*/
#ifndef ARDUINO_ARCH_ESP32
#error This sketch should be compiled with the board of ESP32.
#endif
#include <Arduino.h>
#include <EEPROM.h>
#include <esp_partition.h>
#include <AutoConnectCredential.h>
#include <string.h>
/**
* Retrieve saved credentials from eeprom partition.
* @param size Returns a size of the eeprom partition
* @return Retrieved data buffered pointer
*/
uint8_t* retrievePartition(const char* name, size_t *size) {
const esp_partition_t* eeprom = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, name);
if (!eeprom) {
Serial.printf("%s partition not found\n", name);
return nullptr;
}
uint8_t* pBuf = (uint8_t*)malloc(eeprom->size);
if (!pBuf) {
Serial.printf("Insufficient memory to retrieve %s partition\n", name);
return nullptr;
}
if (esp_partition_read(eeprom, 0, (void*)pBuf, eeprom->size) != ESP_OK) {
Serial.printf("Unable to read %s partition\n", name);
free(pBuf);
return nullptr;
}
*size = eeprom->size;
return pBuf;
}
/**
* Write credentials in retrieved buffer to Preferences.
* @param eeprom Retrieved data buffered pointer
* @param size Retrieved data size
*/
void convert(const uint8_t* eeprom, const size_t size) {
uint8_t* ac_credt = (uint8_t*)strstr((const char*)eeprom, "AC_CREDT");
if (!ac_credt)
Serial.println("AC_CREDT identifier not found in the partition.");
else {
AutoConnectCredential credential;
uint8_t* bp = ac_credt + sizeof("AC_CREDT") - sizeof('\0');
uint8_t* dp = bp;
uint8_t entries = *dp++;
size_t dpSize = *dp++;
dpSize += *dp++ << 8;
Serial.printf("%d stored credential(s),size:%d\n", (int)entries, dpSize);
// Start EEPROM to Preferences migration
uint8_t* ep = dp + dpSize - 1;
for (int ec = 1; dp <= ep; ec++) {
// Skip erased entry
while (*dp == 0xff) {
if (++dp > ep)
break;
}
if (dp > ep) // It reached at the end of the credential region.
break;
// Obtain each entry and store to Preferences
struct station_config config;
Serial.printf("[%d] ", ec);
uint8_t ei = 0;
do {
config.ssid[ei++] = *dp;
} while (*dp++);
Serial.print((char*)config.ssid);
ei = 0;
do {
config.password[ei++] = *dp;
} while (*dp++);
Serial.printf("(%s)", config.password);
for (ei = 0; ei < sizeof(config.bssid); ei++) {
config.bssid[ei] = *dp++;
Serial.printf(":%02x", config.bssid[ei]);
}
bool rc = credential.save(&config);
Serial.println(rc ? " transferred" : " failed to save Preferences");
}
}
}
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
size_t eepromSize;
uint8_t* eepromData = retrievePartition("eeprom", &eepromSize);
if (eepromData) {
Serial.println("Start migration to Preferences");
convert(eepromData, eepromSize);
Serial.println("Transfer ended");
free(eepromData);
}
}
void loop() {}

@ -0,0 +1,24 @@
## CreditMigrate.ino - A migration tool for the saved credentials
### Description
Since AutoConnect v1.0.0 for ESP32, the storage location in the flash of established credentials has moved from EEPROM to Preferences. After You update AutoConnect to v1.0.0, past credentials saved by v0.9.12 earlier will *not be accessible* from the AutoConnect menu - **Open SSIDs**. You need to transfer once the stored credentials from the EEPROM area to the Preferences area.
**CreditMigrate.ino** transports the credentials stored in EEPROM to the Preferences area to inherit them for AutoConnect v1.0.0 or later.
### Restrictions
- CreditMigrate.ino is only applicable to ESP32 boards. It cannot be executed with a compile error on the ESP8266 boards. (ESP8266 does not require credential migration.)
- CreditMigrate.ino will work properly with the installed ESP32 core version is 1.0.2 or earlier. (In ESP32 core 1.0.3, EEPROM area has moved from partition to the nvs. CreditMigrate.ino will not work properly with ESP32 core 1.0.3. ESP32 core 1.0.2 is recommended)
### Saved credentials migration procedure on your ESP32 board
1. Connect your host PC and ESP32 module with serial and start Arduino IDE.
2. Confirm that the version of the ESP32 core currently installed via the board manager of ArduinoIDE is 1.0.2 or earlier.
3. Open **CreditMigrate.ino** as a sketch in the examples of the AutoConnect library folder.
4. From the Arduino IDE menu: **Tools > Board:** to select the one that matches your ESP32 board and set it up.
5. Open the serial monitor of Arduino IDE.
6. From the Arduino IDE menu: **Sketch > Upload** to compile and upload the sketch.
7. It will transport the past credentials that had been stored in EEPROM to Preferences. You can confirm the result on the serial monitor.
<img src="../../mkdocs/images/creditmigrate.png">

@ -25,6 +25,6 @@
"espressif8266", "espressif8266",
"espressif32" "espressif32"
], ],
"version": "1.0.0", "version": "1.0.1",
"license": "MIT" "license": "MIT"
} }

@ -1,5 +1,5 @@
name=AutoConnect name=AutoConnect
version=1.0.0 version=1.0.1
author=Hieromon Ikasamo <hieromon@gmail.com> author=Hieromon Ikasamo <hieromon@gmail.com>
maintainer=Hieromon Ikasamo <hieromon@gmail.com> maintainer=Hieromon Ikasamo <hieromon@gmail.com>
sentence=ESP8266/ESP32 WLAN configuration at runtime with web interface. sentence=ESP8266/ESP32 WLAN configuration at runtime with web interface.

@ -1,3 +1,6 @@
#### [1.0.1] Sept. 13, 2019
- Added a sketch for ESP32 boards that migrates credentials stored in EEPROM partition to the Preferences.
#### [1.0.0] Sept. 7, 2019 #### [1.0.0] Sept. 7, 2019
- Supports Arduino core for ESP32 1.0.3. - Supports Arduino core for ESP32 1.0.3.
- Supports AutoConnectUpdate for the [OTA update](otaupdate.md). - Supports AutoConnectUpdate for the [OTA update](otaupdate.md).

@ -5,6 +5,15 @@ For AutoConnect menus to work properly, call [*AutoConnect::handleRequest()*](ap
See also the explanation [here](basicusage.md#esp8266webserver-hosted-or-parasitic). See also the explanation [here](basicusage.md#esp8266webserver-hosted-or-parasitic).
## <i class="fa fa-question-circle"></i> After updating to AutoConnect v1.0.0, established APs disappear from Open SSIDs with ESP32.
Since AutoConnect v1.0.0 for ESP32, the storage location in the flash of established credentials has moved from EEPROM to Preferences. After You update AutoConnect to v1.0.0, past credentials saved by v0.9.12 earlier will *not be accessible* from the AutoConnect menu - **Open SSIDs**. You need to transfer once the stored credentials from the EEPROM area to the Preferences area.
You can migrate the past saved credentials using [**CreditMigrate.ino**](https://github.com/Hieromon/AutoConnect/tree/master/examples/CreditMigrate) which the examples folder contains.
!!! info "Needs to Arduino core for ESP32 1.0.2 or earlier"
EEPROM area with arduino-esp32 core **1.0.3** has moved from **partition** to the **nvs**. CreditMigrate.ino requires arduino-esp32 core **1.0.2** or earlier to migrate saved credentials.
## <i class="fa fa-question-circle"></i> An esp8266ap as SoftAP was connected but Captive portal does not start. ## <i class="fa fa-question-circle"></i> An esp8266ap as SoftAP was connected but Captive portal does not start.
Captive portal detection could not be trapped. It is necessary to disconnect and reset ESP8266 to clear memorized connection data in ESP8266. Also, It may be displayed on the smartphone if the connection information of esp8266ap is wrong. In that case, delete the connection information of esp8266ap memorized by the smartphone once. Captive portal detection could not be trapped. It is necessary to disconnect and reset ESP8266 to clear memorized connection data in ESP8266. Also, It may be displayed on the smartphone if the connection information of esp8266ap is wrong. In that case, delete the connection information of esp8266ap memorized by the smartphone once.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Loading…
Cancel
Save