EM120R-GL PCIe AT Interface / Detection

Is there a known issue or solution to the EM120R-GL (PCI) mode only appearing as an MBIM device with now AT interface?

It also only ever gets listed as an unassigned Qualcomm device

0003:01:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 0304

Modem manager is able to interact with the modem via QMI/MBIM.

Sim selection and detection control via qmi/mbim is unclear.

[  496.236040] wwan wwan3: port wwan3qcdm0 disconnected
[  496.242558] wwan wwan3: port wwan3mbim0 disconnected
[  496.249998] wwan wwan3: port wwan3qmi0 disconnected
Kernel: 6.6.35

# Drivers
- mhi_pci_generic
- mhi_wwan_ctr
- mhi_wwan_mbim
- qrtr_mhi
- usb_wwan
- usbnet
- cdc_mbim
- qmi_wwan

For Quectel modem in PCIe mode, you need to remove the mhi_pci_generic and all the mhi driver.

Please try the pcie_mhi from Quectel.

How do I use this?

Kernel restrictions?

Send me the Linux driver sources and documentation for pcie_mhi

I managed to build the package from immortalwrt.

Was able to turn off FCC locking using the AT interface via /dev/mhi_DUN

And detect the SIM card using the suggestion by Hideyuki on bananapi forums

AT+QUIMSLOT=1
AT+QSIMDET=0,0
AT+QCFG="fcc_enable",0
AT+CFUN=1,1

Then tried to start the connection like so.

 quectel-qmi-proxy -d /dev/mhi_QMI0

quectel-cm -p -i rmnet_mhi0 -s internet
[07-03_12:52:34:781] QConnectManager_Linux_V1.6.5
[07-03_12:52:34:782] Find /sys/bus/usb/devices/1-1.2 idVendor=0x2c7c idProduct=0x125, bus=0x001, dev=0x004
[07-03_12:52:34:782] network interface 'rmnet_mhi0' or qmidev '' is not exist
[07-03_12:52:34:782] netcard driver = pcie_mhi, driver version = V1.3.6
[07-03_12:52:34:782] qmap_mode = 1, qmap_version = 5, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[07-03_12:52:34:782] Modem works in QMI mode
[07-03_12:52:34:785] /proc/4419/fd/3 -> /dev/mhi_QMI0
[07-03_12:52:34:785] /proc/4419/exe -> /usr/bin/quectel-qmi-proxy
[07-03_12:52:36:786] cdc_wdm_fd = 7
[07-03_12:52:36:798] Get clientWDS = 18
[07-03_12:52:36:802] Get clientDMS = 1
[07-03_12:52:36:807] Get clientNAS = 4
[07-03_12:52:36:811] Get clientUIM = 2
[07-03_12:52:36:815] Get clientWDA = 1
[07-03_12:52:36:819] requestBaseBandVersion EM120RGLAPR02A07M4G
[07-03_12:52:36:824] requestSetEthMode QMUXResult = 0x1, QMUXError = 0x46
[07-03_12:52:36:828] requestGetSIMStatus SIMStatus: SIM_READY
[07-03_12:52:36:841] requestGetProfile[pdp:1 index:1] internet///0/IPV4
[07-03_12:52:36:841] requestSetProfile[pdp:1 index:1] internet///0/IPV4
[07-03_12:52:36:841] no need to set skip the rest
[07-03_12:52:36:847] requestRegistrationState2 MCC: 639, MNC: 3, PS: Attached, DataCap: LTE
[07-03_12:52:36:851] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[07-03_12:52:36:851] ip link set dev rmnet_mhi0 down
[07-03_12:52:36:853] ip addr flush dev rmnet_mhi0.1
[07-03_12:52:36:855] ip link set dev rmnet_mhi0.1 down
[07-03_12:52:36:859] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x46
[07-03_12:52:36:859] try to requestSetupDataCall 5 second later
[07-03_12:52:39:724] QmiWwanThread read=-1 errno: 11 (Resource temporarily unavailable)
[07-03_12:54:41:860] requestSetupDataCall message timeout
[07-03_12:54:41:860] requestSetupDataCall err = 110
[07-03_12:54:41:860] try to requestSetupDataCall 10 second later
[07-03_12:56:51:860] requestSetupDataCall message timeout
[07-03_12:56:51:860] requestSetupDataCall err = 110
[07-03_12:56:51:860] try to requestSetupDataCall 20 second later
[07-03_12:59:11:876] requestSetupDataCall message timeout
[07-03_12:59:11:876] requestSetupDataCall err = 110
[07-03_12:59:11:876] try to requestSetupDataCall 40 second later

What if you reboot the device and try again.
If it alway be like this, maybe you can try mbim mode later.

Can you share documentation on the correct way to use quectel-CM in PCIE mode?

