5G modem RG255C-GL support

Hi! I’m using 5G modem RG255C-GL. I have added the changes in Linux drivers and the modem is visible as a USB device. However, I have trouble in finding the 5G or 4G networks.

  • 5G modem detected as USB device after plugging in to M.2 slot :white_check_mark:
  • patched USB option Linux kernel driver so the virtual serial ports are exposed over USB :white_check_mark:
  • added qmi_wwan_q driver net Linux kernel driver :white_check_mark:
  • ModemManager picking up the modem :white_check_mark:
  • able to reach SIM using modem’s interface :white_check_mark:
  • SIM activated :white_check_mark:
  • can’t register to any cellular network :x:
mmcli -m a
  --------------------------------
  General  |                 path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 7e62xxxx
  --------------------------------
  Hardware |         manufacturer: Quectel
           |                model: RG255C-GL
           |    firmware revision: RG255CGLABR01A04M4G
           |            supported: gsm-umts
           |              current: gsm-umts
           |         equipment id: 86462406004XXXX
  --------------------------------
  System   |               device: /sys/devices/platform/3610000.xhci/usb1/1-2
           |              drivers: option
           |               plugin: quectel
           |         primary port: ttyUSB2
           |                ports: ttyUSB2 (at)
  --------------------------------
  Status   |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                state: disabled
           |          power state: on
           |       signal quality: 0% (cached)
  --------------------------------
  Modes    |            supported: allowed: any; preferred: none
           |              current: allowed: any; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 86462406004XXXX
  --------------------------------
  3GPP EPS | ue mode of operation: ps-2
  --------------------------------
  SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0


mmcli -m 0 --command='AT+C5GREG=1'
response: ''

mmcli -m 0 --command='AT+CEREG=1'
response: ''

mmcli -m 0 --command='AT+CGDCONT=?'
response: '+CGDCONT: (1-16),"IP",,,(0-3),(0-4),(0-1),(0-1),,,,,,,,,(0-1),,(0-1),,,(0-1)
+CGDCONT: (1-16),"IPV6",,,(0-3),(0-4),(0-1),(0-1),,,,,,,,,(0-1),,(0-1),,,(0-1)
+CGDCONT: (1-16),"IPV4V6",,,(0-3),(0-4),(0-1),(0-1),,,,,,,,,(0-1),,(0-1),,,(0-1)'

mmcli -m 0 --command='AT+COPS=?'
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Serial.ResponseTimeout: Serial command timed out'

How to register to 5G network and connect?

Dear @Kubicz

RG255C is reacap module, it only can register on 5G with 20M bandwidth.

Please check your configuration via AT command below:
AT+CFUN?
AT+CPIN?
AT+QCSQ
AT+COPS?
AT+QNWPREFCFG=“mode_pref”

Hi @silvia, thank you for reply.
My output:

sudo mmcli -m 0 --command='AT+CFUN?'
response: '+CFUN: 1'
sudo mmcli -m 0 --command='AT+CPIN?'
response: '+CPIN: READY'
sudo mmcli -m 0 --command='AT+QCSQ'
response: '+QCSQ: "LTE",-76,-114,-3,-18'
sudo mmcli -m 0 --command='AT+COPS?'
response: '+COPS: 0,0,"Plus",7'
sudo mmcli -m 0 --command='AT+QNWPREFCFG="mode_pref"'
response: '+QNWPREFCFG: "mode_pref",AUTO'

Which means for the first time it was able to show any network in the AT+COPS? command.

However with ModemManager, I still get Network timeout. I’m going to try with QConnectManager now.

sudo mmcli -m 0 --simple-connect='apn=iot.truphone.com'
error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.NetworkTimeout: Network timeout'

I just cross-compiled and run QConnectManager v1.6.7 and I see this output:

./quectel-CM -s iot.truphone.com &
[11-07_12:07:05:714] QConnectManager_Linux_V1.6.7
[11-07_12:07:05:716] Find /sys/bus/usb/devices/1-2 idVendor=0x2c7c idProduct=0x316, bus=0x001, dev=0x004
[11-07_12:07:05:716] network interface '' or qmidev '' is not exist
[11-07_12:07:05:717] atdevice_detect failed
[11-07_12:07:05:717] qmidevice_detect failed

I don’t see /dev/cdc-wdm0 device in Linux. I have

sudo dmesg | grep qmi
[   13.941259] usbcore: registered new interface driver qmi_wwan_q

Probably need to make QMI over /dev/cdc-wdm0 work first.
In qmi_wwan_q, I have

{ QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0316, 3, mdm9x40) }, /* Quectel RG255 */

so I expect this module to be recognized, however I don’t see a message that should appear from qmi_wwan_q, soething like “qmi_wwan_q 1-1.3:1.4 wwan0: register ‘qmi_wwan_q’ at usb-101c0000.ehci-1.3, WWAN/QMI device, da:0b:ce:b2:db:21”

How to make the qmi_wwan_q recognize my modem as QMI/cdc-wdm device?

I strictly followed
and I have these drivers present:

ls /sys/bus/usb/drivers
**cdc_wdm**  hub  **option**  **qmi_wwan_q**  snd-usb-audio  uas  usb  usb-storage	usbfs  usbhid

But the /dev/cdc-wdm0 is not present.

Dear @Kubicz
Your device had register on 4G network.
‘+COPS: 0,0,“Plus”,7’

If use QConnectManager, please uninstall ModemManager.

You can try to insmod cdc-wdm driver.

Hi @silvia

ModemManager is not running, it was stopped before running QConnectManager.

I think cdc-wdm is not available as a module

find /lib/modules/$(uname -r) -type f -name '*.ko' | grep cdc
/lib/modules/5.10.104+/kernel/drivers/net/usb/cdc_eem.ko
/lib/modules/5.10.104+/kernel/drivers/net/usb/cdc_ether.ko
/lib/modules/5.10.104+/kernel/drivers/net/usb/cdc_mbim.ko
/lib/modules/5.10.104+/kernel/drivers/net/usb/cdc_ncm.ko
/lib/modules/5.10.104+/kernel/drivers/net/usb/cdc_subset.ko

I’m trying to set up the drivers again using 5G USB Driver Guide.

Hi @silvia
Can you share the latest USB Driver guide? I have Quectel_UMTS_LTE_5G_Linux_USB_Driver_User_Guide_V3.1.pdf but it doesn’t mention RG255C. Maybe there’s a newer release?

Please check the Quectel_UMTS_LTE_5G_Linux_USB_Driver_User_Guide_V3.2.
Please check
lsusb -t on your device.

Thank you @Bean.Wang-Q , I received your message with pdf file.

I reviewed again all the changes that I have made to Linux drivers, including USB option.c and qmi_wwan_q.c, however the /dev/cdc-wdm0 interface does not appear.

At which point should I run AT+QCFG="usbnet",0 to configure the type of USBnet interface as RmNet? Is it ok to run it after the modem was already detected by USB option driver? (I guess it’s not possible to send AT command before having USB option initilalized).

About your suggestion to check lsusb -t, I see USB option but no cdc-wdm / qmi interface.

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 2, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 2: Dev 2, If 0, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 2: Dev 2, If 3, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 2: Dev 2, If 1, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 4, If 0, Class=Wireless, Driver=, 12M
        |__ Port 4: Dev 4, If 1, Class=Wireless, Driver=, 12M

Modify the kernel’s built-in driver qmi_wwan.c

{QMI_QUIRK_SET_DTR(0x2c7c, 0x0316, 3)}, /* Quectel X35 */

Modify the kernel’s built-in driver option.c

{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0316, 0xff),
.driver_info = RSVD(3) },

Thank you @Bean.Wang-Q , I already have applied these changes previously, and the gives the result as the logs shared above

I don’t understand what you mean

Where is it from?
If it works, you can see it rmnet network interface and you can see the qmi_wwan in the lsusb -t.

Sorry, it’s not possible to edit the post. Disregard the G=“usbnet” part, it was in the post by mistake.

{QMI_QUIRK_SET_DTR(0x2c7c, 0x0316, 3)}, /* Quectel X35 */

{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0316, 0xff),
.driver_info = RSVD(3) },

I wanted to say that I already have applied these changes previously, and the gives the result as the logs shared above.

The usb interface 3 should match the qmi_wwan. And you should modify the option.c.