I have a Boron 404X running in a location that I don't have easy physical access to. I've programmed it to detect loss of cloud access and if gone for more than an hour I call System.reset(RESET_NO_WAIT);
It's been running for many months working fine, and having a couple of cloud losses a day on average eventually reconnecting to the cloud. It does the job.
However, a month or so ago it stopped reconnecting and when I eventually had an opportunity to travel to it, I found the modem had stopped responding even after a System.reset(RESET_NO_WAIT);
See a section of trace (I don't have the full trace leading up to the lockup):
Opening serial monitor for com port: " /dev/ttyACM0 "
Serial monitor opened successfully:
0000005144 [ncp.client] TRACE: Modem is not responsive @ 460800 baudrate
0000005145 [ncp.at] TRACE: > AT
0000006145 [ncp.at] TRACE: > AT
0000006328 [app] INFO: PROGRAM STARTUP
0000006337 [app] INFO: *** U-Blox START ***
0000006674 [app] INFO: USB Power ->1
0000007146 [ncp.at] TRACE: > AT
0000008147 [ncp.at] TRACE: > AT
0000009148 [ncp.at] TRACE: > AT
0000010149 [ncp.client] TRACE: Modem is not responsive @ 115200 baudrate
0000010150 [ncp.client] ERROR: No response from NCP
0000010150 [ncp.client] TRACE: Setting UART voltage translator state 0
0000010150 [ncp.client] TRACE: Hard resetting the modem
0000010350 [net.pppncp] TRACE: NCP event 3
0000010351 [net.pppncp] TRACE: NCP power state changed: IF_POWER_STATE_POWERING_UP
0000010351 [system.nm] TRACE: Interface 4 power state changed: 4
0000010352 [net.pppncp] ERROR: Failed to initialize cellular NCP client: -210
0000010452 [ncp.client] TRACE: Powering modem on, ncpId: 0x47
0000010453 [ncp.client] TRACE: Modem already on
0000010453 [net.pppncp] TRACE: NCP event 3
0000010453 [net.pppncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000010454 [system.nm] TRACE: Interface 4 power state changed: 2
0000010454 [ncp.client] TRACE: Setting UART voltage translator state 1
0000010554 [ncp.client] TRACE: Setting UART voltage translator state 0
0000010654 [ncp.client] TRACE: Setting UART voltage translator state 1
0000011656 [ncp.at] TRACE: > AT
0000012657 [ncp.at] TRACE: > AT
0000013658 [ncp.at] TRACE: > AT
0000014659 [ncp.at] TRACE: > AT
0000015001 [app] INFO: NOT Connected! TowerLosses 1 (disc for 0.1 mins)
0000015660 [ncp.at] TRACE: > AT
0000016661 [ncp.at] TRACE: > AT
0000017662 [ncp.at] TRACE: > AT
0000018663 [ncp.at] TRACE: > AT
0000019664 [ncp.at] TRACE: > AT
0000020665 [ncp.at] TRACE: > AT
0000021667 [ncp.at] TRACE: > AT
0000022667 [ncp.at] TRACE: > AT
0000023668 [ncp.at] TRACE: > AT
0000024669 [ncp.at] TRACE: > AT
0000025670 [ncp.at] TRACE: > AT
0000026671 [ncp.client] ERROR: No response from NCP
0000026672 [ncp.client] TRACE: Setting UART voltage translator state 0
0000026672 [ncp.client] TRACE: Hard resetting the modem
0000026872 [net.pppncp] TRACE: NCP event 3
0000026873 [net.pppncp] TRACE: NCP power state changed: IF_POWER_STATE_POWERING_UP
0000026873 [system.nm] TRACE: Interface 4 power state changed: 4
0000026874 [net.pppncp] ERROR: Failed to initialize cellular NCP client: -210
0000026973 [ncp.client] TRACE: Powering modem on, ncpId: 0x47
0000026974 [ncp.client] TRACE: Modem already on
0000026974 [net.pppncp] TRACE: NCP event 3
0000026974 [net.pppncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000026975 [system.nm] TRACE: Interface 4 power state changed: 2
0000026975 [ncp.client] TRACE: Setting UART voltage translator state 1
0000027075 [ncp.client] TRACE: Setting UART voltage translator state 0
0000027175 [ncp.client] TRACE: Setting UART voltage translator state 1
0000028176 [ncp.at] TRACE: > AT
0000029177 [ncp.at] TRACE: > AT
0000030002 [app] INFO: NOT Connected! TowerLosses 1 (disc for 0.4 mins)
0000030178 [ncp.at] TRACE: > AT
0000031179 [ncp.at] TRACE: > AT
0000032180 [ncp.at] TRACE: > AT
etc....
A full power off reset cured the problem - the Boron connected to a tower and cloud within 10 seconds.
Your previous reply states that I should wait 10 minutes after a cloud loss before attempting to reconnect. I use SYSTEM_THREAD(ENABLED); and
SYSTEM_MODE(AUTOMATIC); It automatically tries to reconnect immediately. Should I not use AUTOMATIC mode and take control myself to do that delay?
I've now implemented the following watchdog reset method instead of using System.Reset. I've tested it and it resets the Boron correctly, I have no way of reproducing the modem lockup problem previously seen.