I’m using the Hologram python SDK on a Raspberry Pi with a Hologram Nova. I was wondering what the best way to determine if the modem has gained cellular connectivity via software is. I know in previous versions of the SDK the line
hologram = HologramCloud(dict(), network=‘cellular’)
would throw an exception that I could catch if the modem is unable to connect. However, the newest version of the SDK no longer seems to do this for me. Currently, even if there is no connectivity, my python script will continue after the declaration.
When trying this sample script for Hologram’s GitHub: hologram-python/example-send-msg.py at develop · hologram-io/hologram-python · GitHub
If the script is started before the red network LED begins flashing on the Nova indicating network connectivity, the above sample script will send a message with an unknown response code. However, if I run the script after the red LED begins flashing on the Nova, the message will typically send successfully and I can see the message on the dashboard. Is there a software way to determine when the modem has connectivity?