Modem Status Linux Command Utility
When using a modem it is especially important to keep track of the current network state before each connection
We have created a bash script called modemstat which reports back information regarding the modem's status
You can download this from the github link below :
Modemstat Github Repo
When run this reports back useful information, see screenshot below :
Here you can see the below key details :
- - The SIM is unlocked and ready for use (sometimes SIMs are PIN Locked)
- - The signal quality of 15 out of 32 is fair , we have found 22 to be high and 8 to be low (usually below this is problematic and will result in dropped connections)
- - The modem has registered correctly to a local home network (and not roaming)
- - The modem has sufficient signal/availability to running in LTE mode (not GPRS/EDGE/3G mode)
Finally the script prints out the modem firmware and device details, which correctly match the modem type.
The script can also be run in parseable output mode :
Using the below line can allow integration inside other scripts
source <(modemstat -q)
https://raw.githubusercontent.com/mypiandrew/modemstat/main/modemstat.sh