I tried a cm radio off and then a cm radio on but that didn’t fix the issue. The single strength reported as week, 1, but it had attached to the network, first T-Mobile then AT&T. What I found interesting was that cm data reported as connected even after executing cm radio off.
So without knowing what happened its difficult to give you a hard solution
What I would say is that the backstop for detection is that if the application is not seeing data going out/coming in as expected then it needs to take some corrective action. There needs to be some form of (for want of a better phrase) network/connection manager checking it has something up and workable, if there isn’t then it needs to do something, with a reboot being the ultimate. You could always build in a reboot every 24 hours if you can live with the consequences (power/time/down time) which isn’t very subtle/technical but will definitely keep you up and running in a very simple way.
A properly hard reset involves pulling the RESET line low, this is intended for exceptional operation where it has really all gone wrong, if this is the case then its unlikely that the application will have survived to be able to trigger it.
If you are just going to reset the unit every 24 hours then you can just send a ‘reboot’ to the terminal which will cause the whole unit to restart.
If it is just this scenario you are looking at you might be better off checking the connectivity periodically with a ping or something and then if it has failed either do the unit reboot or restart the radio by sending at+cfun=0 then at+cfun=1 over /dev/ttyAT.
I could not really find a reset/reboot API to do this, there probably is one somewhere.