QMI / WWAN on RAK7244C

Hello,

I was able to get the PPP network interface working on my RAK7244C with the quick start guide, but would prefer to change it to use a WWAN interface so it can work with ModemManager.

I tried the solution suggested in this thread: Very slow internet on RAK7243, but when I ran the install script I got “Driver for 5.4.72-v7l+ kernel not found”. I modified it to ignore the kernel version assuming (maybe wrongly) that higher versions would be compatible, and the install appeared to succeed. But I still don’t see the wwan0 interface. Any suggestions?

Thank you!

Dear Steph,

Perhaps you can do this by following these steps!

Hardware Setup


Software Setup

  1. First run update

sudo apt update && sudo apt upgrade

  1. Install Raspberry Pi kernel headers.

sudo apt-get install raspberrypi-kernel-headers

  1. Check installed kernel headers packet version ls /usr/src
    In our case, it is 4.14.79

4.Reboot your Raspberry Pi in order to activate the new firmware

  1. After rebooting, download qmi_installer.sh script.

wget https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/qmi_install.sh

  1. Change the permission of the script.

sudo chmod +x qmi_install.sh

  1. Make sure the module is disconnected before running the installer script

sudo ./qmi_install.sh

  1. At the end of installation enter any key to reboot your Raspberry Pi and attach the USB cable of the shield.

  2. After rebooting goto directory files/quectel-CM

cd /files/quectel-CM

  1. Now run the following command to connect to the Internet.

sudo ./quectel-CM -s internet

  1. Now you can check you IP using

ifconfig wwan0

  1. Further more you may check by pinging

ping -I wwan0 -c 5 8.8.8.8

Auto Connect on reboot

If you want your Raspberry Pi to automatically connect to the Internet via QMI interface then there is one more step you will need to follow.

  1. Get the installation script.

wget https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/install_auto_connect.sh

  1. Change the permission

sudo chmod +x install_auto_connect.sh

  1. Now install the script

sudo ./install_auto_connect.sh

  1. It will then ask for APN. Type in your APN and then press ENTER

  1. Once you press enter it will create and activate the service.

  2. The name of the service is qmi_reconnect. To check if the service is active you can type

sudo systemctl status qmi_reconnect.service

  1. If it is working fine then you will be able to see active(running) in green.

Best regards!

Hi Nicholas,

Thank you for the detailed instructions. On step 10 I got this error:

pi@rak-gateway:~/files/quectel-CM $ sudo ./quectel-CM -s internet
[10-30_11:27:07:232] Quectel_QConnectManager_Linux_V1.6.0.12
[10-30_11:27:07:233] network interface '' or qmidev '' is not exist
[10-30_11:27:07:233] qmidevice_detect failed
[10-30_11:27:07:234] qmidevice_detect failed
pi@rak-gateway:~/files/quectel-CM $ ifconfig wwan0
wwan0: error fetching interface information: Device not found

The only difference from your instructions is that my kernel version is higher:

pi@rak-gateway:~ $ ls /usr/src
linux-headers-5.4.72+  linux-headers-5.4.72-v7+  linux-headers-5.4.72-v7l+

Do you think that would cause this issue?

Dear Steph,

  1. You should power up the raspberry pi!

    1. Now run the following command to connect to the Internet.

    sudo ./quectel-CM -s internet(The internet need to change your APN address)

  2. Maybe your lte module is not started.

Download rak_common_for_gateway/rak/rak/bin/active_lte_module.sh at master · RAKWireless/rak_common_for_gateway · GitHub to your gateway.

Execute sudo +x active_lte_module.sh.
Execute sudo ./active_lte_module.sh and wait a few seconds, the LTE module can be started.

Best regards!

Hi Nicholas,

I had already tried the command with my APN name instead of internet and got the same output.

pi@rak-gateway:~/files/quectel-CM $ sudo ./quectel-CM -s broadband
[11-02_10:28:42:528] Quectel_QConnectManager_Linux_V1.6.0.12
[11-02_10:28:42:529] network interface '' or qmidev '' is not exist
[11-02_10:28:42:529] qmidevice_detect failed
[11-02_10:28:42:529] qmidevice_detect failed

Here’s the output when I ran the activate_lte_module script:

pi@rak-gateway:~ $ sudo chmod +x active_lte_module.sh 
pi@rak-gateway:~ $ sudo ./active_lte_module.sh 
./active_lte_module.sh: 4: echo: echo: I/O error
./active_lte_module.sh: 5: echo: echo: I/O error
./active_lte_module.sh: 6: echo: echo: I/O error
./active_lte_module.sh: 7: echo: echo: I/O error
./active_lte_module.sh: 8: echo: echo: I/O error
./active_lte_module.sh: 9: echo: echo: I/O error
./active_lte_module.sh: 27: echo: echo: I/O error

It’s my understanding that those I/O errors happen when the pins are already exported, so I don’t think that’s an issue. I checked each of the pin values and directions to make sure they were the same as the script.

When I tried running the quectel-CM command again I got the same output as before (network interface '' or qmidev '' is not exist).

It’s working now after I replaced the USB cable with a new one! Thanks again for your help.

Out of curiosity, is there any way to get the QMI interface working without having to use a USB cable?

I’m pretty certain that lack of power was never the issue here (and neither was insufficient current). The Pi, and by extension the RAK2013 LTE HAT attached to it, was always powered via the adapter it shipped with. The issue I ran into on step 10 was that the USB cable plugged in between the Pi and RAK2013 was charge-only, so the quectel-CM script couldn’t detect the device because no communication was happening over USB. When I swapped to a cable that could also handle data, it was able to find the device and the issue was resolved.

As for my question about setting up QMI without a USB cable, I just want to know whether it can be done through the GPIO pins like the PPP interface was.

Dear Steph,

Maybe a USB cable is the only way in my opinion!

Best regards!