Hi,
I'm hoping for some help on how to maintain a reliable WiFi connection as I'm really struggling. First some context:
- MKR WiFi 1010: 2 bought within the last few weeks, both upgraded to 1.5.0,
- Using MKR 485 for Modbus connectivity
- Libraries:
- Scheduler - To help with multiple processes. I've avoided
delay(...)in all my code, but many of the Arduino libraries use it but I seeyield()is called in the delay loop so should avoid blocking, - ArduinoModbus,
- Arduino_ConnectionHandler,
- WiFiNINA,
- coap-simple.
- Scheduler - To help with multiple processes. I've avoided
- Router: tested on a BT Connect Hub and Google WiFi Pro Mesh... occurs with both.
Symptoms:
When running after an indeterminate amount of time (could seconds, could be hours) I get the following from the Arduino_ConnectionHandler library:
[DBG_INFO ] WiFi.status(): 255
[DBG_ERROR ] WiFi Hardware failure.
At this point it seems the WiFi connection is unrecoverable, even when I use WiFi.end() and start reconnecting from scratch. My only option seems to be a NVIC_SystemReset which, frankly, smells!
I wondered if it was my Sketch causing this so I tried the one from Connecting to WiFi Network tutorial with added:
void printCurrentNet() {
Serial.print("Status: ");
Serial.println(WiFi.status());
// ... other code unchanged
This also exhibits the same issue.
Any thoughts?