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 sample Perl script to show the state of the modem and it's network registration state, this lives in /usr/local/bin and is called modemstat, this script connects to /dev/modemAT and issues a series of AT status commands to check details like signal status and registration state.

When run this reports back useful information, see screenshot below :


MyPi Industrial Raspberry Pi 3G 4G Modem Status


Here you can see that both modem and SIM are unlocked and ready for use i.e. The modem is not locked to a particular network/SIM vendor and the SIM has no PIN lock enabled on it.

The signal quality is fair (considering it's indoors with a stub aerial fitted)

The modem has registered correctly to a local home network (and not roaming)

The modem has sufficient 3G signal/availability to running in HSDPA mode (not GPRS/EDGE)

Finally the script prints out the modem firmware and device details, which correctly match the modem type.


By using Minicom we can also get the same information this is ocasionally useful for debugging as sometimes the modem may not recognise a particular command, or use a different one for the same ends. A good example of this is the AT+CNTI command which on most modems reports back the network data connection types available and currently active mode but is not active on the Quectel EC21 modem which always reports 'NONE'.




Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us