Comments (8)
Hi,
You too?!, I've been working on a similar issue in recent weeks. I am not every time but if I missed erase_flash sometimes the module behaves wrong. In my case, it happens at the moment of loading the program from flash. That's why I can not diagnose the problem yet.
some variables for wifi network are stored in program memory?
AutoConnect saves the credentials to EEPROM only. AutoConnect writes the SSID and password to the EEPROM when the connection is successful. If the partition of EEPROM is misaligned, it may crash.
https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#flash-layout
Is the flash layout changed with esp8266 core 2.5.0 Upstream & Update SDK?, I will check.
Can you take logs of AutoConnect, Page Builder and esp8266 core? I can start P.D. with it as a clue.
I always let you do the analysis ...Thank you! :)
from autoconnect.
isn't it possible to write the data to a config file in spiffs, so it wouldn't over write, or if you which to use eeprom, write it at the end of eeprom.
I try to reproduce the problem and turn on debugging.
from autoconnect.
i'm looking to store my custom variables in eeprom, but you use eeprom to for saving wifi creditionals.
could the problem come from this.
i'm trying to find where the eeprom is stored in the program, is this at the end of the programm, or is it at the end of all memory ?
if it is at the end of the program, then that is problaly your problem, if a program has a different size, the data is overwritten and there by corrupt.
if not, can i also make use of the eeprom ?
from autoconnect.
or perhaps, you don't alocate enough memory for eeprom ?
from autoconnect.
@ageurtse I apologize for my poor English and hope that my reply gets through to you.
i'm trying to find where the eeprom is stored in the program, is this at the end of the programm, or is it at the end of all memory ?
The EEPROM area is located between File System and SDK reserved area and depends on the partition table defined in the Arduino core. At first, please refer to this document to share my views with you.
if it is at the end of the program, then that is problaly your problem, if a program has a different size, the data is overwritten and there by corrupt.
The EEPROM start address is defined by the SDK and is located by the EEPROM library of the arduino core.
_SPIFFS_end
& SPI_FLASH_SEC_SIZE
Is your doubt is probably this?
Move the saving area of EEPROM for the credentials
As the esp8266 document shows, the SDK uses the backward of the EEPROM area. If AutoConnect destroys the SDK reserved area to save the credentials, your expected scenario will be possible. The data structure of the credential storage is variable length, and it is a maximum of 104 bytes per one entry. In addition to this, it has the number of saved entries at the beginning of the area and the area identifier. Please refer to the EEPROM data structure for the credential saving in the chapter the FAQ for details.
If this entry structure is destroyed by confliction with the user sketch using, AutoConnect might save the credentials to the misplaced location which may also be the reserved area of the SDK. So, to avoid this, I applied the following two measures.
-
Move the credential saving area.
With the boundaryOffset option of AutoConnectConfig, the sketch can move the credentials saving area. The boundaryOffset specifies the gap from the head of EEPROM. As a result, its size becomes a freely usable area with sketches.
boundaryOffset (Default = 0x00)
v
|--------------|-------|---------------|--|--|--|--|--|
^ ^ ^ ^ ^
Sketch OTA update File system EEPROM WiFi config (SDK)
-
Check the identifier before save.
AutoConnect checks the identifier of the head of credential are in the EEPROM before saving. If no identifier is found, AutoConnect will not save the credentials.
But still there is a possibility that AutoConnect will destroy that area. AutoConnect will save a credential each time a connection establishment for the AP and reuses the EEPROM area by overwriting the same SSID of a BSSID. Even if the SSID is the same and the BSSID is different, it will be appended to the area. There is a possibility of destroying the SDK reserved area at the backward by the credential appending. It will occur at the number of saved entries greater than 40.
You can use the ESPShaker to dump the EEPROM. If you can the EEPROM dump with eeprom command of the ESPShaker, I can proceed with the problem analysis. Can you try? or Do you have something to dump tool for EEPROM?
from autoconnect.
Also, the cause of my side was from the breadboard. It caused current leakage.
I wrestled with the oscilloscope until reached the cause, but in the end, I replaced the breadboard into a new one, so the problem has not happened so far.
from autoconnect.
working on a new sketch for my ac dimmer project, stil no problem with reflashing.
So i think it is solved, for me this could be closed.
from autoconnect.
I'm glad the problem was solved.
from autoconnect.
Related Issues (20)
- ESP32 problem HOT 8
- Mqtt Example HOT 2
- Using "AutoConnectCore.h" header and running into errors HOT 2
- AutoConnect to offer captive portal for 5min even if ESP32 is WiFi-Connected HOT 1
- AutoConnect on WiFi connection error shows too many redirects. HOT 2
- AutoConnectCore Not Working HOT 1
- Failing to store network HOT 2
- AutoConnect not longer runningh on ESP8266 HOT 2
- Use Autoconnect library with ESP now HOT 1
- Issue after updating libraries in my PIO project: enableCors() HOT 2
- Strange Issue
- WiFiClientSecure is not working with AutoConnect HOT 1
- how to use esp8266 with WiFiClientSecure
- AutoConnectPageImpl.hpp:1001:20: error: there are no arguments to 'spi_flash_get_chip_size' that depend on a template parameter, so a declaration of 'spi_flash_get_chip_size' must be available [-fpermissive] HOT 2
- Save data from Custom Page to flash HOT 2
- esp32: frozen loop() and kicked out of the WiFi connection at Configure new AP
- WPA2 Enterprise support
- Captive portal cause watchdog triggering
- Possibility to change pass for SoftAP from webui.
- Fresh Install and even the simplest of code will not compile HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoconnect.