sendSMS - occasional "Failed to disconnect from cell network"


I am using a NovaM R410M modem with a Raspberry Pi.
Latest Hologram libraries and OS is also up to date.

The below work 90% to send an SMS, but sometimes fails with the error “Failed to disconnect from cell network”

recv_s = hologram.sendSMS(number, message)
response_message = hologram.getResultString(recv_s)'RESPONSE MESSAGE: ’ + response_message)

2020-02-09 06:51:37,272 Connecting to:
2020-02-09 06:51:37,273 Port: 9999
2020-02-09 06:51:38,187 Connect socket is successful
2020-02-09 06:51:40,190 Sending message with body of length 79
2020-02-09 06:51:50,215 Disconnecting from cell network
2020-02-09 06:51:50,216 Failed to disconnect from cell network

What could be causing this?


Any update here?

SendSMS() has an error rate of app. 10%
Looks like a timeout issue.

Is there a way to increase the timeout?
SendMessage() has the options to specify a timeout and sendSMS() is using sendMessage(), but has no such option.


I think you can ignore that error message. It looks like the message was sent successfully and it probably dropped off the cell network on its own before we tell it to disconnect.
Have you checked if the messages are actually getting delivered?

Thanks Reuben.

This is true most of the time, but I sometimes see the below as well (this is rare):

2020-02-19 00:37:04,880 - INFO - Sending message with body of length 38
2020-02-19 00:37:14,950 - INFO - Disconnecting from cell network
2020-02-19 00:37:14,951 - INFO - Failed to disconnect from cell network
2020-02-19 00:37:14,952 - INFO - Timeout occurred waiting for message status

Would be great if the team can add a bit more error handling (e.g. checking for the connection status before trying to disconnect, etc.) in the next release as these errors also generate exceptions that I need to handle in my code.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.