Modem Troubleshooting

LTE modems must be considered as self running, autonomous systems and as such carry a host of potential problems to be aware of. Most problems when operating a cellular links can usually be traced to down to the network registration getting into a "confused" state or problems with getting or maintaining a functioning network connection.

Modem Registration Problems

Pre-Connection Checklist

Before attempting to establish a connection, ensure the following:

  1. SIM Card Functionality:
    1. Verify that the SIM card is communicating properly with the modem.
    2. Check for issues such as PIN locks or blocked status.
    3. Check that the SIM card has been activated by the supplier before usage.
  2. Signal Strength: Confirm that the system has adequate signal strength.
  3. Network Detection and Registration: Ensure that the network is detected and the modem is successfully registered.
Addressing Signal Strength Issues

If the modem detects low signal strength (below 10 out of 31):

  1. Reorient the Antenna: Adjust the antenna's position to capture the best possible signal.
  2. Consider a Directional Aerial: In areas with particularly poor coverage, install a Yagi directional aerial, pointing it towards the nearest base station.
  3. Be Aware of Signal Thresholds:
    • Below 10: Likely to experience problems with LTE connectivity, the system may fall back to 3G/EDGE/GPRS modes or have issues with data transfers.
Resolving Registration Problems

If the modem is stuck in "Not registered, Not Searching" mode, e.g. due to intermittent signal strength issues, or reporting unusual signal strength values e.g.99/32:

  1. Soft Reset via AT Commands: Issue one of the following commands (depending on your modem type):
    AT+CFUN=1
    AT+CFUN=1,1
    This typically reboots the modem firmware and restarts the network registration process.
  2. Toggle Airplane Mode: If the soft reset is ineffective, try toggling the device in and out of airplane mode.
  3. Hardware Reset: As a last resort, perform a hardware reset using the hardware reset GPIO line (Refer to your device's GPIO documentation for the specific lines to toggle)

By following these steps, you can systematically troubleshoot and resolve most modem registration issues, ensuring a stable and reliable connection.

Modem Status Information

To help with checking these details we have created a simple script to detail some of the key points to take note of regarding network registration, you can download this script from the github repository here

Raspberry pi 4G Modem troubleshooting network registration check

Preventing and Resolving "Silent Disconnects"

Cellular network providers often manage their base stations by "muting" connections that appear to be using a disproportionate amount of resources relative to their data transfer, so in cases where IoT devices are connected for long periods and only sending very small amounts of data. This practice, while optimizing overall service availability, can lead to a phenomenon known as a "silent disconnect" or "stale connection."

In these cases, your device may show an active connection, but attempts to transfer data or access remote servers (such as VPN links) will fail. To maintain a stable connection, it's crucial to implement periodic connectivity checks and have a strategy for connection renewal

To ensure your cellular connection remains active and functional, consider the following approach:

  1. Perform regular end-to-end checks: This is particularly important if your modem uses standard consumer APN credentials.
  2. Use HTTP requests for validation: A reliable method to check connectivity is using a curl HTTP request. This approach uses minimal data while still performing a standard web request:
curl -I -s --connect-timeout 5 --max-time 10 http://www.msftncsi.com/ncsi.txt | grep "HTTP/1.1 200 OK"

This command checks the last modified timestamp of a webpage, ideally one on your target server that you control.

  1. Interpret results: Use the success/fail error code of the grep command to determine the viability of your connection. This method is often more reliable than ping as some network operators break this functionality

If your connectivity check fails, follow these steps:

  1. Retry the check: If the initial check fails, attempt it two more times.
  2. Reset the connection: If three consecutive checks fail, consider the internet connection compromised. Bring the connection down and up again to re-establish connectivity.
  3. Software reset: If the problem persists, perform a software reboot of the modem using the appropriate AT command.
  4. Hardware reset: As a last resort, give the modem a hardware reset using the relevant GPIO line. Allow sufficient time for both the modem and OS to react before and after the reset.

Connection Manager

To automate this process we have created a connection management script which you can read about and download from the github link here

Raspberry Pi Modem cellular Connection manager script

 

Modem Cellular Connection Failure Due To APN Name Error

A common "gotcha" is getting the APN details wrong, sometimes the error messages received can be a bit cryptic, see below example of what results of an incorrect APN name :

qmi-apn-error-message

 

Modem Registration Fail Due To Antenna Connected To Wrong Port

Modem gets valid LTE signal, but will not register on the network

quectel-ec25-lte-signal-not-registered-on-network-at+cops

In this case the antenna was connected to the DIV (diversity) antenna port and not the MAIN port

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us