alidonet / GC97_ESP

GC97 meter via ESP8266
MIT License
8 stars 2 forks source link

problem saving settings #6

Closed syrusfem closed 5 months ago

syrusfem commented 6 months ago

The ESP 8266 webpage did not save settings ,if i insert the connection credentials to a wireless lan the board did connect to it but upon reboot all settings are lost, the board is disconnected from the weireless lan and it is accessible only on the initial AP . The problem is replicated on multible esp 8266 board and with the last FW.

alidonet commented 5 months ago

Hello @syrusfem Do you have a chance to check the COM-port logs? Are you sure about losing all settings, or we are talking only about the Wi-Fi credentials?

syrusfem commented 5 months ago

i'll try torecover com logs and post there, for the settings yes, all settings are lost between reboot or power loss.

Here are logs of a session, started, connected to AP, inserted WiFi settings , acquired WiFi IP and confirmed i could connect to che WiFi ip page, done a reboot and lost settings.

[cut]

* GC-97 meter // ESP8266 [ver.231022.pl, built: Oct 22 2023 15:44:49]
* (C) Alexander Domanov, 2021-2023.
Reading options: found ver. 0, expected: 2, using predefined.
Access Point 'GC97-1044AB' started (IP: 192.168.4.1, MAC: A0:20:A6:10:44:AB)
(!) WiFi credentials (SSID) is not specified.
Starting web-server... OK
Ask GC97 data...w3�w3�w3�No reply
Uptime 0.00:00:01 [v] AP [x] Wifi [v] Web [x] OTA [x] MQTT [x] GC97
Done. Started in 0.00:00:01
w3�w3�w3�w3�w3�w3�w3�w3�w3�Uptime 0.00:00:29 [v] AP [x] Wifi [v] Web [x] OTA [x] MQTT [x] GC97
w3�w3�w3�w3�w3�w3�w3�w3�w3�Uptime 0.00:00:59 [v] AP [x] Wifi [v] Web [x] OTA [x] MQTT [x] GC97
w3�w3�w3�w3�w3�w3�Request '/get/all.json': 891 bytes sent without caching
w3�w3�w3�Uptime 0.00:01:29 [v] AP [x] Wifi [v] Web [x] OTA [x] MQTT [x] GC97
Request '/get/all.json': 891 bytes sent without caching
w3�w3�w3�Request '/get/all.json': 891 bytes sent without caching
w3�w3�w3�Request '/get/all.json': 891 bytes sent without caching
w3�w3�w3�Uptime 0.00:01:59 [v] AP [x] Wifi [v] Web [x] OTA [x] MQTT [x] GC97

let me know if i could do some other tests .

syrusfem commented 5 months ago

Ok, i mark tis "issue" as closed, i resolved it upgrading the FW from the board webpage , now i don't lost settings between reboots. I think something went wrong on my PC with initial flashing but flashing from the webpage once connectet to che WiFi corrected the problem.

Thanks for the support, and let me say, great project! now i'll go on with integrating battery monitoring with homeassistant.

alidonet commented 5 months ago

As I can see, there wasn't saved any options before. So, yes, very probably it was a problem with FW. Thank you to catching this up and solve by yourself :)

syrusfem commented 5 months ago

thanks, i am searching on youtube for correct connection of the board, if i could ask this scheme is correct? 9

alidonet commented 5 months ago

@syrusfem Yes, looks like the right one. Please be sure that voltage is not higher than 3.3V, connected to ESP (5V is by default for the regular USB). Use can use the cheap and tiny DC-DC block and place it inside the GC97 box next to ESP as well. And also, for the connection with ESP board, very often need to shortcut the smd resistance 2.2KOm, that right below the "Vdd" point. Otherwise, it can't work properly but fine with other type of connections, like PC via adapters.

syrusfem commented 5 months ago

Thnks...last question and sorry if i use this thread but it is the only way toi contact you: after connecting the esp8266 to the GC97 i have a "wrong package header" on the connection status of the webpage, i have already shorted the ressitance as for instruction and tried to switch TX and RX but to nop avail. this is the serial log.

[cut]

alidonet commented 5 months ago

@syrusfem No problem. The message "Wrong package header" means that the data, received from the GC97, have an unexpected header with unknown signature. I'll try to compile the version with debug logs, related to the GC97 connection.

alidonet commented 5 months ago

@syrusfem Check this one: GC97_ESP.debug.gz

syrusfem commented 5 months ago

i feel as an idiot: powering on the boad to update it with your firmware sesulted in a working system, with the same old fw and connections, i think i have done some bad soldering or i have a bad esp (it is probably the soldering ) so...sorry for the waste of time and i hope i did not disturb you too much. Now i must attach it to the battery but if something goes wrong i could redo all with a different board or solder point. Again thanks for all the support and happy holidays! immagine

alidonet commented 5 months ago

@syrusfem I'm happy to see that everything is OK. I also want to have the working FW without any serious issue, so the feedback is very important for me. Feel you free to ask about anything, related to that project. Good luck! 😎