This tutorial explains how to establish cellular data connection on Raspberry Pi OS using Raspberry Pi 5G Development Kit(with Quectel RM50xQ M.2 5G Modem) .
It is important to properly setup your hardware before you get started. After watching the installation video, follow the steps below.
Please upgrade your Linux system to updated kernel versions to avoid many problems already solved. Make sure your Kernel version is up-to-date, else you may face issues with the driver.
Uninstall Modem Manager
Many Linux distributions have ModemManager preinstalled. They must uninstall it before starting the tutorial. They can be easily uninstalled through the package manager.
sudo apt purge modemmanager -y
Test Driver
Make sure the option usb-serial driver is properly loaded to the module interfaces. Check it with the usb-devices command.
First, install the required serial communication program such as minicom or atcom. We are using minicom for this tutorial.
sudo apt install minicom -y
Then, open the serial communication for /dev/ttyUSB2 device port with 115200 baudrate using minicom
minicom -D /dev/ttyUSB2 -b 115200
Approve the communication by sending AT command. You should get a response of OK.
Now, we can start to configure the modem for ECM mode. The response should be OK.
AT+QCFG="usbnet",1
The modem may reboot after the execution of the command. Wait for the minicom screen to be activated again.
Make sure the module is in ECM mode. Check with AT+QCFG="usbnet" AT command. Should return 1.
Configure APN.
AT+CGDCONT=1,"IPV4V6","YOUR_APN"
The response should be OK.
Then reboot the modem using the following command. The response should be OK.
AT+CFUN=1,1
Wait for the modem to boot again. It may take 30 seconds. Once the modem reboots, minicom will be activated again.
After the reboot, open a new Linux terminal and check for usbX in the network interface using ifconfig or ipaddr commands.
That's all.
Test Internet Connection
Once the internet is active you should see usbX in your internet interface. You can use ifconfig or ipaddr and look for usbX interface.
Now check the assigned IP address and test the connection.
Troubleshooting
If usbX interface is not visible reboot your whole system, check your SIM, antenna, module and USB.
Then check the configuration of the module.
AT+QCFG="usbnet" # Should return 1
Check the SIM is detected by the module.
AT+CPIN? # Should return READY
Check if the module is registered to the network.
AT+CEREG? # Should return 0,1 or 0,5
Check the APN is right and have an IP.
AT+CGCONTRDP # Should return the APN details and IP address.