Nova modem with uBlox u-201 (AT&T) running on Pi Zero 1.3 with 3 Amp power supply on V10 of Buster and most recent Hologram Python API as of April 24 2020
For the past 9 months I have successfully been running this pseudo code in python 2.7 and python 3:
hologram.openReceiveSocket()
loop until message comes in
process message
hologram.closeReceiveSocket()
hologram.sendMessage( json, topics)
send response
hologram.openReceiveSocket()
loop until message comes in
over the past 2 months I am suddenly getting a “Failed to listen socket” when opening the receive socket again. The only way around it is to tear down the stack, reset the modem via command line and re init the Hologram API.
If I keep trying to open the receive socket without a modem reset it will open in about five attempts but then receiving a message is hit or miss. The socket seems to be unstable at this point and the only fix is to do a command line reset to fix the issue.
Has anyone else seen this? If yes, do you have a better algorithm that does not involve calling a command line reset of the modem?