You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently looked into a way to solve something in the Arduino Cloud library where after the OPTA loses its internet connection, the product stops working completely, that is, the program that was running inside the product freezes until the internet comes back on.
In my opinion, this is a big problem. If we have a critical application and the product loses its internet connection, this is a problem. It turns out that when the product loses its internet connection, it enters an infinite reconnection loop and this prevents the OPTA from continuing to perform its functions. Remember that this happens for both the Core M7 and the M4. I also tested several methods within the programming to "bypass" this, but I was unsuccessful.
Is this a bug or is there already a possible fix?
The text was updated successfully, but these errors were encountered:
It turns out that when the product loses its internet connection, it enters an infinite reconnection loop
This is expected, ArduinoIoTCloud tries to re-connect to keep in sync variables with the cloud, the loop should stop as soon as internet connection comes back
this prevents the OPTA from continuing to perform its functions
Could you please elaborate a bit more on this, the connect action is a blocking call, so while trying to re-connect the sketch loop can't run. As soon as connect() call fails or succeed user loop code is executed and after this the library tries to connect again.
Are you using ethernet or wifi? which mbed core version?
Hello!
Thank you for your reply! I am using the latest version available as of today, 11/26/2024.
I am using both Ethernet and Wi-Fi, but both connection methods exhibit this behavior.
I understand your answers, but is there any way to solve this? Is there a different method or is it really a condition imposed by the library and there is no solution?
For Wi-Fi we have recently made some changes to improve this situation. After arduino/ArduinoCore-mbed#962 WiFi.connect() should block for max 7 seconds. You might want to trim this timeout more using WiFi.setTimeout() arduino/ArduinoCore-mbed#976 . The risk is reducing too much the timeout the board will not be able to join the WiFi network.
I recently looked into a way to solve something in the Arduino Cloud library where after the OPTA loses its internet connection, the product stops working completely, that is, the program that was running inside the product freezes until the internet comes back on.
In my opinion, this is a big problem. If we have a critical application and the product loses its internet connection, this is a problem. It turns out that when the product loses its internet connection, it enters an infinite reconnection loop and this prevents the OPTA from continuing to perform its functions. Remember that this happens for both the Core M7 and the M4. I also tested several methods within the programming to "bypass" this, but I was unsuccessful.
Is this a bug or is there already a possible fix?
The text was updated successfully, but these errors were encountered: