-
Notifications
You must be signed in to change notification settings - Fork 108
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
Random hangs [Arduino UNO WiFi REV2] #106
Comments
Think it is the same as: #103 Tip for your Watchdog: void TimerCallback0(void)
{
if( (millis() - watchdogTimerMillis) > WD_TIMEOUT )
{
Serial.println("WD ALARM - going for Reset soon!");
} else {
Watchdog.reset();
}
} Now in your Main loop call: void wdReset()
{
watchdogTimerMillis = millis();
} This allow for a 2 Minute watchdog. |
I am not seeing WiFi hangs, but rather corrupt data! |
@roberthartung: |
Well it linked to my comment before, that's why I was clarifying. And your issue is "unstable wifi" not "random disconnects" ;) |
Was my fault using the link from the e-mail notification. You are right and I fixed this. Hope they find the issue soon, think your intput is very valuable. |
With the watch dog disabled this test script will hang forever when the problem happens, so it's not just that the connect is taking a long time. In fact the Connecting to Wi-Fi... text is never printed, so I believe it hangs somewhere else. I think this should be investigated separately for now. |
I have the same problem with MKR1010. When the wifi router gone away, the void ServerDrv::startClient(uint32_t ipAddress, uint16_t port, uint8_t sock, uint8_t protMode) the problem is pointing to these three function: SpiDrv::spiSlaveDeselect();
//Wait the reply elaboration
SpiDrv::waitForSlaveReady();
SpiDrv::spiSlaveSelect(); The waitForSlaveReady() including an infinite loop on |
I added a comment to issue #18 where you can reproduce a similar hanging issue by trying to ping an IP address for a host that is offline. This reproduces reliably for me on a mkr wifi 1010. |
Something else I've observed is that pinging the arduino from an external source will cause the hangs. This is easily reproduced:
|
I have similar problem. I have Uno WiFi rev 2 automation sends ssl request every 30 sends and controlled using web server. WiFinina is used for both. After 10 hours or sometimes less ssl http requests stop an web server no longer accepts connections. |
I updated the library to 1.7.1 and firmware to 1.4.1 to see if this has been improved with the recent fixes. Now the test code in my orginal post behaves like the connection to the server is never closed. This did not occur with library 1.7.1 + firmware 1.3.0. |
This is related to #207 |
Library version: 1.5.0
Firmware version: 1.3.0
I've been stability testing by sending one HTTP get request per second, and I see random hangs after everything from 5 to 1000 requests. The whole Arduino freezes, so looks like it happens in one of the WiFiNINA library functions.
Full test code is attached. server and port must be set to a server that responds to HTTP get requests, e.g. hosting a simple index.html with python -m SimpleHTTPServer.
The test code outputs a period on every new connect and a dash when the previous connect hasn't been completed yet. One hundred statuses per line.
Here's example output from an early hang (5 requests):
You can also enable the watchdog to force a reset if you want to see how stable it is over time. Note that it will just reboot forever if connect takes longer than 8 seconds. There really should be a non-blocking version of this library...
This might be a firmware issue but even so the library shouldn't hang so I'm posting it here first.
Code: stability.txt
The text was updated successfully, but these errors were encountered: