openmptcprouter icon indicating copy to clipboard operation
openmptcprouter copied to clipboard

Serial modem keeps disconnecting causing MBIM and AT command timeouts

Open onedogonemanonevan opened this issue 1 year ago • 7 comments

Expected Behavior

The USB serial device shouldn't disconnect and cause timeout issues.

Current Behavior

When connecting to cellular (Quectel EM12 AND EM160) using ModemManager through a USB pcie sled (tried 3 different sleds) the USB device just disconnects after a period of time. This period of time can be as early as trying to initialize/interogate the SIM card or as late as getting some device information using AT commands later on (results in a /dev/ttyUSB2 AT command timeout).

I also tried using the same modem on a glinet with OpenWrt 22.03.2 r19803-9a599fee93 and this wasn't an issue.

Possible Solution

Steps to Reproduce the Problem

  1. Attempt to connect the modem via mmcli -m 0 --simple-connect="apn=BROADBAND"
  2. Open logread
  3. Observe timeout errors
Sep 19 22:52:44 OpenMPTCProuter daemon.warn [20387]: <warn>  [ttyUSB0/probe] failed to parse QCDM version info command result: -7
Sep 19 22:52:52 OpenMPTCProuter daemon.info [20387]: <info>  [device /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4] creating modem with plugin 'quectel' and '6' ports
Sep 19 22:52:52 OpenMPTCProuter daemon.info [20387]: <info>  [base-manager] modem for device '/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4' successfully created
Sep 19 22:52:52 OpenMPTCProuter daemon.info [20387]: <info>  [modem3/cdc-wdm0/mbim] MBIM device is QMI capable
Sep 19 22:52:53 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] QMI-based capability and mode switching support enabled
Sep 19 22:52:57 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3/sim2] couldn't load list of emergency numbers: Failed to parse CRSM query result '+CRSM: 148,8,""'
Sep 19 22:52:57 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3] couldn't load 5GNR registration settings: 5GNR registration settings are unsupported
Sep 19 22:52:58 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] state changed (unknown -> disabled)
Sep 19 22:53:54 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] simple connect started...
Sep 19 22:53:54 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] simple connect state (3/10): enable
Sep 19 22:53:54 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] state changed (disabled -> enabling)
Sep 19 22:54:04 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] power state updated: on
Sep 19 22:54:15 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3] could not load SIM identifier: QMI operation failed: Transaction timed out (3 retries left)
Sep 19 22:54:15 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:54:26 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3] could not load SIM identifier: QMI operation failed: Transaction timed out (2 retries left)
Sep 19 22:54:27 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:54:37 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3] could not load SIM identifier: QMI operation failed: Transaction timed out (1 retries left)
Sep 19 22:54:38 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:54:48 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3] could not load SIM identifier: QMI operation failed: Transaction timed out
Sep 19 22:54:48 OpenMPTCProuter daemon.info [20387]: <info>  [modem3] SIM identifier has changed: 89014104273378580461 -> <none>
Sep 19 22:54:49 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:54:58 OpenMPTCProuter daemon.err [20387]: <error> [modem3] failed to disable after SIM switch event: Too much time waiting to get to a final state
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [/dev/cdc-wdm0] MBIM error: Transaction timed out
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3/cdc-wdm0/mbim] Couldn't properly close QMI device: Transaction timed out
Sep 19 22:55:13 OpenMPTCProuter daemon.info [20387]: <info>  [device /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4] creating modem with plugin 'quectel' and '6' ports
Sep 19 22:55:13 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem3] couldn't enable interface: 'Operation was cancelled'
Sep 19 22:55:58 OpenMPTCProuter daemon.warn [20387]: <warn>  [modem4] couldn't start initialization: Transaction timed out
Sep 19 22:55:58 OpenMPTCProuter daemon.err [20387]: <error> [modem4] fatal error initializing: Fatal error: modem is unusable

Context (Environment)

Specifications

onedogonemanonevan avatar Dec 03 '23 00:12 onedogonemanonevan

Why don't you configure ModemManager using the web interface ? This may cause conflicts when you try manually. How do you get SIM information or send AT commands ? This must be done via mmcli too.

Ysurac avatar Dec 03 '23 06:12 Ysurac

@Ysurac same issue happens with the web interface, it eventually times out and fails.

onedogonemanonevan avatar Dec 03 '23 15:12 onedogonemanonevan

Try latest snapshot. It fails when you send some AT commands only or not ?

Ysurac avatar Dec 03 '23 17:12 Ysurac

I'm experiencing the same issue with the EM160R-GL modem with modem manager on OpenWRT on an Rpi4, so would love to know if and how you manage to fix it!

Jason-Duffy avatar Dec 08 '23 13:12 Jason-Duffy

This is also happening to me on OpenWRT with modem manager

bengeek2 avatar Dec 14 '23 14:12 bengeek2

@Jason-Duffy and @bengeek2 you are talking about OpenWRT and not OpenMPTCProuter right ? Basically only changes I made for now is detecting when the interfaces is not responding (available but in pending state for example via ifstatus) and do a "ifup" on the interface. Do you have the problem at anytime or when sending some AT commands ?

Ysurac avatar Dec 14 '23 15:12 Ysurac

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Mar 13 '24 19:03 github-actions[bot]