Troubleshooting Modem Usage

Follows these steps, in order, to troubleshoot modem usage

Make sure the software is up-to-date

  1. Check for version 1.6.3 or greater of iface manager. If its not found, install it

ardpkg list | grep iface
  1. Check for the apt version of iface manager is 1.6.0 or greater. This package is not the ardpkg. It may have a slightly different version.

apt list | grep ardexa-iface-manager
  1. Check for version 1.4.2 of ardexa_modem. Check it has been installed as follows:

pip3 list | grep modem

Figure out which mode is active

Simply run the following command to get the current mode

ardexa_modem mode

Debug legacy mode

This is currently the default modem system on ArdexaLinux up to and including version 11, except on the IOT2050. Future releases of ArdexaLinux will use ModemManager as the default.

Check for all available modems. If there are no modems available check that the device is connected correctly.

# ardexa_modem modems
/dev/ttyUSB1: definitely NOT a modem
/dev/ttyUSB2: probably NOT a modem
/dev/ttyUSB3: is a modem
/dev/ttyUSB4: is a modem
/dev/ttyUSB0: probably NOT a modem

Attempt to manually connect the modem to the Internet. Make sure you use the correct device identified by the previous command. Note down any errors. Make sure the SIM card is inserted and the antenna is connected.

ardexa_modem mc /dev/ttyUSB3
['505', '02']
# ardexa_modem apns 505 02
ardexa_modem run /dev/ttyUSB3 ATQ0
ardexa_modem connect

Remove any references to old auto or manual modem interface configurations

cd /etc/netctl
rm modem modem-auto

The command netctl list will also show the modem-auto interface, and netctl status modem-auto will show the status of the modem. If there are intermittent modem errors; use the command tail -f /var/log/messages and look for HANGUP messages. he command ip a will show the interface ppp0. This is the modem interface. Also use netstat -i to view the interface statistics.

If all the above has been followed, reboot the device without another interface connected and wait a few minutes. If it still doesn't connect, then contact Ardexa Support.


serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

Means that you ase attempting to access the modem in legacy mode while WWAN is active and has control of the modem. If you get this error, please contact Ardexa Support.

Debug WWAN mode

ModemManager is a fast and reliable way to use and manage modems. Instead of dealing directly with the modem via a serial interface, ModemManager takes care of the details and gives users a clean and easy to use interface for dealing with modems, SIM cards and mobile networks.

The modems command now lists actual modems instead of raw serial interfaces that might be modems. The primary ID is the last number in the path.

# ardexa_modem modems
/org/freedesktop/ModemManager1/Modem/0 (wwan0)

This ID can be used directly with ModemManager to inspect the status in an easy to read table, e.g.

mmcli -m 0

If required, you may need to manually enable or disable the modem

# if this is the first time the modem is used, it may need
# to be enabled. Once enabled, the modem will register with
# the mobile network
mmcli -m 0 -e

# disable
mmcli -m 0 -d

The other major difference with the legacy version is that most connections will result in a network interface (wwan0) instead of a ppp interface. The details of the network interface (even when a static IP is required) are all automatically handled by ardexa_modem, but in some rare cases, a PPP connection might still be required. Manually run the connect command with debug enabled to check the method being used (1 = PPP, 2 = static, 3 = dhcp)

# ardexa_modem -v connect
Interface: wwan0, Method: 2


ModemManager not found: org.freedesktop.ModemManager1.Error.Core.TooMany: Cannot create new bearer: all existing bearers are connected

Manually force the modem to disconnect. Zero is the modem ID, please adjust this if required.

mmcli -m 0 --simple-disconnect

ModemManager not found: org.freedesktop.libqmi.Error.Protocol.CallFailed: QMI protocol error (14): 'CallFailed'

This error means that the APN is incorrect. If you are using automatic APN detection, please update the iface-manager plugin to ensure you have the latest APN database. If you are using a static APN, please check the details and try again.

Switch from Legacy to WWAN mode

To upgrade, you'll need to install ModemManager plus the latest version of the iface-manager plugin.

apt install -y modemmanager
systemctl status ModemManager
# only if the status is "masked"
rm /run/systemd/system/ModemManager.service
# make sure the service is enabled
systemctl enable ModemManager

Next, make sure you remove any references to the old style config from the netctl directory

cd /etc/netctl
rm modem modem-auto

Finally, reboot the machine


Last updated