balena-os / balena-iot-gate-imx8plus

Apache License 2.0
3 stars 1 forks source link

Quectel EC25 modem failed to be enabled with MM 1.22.0 and QMI 1.34.0 #374

Open floion opened 4 months ago

floion commented 4 months ago

Previously, with MM 1.20.6 and QMI 1.32.4 the modem functioned correctly.

At system start, the modem fails to get initialized, and MM reports the following:

root@786715a:~# journalctl --no-pager -u ModemManager
Jul 08 08:06:40 localhost ModemManager[1178]: ModemManager (version 1.22.0) starting in system bus...
Jul 08 08:06:44 786715a ModemManager[1178]: [device /sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3] creating modem with plugin 'quectel' and '6' ports
Jul 08 08:06:44 786715a ModemManager[1178]: [base-manager] modem for device '/sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3' successfully created
Jul 08 08:06:44 786715a ModemManager[1178]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/308c0000.can': not supported by any plugin
Jul 08 08:06:44 786715a ModemManager[1178]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/308d0000.can': not supported by any plugin
Jul 08 08:06:44 786715a ModemManager[1178]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/30be0000.ethernet': not supported by any plugin
Jul 08 08:06:44 786715a ModemManager[1178]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/30bf0000.ethernet': not supported by any plugin
Jul 08 08:06:44 786715a ModemManager[1178]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0': not supported by any plugin
Jul 08 08:06:45 786715a ModemManager[1178]: [modem0] unhandled QMI radio interface '9'
Jul 08 08:06:45 786715a ModemManager[1178]: [modem0] unhandled QMI radio interface '9'
Jul 08 08:06:46 786715a ModemManager[1178]: [modem0] state changed (unknown -> disabled)
Jul 08 08:06:46 786715a ModemManager[1178]: [modem0] state changed (disabled -> enabling)
Jul 08 08:06:46 786715a ModemManager[1178]: [modem0] simple connect started...
Jul 08 08:06:46 786715a ModemManager[1178]: [modem0] simple connect state (4/10): wait to get fully enabled
Jul 08 08:06:46 786715a ModemManager[1178]: [modem0] power state updated: on
Jul 08 08:06:50 786715a ModemManager[1178]: [modem0] (quectel) modem reset detected, triggering reprobe
Jul 08 08:06:50 786715a ModemManager[1178]: [modem0] (quectel) modem reset detected, triggering reprobe
Jul 08 08:06:50 786715a ModemManager[1178]: [modem0] (quectel) couldn't check SIM swap: could not acquire SIM object
Jul 08 08:06:53 786715a ModemManager[1178]: [device /sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3] creating modem with plugin 'quectel' and '6' ports
Jul 08 08:06:57 786715a ModemManager[1178]: [modem0] failed waiting for final state: Too much time waiting to get to a final state
Jul 08 08:06:57 786715a ModemManager[1178]: [modem0] failed enabling modem: Operation was cancelled
Jul 08 08:10:03 786715a ModemManager[1178]: [modem1] couldn't start initialization: Transaction timed out
Jul 08 08:10:03 786715a ModemManager[1178]: [modem1] fatal error initializing: Fatal error: modem is unusable

However, upon restarting the MM system service, MM makes some progress in detecting the modem:

Jul 08 08:10:03 786715a ModemManager[1178]: [modem1] fatal error initializing: Fatal error: modem is unusable
Jul 08 08:29:02 786715a ModemManager[1178]: caught signal, shutting down...
Jul 08 08:29:02 786715a ModemManager[1178]: ModemManager is shut down
Jul 08 08:29:02 786715a ModemManager[15542]: ModemManager (version 1.22.0) starting in system bus...
Jul 08 08:29:06 786715a ModemManager[15542]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/308c0000.can': not supported by any plugin
Jul 08 08:29:06 786715a ModemManager[15542]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/308d0000.can': not supported by any plugin
Jul 08 08:29:06 786715a ModemManager[15542]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/30be0000.ethernet': not supported by any plugin
Jul 08 08:29:06 786715a ModemManager[15542]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/30800000.bus/30bf0000.ethernet': not supported by any plugin
Jul 08 08:29:06 786715a ModemManager[15542]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0': not supported by any plugin
Jul 08 08:30:40 786715a ModemManager[15542]: [device /sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3] creating modem with plugin 'quectel' and '6' ports
Jul 08 08:30:40 786715a ModemManager[15542]: [plugin/quectel] could not grab port cdc-wdm0: Cannot add port 'usbmisc/cdc-wdm0', unhandled port type
Jul 08 08:30:40 786715a ModemManager[15542]: [base-manager] modem for device '/sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3' successfully created
Jul 08 08:30:40 786715a ModemManager[15542]: [modem0] state changed (unknown -> disabled)
Jul 08 08:30:40 786715a ModemManager[15542]: [modem0] state changed (disabled -> enabling)
Jul 08 08:30:40 786715a ModemManager[15542]: [modem0] simple connect started...
Jul 08 08:30:40 786715a ModemManager[15542]: [modem0] simple connect state (4/10): wait to get fully enabled
Jul 08 08:30:41 786715a ModemManager[15542]: [modem0] power state updated: on
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] state changed (enabling -> enabled)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] simple connect state (5/10): wait after enabled
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] 3GPP registration state changed (unknown -> registering)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] 3GPP packet service state changed (unknown -> attached)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] 3GPP registration state changed (registering -> roaming)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] state changed (enabled -> registered)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] simple connect state (6/10): register
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] simple connect state (7/10): wait to get packet service state attached
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] simple connect state (8/10): bearer
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] simple connect state (9/10): connect
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] state changed (registered -> connecting)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] state changed (connecting -> connected)
Jul 08 08:30:42 786715a ModemManager[15542]: [modem0] simple connect state (10/10): all done

but as it can be seen above, it errors out at some point: Jul 08 08:30:40 786715a ModemManager[15542]: [plugin/quectel] could not grab port cdc-wdm0: Cannot add port 'usbmisc/cdc-wdm0', unhandled port type

This makes it ignore the wwan0 port:

root@786715a:~# mmcli -m 0
  --------------------------------
  General  |                 path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 21e80447381cd2cd9538ba5eea33a9356cefec6e
  --------------------------------
  Hardware |         manufacturer: Quectel
           |                model: EC25
           |    firmware revision: EC25AFAR05A06M4G
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 860858061494670
  --------------------------------
  System   |               device: /sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3
           |              physdev: /sys/devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.3
           |              drivers: option, qmi_wwan
           |               plugin: quectel
           |         primary port: ttyUSB2
           |                ports: ttyUSB0 (ignored), ttyUSB1 (gps), ttyUSB2 (at), 
           |                       ttyUSB3 (at), wwan0 (ignored)
  --------------------------------
  Status   |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                state: connected
           |          power state: on
           |          access tech: lte
           |       signal quality: 80% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g, 3g, 4g; preferred: none
           |              current: allowed: 2g, 3g, 4g; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 860858061494670
           |          operator id: 310410
           |        operator name: AT&T Hologram
           |         registration: roaming
           | packet service state: attached
  --------------------------------
  3GPP EPS | ue mode of operation: ps-2
  --------------------------------
  SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0
  --------------------------------
  Bearer   |                paths: /org/freedesktop/ModemManager1/Bearer/0

The initial timing out issue seems to have been present in the past, like this post suggest: https://www.mail-archive.com/modemmanager-devel@lists.freedesktop.org/msg06797.html

floion commented 4 months ago

Hi @aleksander0m do you have any insight on the above?