Expandable-6-Channel-ESP32-Energy-Meter icon indicating copy to clipboard operation
Expandable-6-Channel-ESP32-Energy-Meter copied to clipboard

esp32 wroom 32d loosing configuration details

Open yn1v opened this issue 2 months ago • 0 comments

I have downloaded the repo and instelled Arduino IDE 1.8 with spiffs upload tool. Downloaded the libraries required and build the firmware. Upload the firmware and data folder to the esp32 and apparently it was working. I was able to calibrate some CT, connect to wifi network and report data to EmonCMS local server.

This setup include one main board plus two expansion board, with 17 CT.

Then after some time it lost connection to wifi network. It becase erratically offering its own AP and desconnecting. I unplugged power and connected to serial monitor. The nodemcu was not coonecting to the wifi and rebooting after some seconds. After some testing found out that waiting for 5 or 10 minutes it stabilize and I able to connect. But it has lost all settings: AP SSID and password; emoncms server, nodename and API key; and also values for CT calibration were reverted to default.

I have tested this with a esp wroom 32u and an external antenna with same results. Changed main board and expansion board. I even tested with a wroom without main board which I did not connect to Emoncms, but lost settings all the same.

I moved to work with platformio and was able to upload firmaware and data spiffs. But at the end have the same result. Al configuration is lost.

I can upload some esphome setup and plain micropython and the nodemcu boots. But i haven´t been able to used the binaries (firmaware and spiffs) on releases section of this repo to make it work with esptool.

sudo esptool --port /dev/ttyUSB0 erase_flash
sudo esptool --port /dev/ttyUSB0 write_flash 0x10000 EmonESP_6_chan_v2.5.7.bin 0x290000 EmonESP_6_chan_spiffs_v2.5.7.bin

I use a serial monitor to see what the nodemcu is doing, and it always ends up with headers errors and not booting. It is like I am missing something like a bootloader or I have wrong the memory addresses.

Other thing that I tried was to use the release file from the repo and do an OTA overwriting de firmware that I have built. Same results.

I am not sure what else I can try to find out what it is happening.

Thanks in advance for any help

yn1v avatar Apr 17 '24 17:04 yn1v