In the document describing how to set up ECM mode, there is this little statement:
Note 1: When the modem reboots or the internet connection is lost for any reason, you have to run
AT#ECM=1,0command again to establish the internet connection.
Okay. Now what exactly does that mean? That implies that one should periodically check to see if the internet connection is active and then issue that command.
What would be the best way to test for the presence of an internet connection in this case? In particular what would be the best way to test the state of the internet connection without incurring data charges?
It seems you could use the
AT#ECMC? command, which produces output like this when the internet is up:
AT#ECMC? #ECMC: 0,1,"192.168.225.44","255.255.255.0","192.168.225.1","127.0.0.1","","","" OK
But that seems to be checking whether the connection is enabled or disabled, not whether the connection has been lost. So how exactly do you figure out that the connection has been lost?