With the config changes above modem manager with the standard driver now detects the modem but the connection fails with a multiplex error.

EDIT: Works fine in MBIM with the correct VLAN. rmnet_mhi0.1

Unfortunately the driver crashes during a speedtest.

# Module Config
pcie_mhi mhi_mbim_enabled=1 qmap_mode=0
Thu Jul  4 07:32:50 2024 kern.err kernel: [ 1087.641208] [E][mhi0][mhi_intvec_threaded_handlr] MHI system error detected
Thu Jul  4 07:32:50 2024 kern.debug kernel: [ 1087.648176] [I][mhi0][mhi_tryset_pm_state] Transition to pm state from:M0 to:SYS_ERR Detect
Thu Jul  4 07:32:50 2024 kern.debug kernel: [ 1087.656524] [I][mhi0][mhi_intvec_threaded_handlr] device ee:AMSS -> PASS THRU
Thu Jul  4 07:32:50 2024 kern.debug kernel: [ 1087.663684] [I][mhi0][mhi_pm_sys_err_worker] Enter with pm_state:SYS_ERR Detect MHI_STATE:M0
Thu Jul  4 07:32:50 2024 kern.debug kernel: [ 1087.672117] [I][mhi0][mhi_pm_disable_transition] Enter with from pm_state:SYS_ERR Detect MHI_STATE:M0 to pm_state:SYS_ERR Process
Thu Jul  4 07:32:50 2024 kern.debug kernel: [ 1087.683770] [I][mhi0][mhi_tryset_pm_state] Transition to pm state from:SYS_ERR Detect to:SYS_ERR Process
Thu Jul  4 07:32:50 2024 kern.debug kernel: [ 1087.693239] [I][mhi0][mhi_pm_disable_transition] Trigger device into MHI_RESET
Thu Jul  4 07:32:53 2024 kern.debug kernel: [ 1090.707198] [I][mhi0][mhi_pm_disable_transition] Waiting for all pending event ring processing to complete
Thu Jul  4 07:32:53 2024 kern.debug kernel: [ 1090.716841] [I][mhi0][mhi_pm_disable_transition] Reset all active channels and remove mhi devices
quectel-cm -i internet

Is there a problem with just ping?

Maybe the modem restarted then.

pings are fine

The driver crashes to crash when running a speedtest.

Are there known issues with these versions?

QConnectManager_Linux_V1.6.5
Quectel_Linux_PCIE_MHI_Driver_V1.3.6

Module Firmware:

EM120RGLAPR02A07M4G_10.010.01

Can you send me the latest firmware? The versions from fwupgd.org don’t work with qFirehose.

I don’t think there is any problem with the device driver.
And maybe there is some problem with the hardware.
If you use the speedtest, actually the modem already restarted.

pcie_mhi crashes after every use. even light use, not just after a speedtest.

Send me stable versions of:

  • Quectel Connection Manager

  • Quectel MHI PCIE drivers

  • EM120R GLAP Firmware (if upgrade can be done using qfirehose)

  • Any documentation

I’ve asked for these multiple times with no help.

Sorry. For document you can refer to the hardware design and the AT guide. There is no such document.
I will send you the lastest quectel-CM and pcie_mhi.

Quectel_QConnectManager_Linux_V1.6.7.zip (220.0 KB)
Quectel_Linux_PCIE_MHI_Driver_V1.3.7.zip (137.4 KB)

Thank you.

Is it possible to get the latest firmware for the module?

And does qfirehose work with PCIE_MHI?

mhi-pci-generic actually works in multiplex mode.
But the firmware does crash sometimes although less frequently than PCIE_MHI/MBIM.

mmcli -m 0 --create-bearer="apn=internet,ip-type=ipv4,multiplex=requested"
mmcli -m 0 -b <BEARER> --connect
# Then configure the qmapmux interface address and routing like any other interface.
root@OpenWrt:~# mmcli -m 2 -b 236
  ------------------------------------
  General            |           path: /org/freedesktop/ModemManager1/Bearer/236
                     |           type: default
  ------------------------------------
  Status             |      connected: yes
                     |      suspended: no
                     |    multiplexed: yes
                     |      interface: qmapmux2.0
                     |     ip timeout: 20

                     |            mtu: 1500
  ------------------------------------
  Statistics         |     start date: 2024-07-05T08:54:40Z
                     |       duration: 3779
                     |       bytes rx: 123437130
                     |       bytes tx: 27486165
                     |       attempts: 3
                     | total-duration: 4782
                     | total-bytes rx: 123437738
                     | total-bytes tx: 27486165

Please check what is the current firmware version with the AT+QGMR

Firmware Version: M120RGLAPR02A07M4G_10.010.10.010

RE: EM120R-GL PCIe AT Interface / Detection - Quectel Forums