subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
284 views 0 comments

Every 5 mins I signal a modem restart in order to initiate a SIM registration.

in the event logs, I can see a successful SIM registration (Ex: 191503|1600102073|Network Operator|Connected to XXX operator)

Is there any event written down in the event logs (or somewhere else) to indicate if SIM failed to register?

The aim is to monitor if the SIM frailed to register, simply by parsing these logs via a shell script to fetch this term.



1 Answer

0 votes
by anonymous


There are many ways to check if you have a connection to your operator/mobile data.

The first one would be ping reboot functionality, that will let you ping outside network and if it's not reached in X retries, it will execute one of these actions: 

Reboot | Modem restart | Restart mobile connection | (Re)register

The second one is just checking if gsmctl commands giving you the information about your operator and current connection circumstances.

If you execute gsmctl -F and you get this output: +QNWINFO: "FDD LTE","24601","LTE BAND 3",1348

it means that you've successfully connected. If after executing this command you get a Timeout or something that doesn't have anything to do with correct output - it means you're not connected or something else is broken.

The third one is just parsing through system log, that you can see when you execute logread, logread -F (for continuous logread steam) or just downloading troubleshoot file and finding the system log there.

The thing is, that the system log is outputting everything, so it will show that it connects and disconnects 10 times before it really connects to the operator as it supposed to. So please do your research and select strings carefully, if you're going to put it in your script as an identifier.