-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFi not working most of the time / ESP restarting each few seconds #709
Comments
Update: startmqtt --------------- CUT HERE FOR EXCEPTION DECODER --------------- Soft WDT reset Exception (3): LoadStoreError: Processor internal physical address or data error during load or store
ctx: cont 0x40107c7a in EspSoftwareSerial::UARTBase::write(unsigned char const*, unsigned int, EspSoftwareSerial::Parity) at ??:? --------------- CUT HERE FOR EXCEPTION DECODER --------------- Continued debugging and found out that following function in CIO_4W.cpp is causing the problem: If i comment the line in the function, restart problem is gone. Any idea what the problem is here and how to fix this? |
Some bugs like memory and interrupts are hard to trace. Both are highly possible here. It says software wtd which indicates something took too long before releasing control to the OS. Then it complains about a memory operation. Memory errors (out of, corrupt etc) can appear to disappear when you make an insignificant change to the code which leads you to suspect a certain line. I don't say it's not that code, but it's a simple instruction that in itself doesn't take any time in this context. If you want you can add a ESP.feed() before the instruction. If it helps it may be a solution OR we just moved the real issue to where it doesn't hurt as much. |
Ok, thx for your answer. |
See if latest dev branch is working for you |
Sorry for the delay, took a while to be able to try this. Anyway i installed 4.3.1 now and it's working much better now, thx a lot for this. Sometimes i experienced that the pump is stopping for a few seconds and then autoamtically starting again. Need to gain more experiences however with this version until i can reliably say more. |
Just installed v4.4.1. |
Sorry, I can't tell why. It works for me and at least a few others. I uploaded a new dev version now that took care of WDT resets after wifi drop outs. Don't know if that will help but worth a try. |
Thx, i tried now with latest dev branch with following outcome: See below the bootlog.txt file: |
can you post a screenshot of main page? |
The NTP seems to have failed. It says 1970... |
Also the rssi is a bit low. Could possibly be a factor. |
I think that's because of the frequent rebootings. |
Sometimes it works if you make a clean build in platformio. Also restart your router. |
Can you explain what has been changed from firmware "2024-07-15-1308" in comparison to the master branch version "2024-07-18-0900" of today? I installed 2024-07-18-0900 today, and everything seems to be smoothly working now. Had no restarts now for ~25 minutes (earlier i had each ~15 seconds) and the web interface also seems to be much more responsive. I will check this further, but already big thanx for your work! |
It's crazy. |
Is there a way to 'deactivate' the NTP getting time stuff completely? |
Better to run it on the bench and see the serial monitor |
The problem is when running without powering the pump with 230v the reset don't seem to happen |
Check if you have any shorts between solders. Flux can sometime make a connection. |
Stale issue message |
Describe the bug
Built the project (everything soldered to the pump unit now), however i couldn't get a stable WiFi connection. Sometimes the Webinterface can be accessed, but most times is wasn't working. Also when i ping the ESP i always get errors. I thought the problem is the WiFi connection, but even if i put the device 2 meter beside the router the WiFi connection still doesn't work reliably.
Then checked the WiFi router logging and there i saw that the connection is dropping each ~15 seconds. So i checked the Terminal in VisualStudio Code which seems to be showing that the ESP8266 is restarting for any reason about each 15 seconds. So i guess the WiFi itself isn't even the problem, but for any reason the ESP is constantly restarting.
Terminal log:
Start
WiFi > using WiFi configuration with SSID "mywifinetwork"
WiFi > Trying to connect ...got IP: 192.168.1.88
start NTP
............WS IRamheap 6216
IRamheap 4968
startmqtt
Failed to read mqtt.json. Using defaults.
192.168.1.88
End of setup()
37016
␔#-a|(␕␗�P␚v␛X�
hu␗Xh 4!$v'��r(␑,;,#A␑␑@�␕4nzAl )z�~,: �r(␗%␑�@#A.�,4nzA, )z�~,PZ8�~,PZ�P,U/4/'�rf cal sector: 1020freq trace enable 0
rf[112] : 0�
Start
4�-a|(␕␗�P␚v␛X�>h
u␗Xh 4!�$v'��r(␑,+,#A␑␑@�␕4nzAl )z�,j �2(␗%␑␙@#A.�:,4nzAl )z�~,PZ8�~,PZ�P,�/4/'�rf cal sector: 1020freq trace enable 0
rf[112] : 0�
Start
4#-a|(��r�dNX�
hu␗Xh 4!5$v'��r(�,+,#A␑␑@�>�4nzAl )z�~,j �r(␗%␑␙@�A.�,4nzAl )z�~,PZ8�~,PZ�P,U/4/'�rf cal sector: 1020freq trace enable 0
rf[112] : 0�
Start
WiFi > using WiFi configuration with SSID "mywifinetwork"
WiFi > Trying to connect ...got IP: 192.168.1.88
start NTP
............WS IRamheap 6216
IRamheap 4968
startmqtt
Failed to read mqtt.json. Using defaults.
192.168.1.88
End of setup()
37016
4�-a|(␕␗�P␚v␛X�
hu␗Xh 4!$v'��r(␑,+,#A␑␑@�␕4nzAl )z�~,* �r(␗%␑␙@#A.�,4nzAl )z�~,PZ8�~,PZ�P,U/4/'�rf cal sector: 1020freq trace enable 0
rf[112] : 0�
Start
WiFi > using WiFi configuration with SSID "mywifinetwork"
WiFi > Trying to connect ...got IP: 192.168.1.88
start NTP
............WS IRamheap 6216
IRamheap 4968
startmqtt
Failed to read mqtt.json. Using defaults.
192.168.1.88
End of setup()
37016
4#-a|(␕␗�P␚v␛X�
hu␗Xh 4!$v'��r(␑,+,#A␑␑@�*�4nzAl )z�~,j �r(␗%␑␙@�A.�,4nzAl ):�~,PZ8�~,PZ�P,U/4/'�rf cal sector: 1020freq trace enable 0
rf[112] : 0�
Start
Expected behavior
Working WiFi / ESP not resetting itself each ~15 seconds
Hardware (please complete the following information):
Software (please complete the following information):
Additional context
I'm trying to do some debugging. All of the following things didn't help:
-Change CPU speed 80 / 160mhz
-WiFi.setAutoReconnect(false);
-Comment all ESP.restart() lines in the code
-Powering the ESP directly from USB
What did help is commenting the 2nd line here (of course the pump cannot be controlled then).
Then no restarts are done anymore, so the problems comes from here:
// Fiddle with the pump computer
bwc->loop();
Checked this function deeper, in that one the restarting problem is caused by this line:
cio->handleToggles(); //transmits to cio if serial received from dsp
Again if this one gets commented, the ESP is not restarting anymore. Any help is very appreciated, i guess this could be the same as issues:
#672
#466
#504
The text was updated successfully, but these errors were encountered: