How to use the RG255C with ModemManager and qmicli

If anyone want to use the RG255C with the qmicli or the ModemManager, please do not try the qmi_wwan_q. Just use the native Linux driver. But you also need to add this

diff --git a/qmi_wwan.c b/qmi_wwan.c
index 554d4e2..3ce2723 100644
--- a/qmi_wwan.c
+++ b/qmi_wwan.c
@@ -1419,6 +1419,7 @@ static const struct usb_device_id products[] = {
        {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */
        {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
        {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)},    /* Quectel BG96 */
+       {QMI_FIXED_INTF(0x2c7c, 0x0316, 3)},    /* Quectel RG255C */
        {QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)}, /* Fibocom NL678 series */
        {QMI_FIXED_INTF(0x0489, 0xe0b4, 0)},    /* Foxconn T77W968 LTE */
        {QMI_FIXED_INTF(0x0489, 0xe0b5, 0)},    /* Foxconn T77W968 LTE with eSIM support*/

qmi_wwan.zip (49.2 KB)

@Wilmes
Please try this one.

Please also add this in the script for ModemManager.

/lib/udev/rules.d/77-mm-quectel-port-types.rules

# Quectel RG255C
#  ttyUSB0 (if #0): QCDM/DIAG port
#  ttyUSB1 (if #1): GPS data port
#  ttyUSB2 (if #2): AT primary port
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0316", ENV{.MM_USBIFNUM}=="00", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_QCDM}="1"
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0316", ENV{.MM_USBIFNUM}=="01", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_GPS}="1"
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0316", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"