Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rockpi4/Use 4G Module on ROCK Pi 4

    ROCK Pi 4 >  Use 4G Module on ROCK Pi 4

Introduction

This guide tells how to use 4G module on ROCK Pi 4. 4G modules including SIM7600 and QUECTEL EC20 are tested.

Install needed packages

The new version (4.4.179) of ROCK Pi 4 Kernel packages are located at Radxa APT testing branches.

Firstly, add Radxa APT source, stretch-testing or bionic-testing according to Radxa APT

Secondly, update U-Boot

  • ROCK Pi 4A
   sudo apt-get install rockpi4a-rk-u-boot-latest
  • ROCK Pi 4B
   sudo apt-get install rockpi4b-rk-u-boot-latest

Thirdly, update Kernel

   sudo apt-get install -y rockchip-overlay
   sudo apt-get install -y linux-headers-4.4.179-11-rockchip-g7ebe2c58142e 
   sudo apt-get install -y linux-image-4.4.179-11-rockchip-g7ebe2c58142e 
   sudo apt-get install -y linux-firmware-image-4.4.179-11-rockchip-g7ebe2c58142e

Finally, reboot the machine.

Test

After pluging the 4G Module, some Kernel log would be shown like this.

   root@rockpi:~# dmesg -c
   [   30.578257] usb 2-1: new high-speed USB device number 2 using ehci-platform
   [   30.702800] usb 2-1: New USB device found, idVendor=2c7c, idProduct=0125
   [   30.702844] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
   [   30.702870] usb 2-1: Product: Android
   [   30.702894] usb 2-1: Manufacturer: Android
   [   30.736435] usbcore: registered new interface driver cdc_wdm
   [   30.741322] qmi_wwan 2-1:1.4: cdc-wdm0: USB WDM device
   [   30.742860] qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-fe3c0000.usb-1, WWAN/QMI device, ce:88:21:9d:67:76
   [   30.743011] usbcore: registered new interface driver qmi_wwan
   [   30.748004] usbcore: registered new interface driver usbserial
   [   30.748295] usbcore: registered new interface driver usbserial_generic
   [   30.748413] usbserial: USB Serial support registered for generic
   [   30.754861] usbcore: registered new interface driver option
   [   30.754954] usbserial: USB Serial support registered for GSM modem (1-port)
   [   30.755801] option 2-1:1.0: GSM modem (1-port) converter detected
   [   30.757208] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
   [   30.757492] option 2-1:1.1: GSM modem (1-port) converter detected
   [   30.757817] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
   [   30.757994] option 2-1:1.2: GSM modem (1-port) converter detected
   [   30.761613] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
   [   30.761851] option 2-1:1.3: GSM modem (1-port) converter detected
   [   30.763861] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3

Also, the device /dev/cdc-wdm0 is created with network interface name wwan0.

Test commands:

   echo Y > /sys/class/net/wwan0/qmi/raw_ip
   
   ip link set dev wwan0 up
   
   qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-start-network="ip-type=4,apn=data.tre.se" --client-no-release-cid
   
   udhcpc -q -f -n -i wwan0

Use speedtest tool

   root@rockpi:~# speedtest
   Retrieving speedtest.net configuration...
   Testing from China Unicom Guangdong (112.97.57.63)...
   Retrieving speedtest.net server list...
   Selecting best server based on ping...
   Hosted by ShenZhen Unicom (ShenZhen) [0.00 km]: 52.334 ms
   Testing download speed................................................................................
   Download: 49.50 Mbit/s
   Testing upload speed....................................................................................................
   Upload: 41.49 Mbit/s

Troubleshooting