mmcli --simple-connect does not wait for timeout in all conditions in QMI [MM 1.18.2]

Amol Lad Amol.Lad at 4rf.com
Tue Nov 30 05:19:07 UTC 2021


Hi,

I'm observing that in few cases (MM 1.18.2) that --simple-connect returns immediately in QMI mode without waiting for the timeout. No such premature exit is observed in MBIM i.e. MBIM mode works fine.

It's easily reproducible in my setup.

1] Successfully connect bearer first and then run following script

#!/bin/bash

mmcli -m 0 --simple-disconnect
mmcli -m 0 --set-current-bands=eutran-71
mmcli -m 0 --simple-connect="apn=internet" --timeout=10

--

Here, I've used eutran-71 band to reproduce the issue. My network provider does not support eutran-71. However, the problem is - if I use some valid band and it takes a little longer for the device to "latch" on the new band then -simple-connect immediately returns with failure :(

Logs are below when above script is run:

info 2021-11-30T05:05:27+00:00 : <info>  [modem0] state changed (connected -> disconnecting)
info 2021-11-30T05:05:27+00:00 : <info>  [modem0] state changed (disconnecting -> registered)
info 2021-11-30T05:05:27+00:00 : <info>  [modem0/bearer3] connection #1 finished: duration 17s, tx: 48 bytes, rx: 88 bytes
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect started...
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (4/8): wait to get fully enabled
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (5/8): register
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (6/8): bearer
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (7/8): connect
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] state changed (registered -> connecting)
info 2021-11-30T05:05:29+00:00 : <info>  [modem0/bearer4] couldn't start network: QMI protocol error (14): 'CallFailed'
info 2021-11-30T05:05:29+00:00 : <info>  [modem0/bearer4] verbose call end reason (3,2001): [cm] no-service
warning 2021-11-30T05:05:29+00:00 : <warn>  [modem0/bearer4] connection attempt #1 failed: Call failed: cm error: no-service
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] state changed (connecting -> registered)
info 2021-11-30T05:05:29+00:00 : <info>  [modem0/bearer4] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes
err 2021-11-30T05:05:39+00:00 LTEMGR: ltemon_func.c:986 ltemonUpdateSignalParams: Failed: exitcode = 0 ret = 2
info 2021-11-30T05:05:48+00:00 : <info>  [modem0] 3GPP registration state changed (home -> idle)
info 2021-11-30T05:05:48+00:00 : <info>  [modem0] state changed (registered -> enabled)
info 2021-11-30T05:05:48+00:00 : <info>  [modem0] 3GPP registration state changed (idle -> unknown)
warning 2021-11-30T05:05:48+00:00 : <warn>  [modem0] couldn't load operator code: Current operator MCC/MNC is still unknown
warning 2021-11-30T05:05:48+00:00 : <warn>  [modem0] couldn't load operator name: Current operator id is still unknown

Any idea how this behaviour can be prevented? As I said before, in MBIM this problem is not observed and -simple-connect only exits after timeout (or successfully connects within timeout)

Please advise.
Amol

# mmcli -m 0
  ----------------------------------
  General  |                   path: /org/freedesktop/ModemManager1/Modem/0
           |              device id: c3e7a33989113dbfd81acfae3c4e31fdc86fcae6
  ----------------------------------
  Hardware |           manufacturer: Telit
           |                  model: LN920A12-WW
           |      firmware revision: M0L.000000-B013
           |         carrier config: default
           |           h/w revision: 0.10
           |              supported: gsm-umts, lte
           |                current: gsm-umts, lte
           |           equipment id: 354175759991310
  ----------------------------------
  System   |                 device: /sys/devices/platform/soc/soc:internal-regs/f10f0000.usb3/usb3/3-1
           |                drivers: option1, qmi_wwan
           |                 plugin: telit
           |           primary port: cdc-wdm0
           |                  ports: cdc-wdm0 (qmi), ttyUSB0 (ignored), ttyUSB1 (gps),
           |                         ttyUSB2 (at), ttyUSB3 (at), ttyUSB4 (ignored), wwan0 (net)
  ----------------------------------
  Numbers  |                    own: 9108813566
  ----------------------------------
  Status   |                   lock: sim-pin2
           |         unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |                  state: connected
           |            power state: on
           |            access tech: lte
           |         signal quality: 96% (recent)
  ----------------------------------
  Modes    |              supported: allowed: 3g; preferred: none
           |                         allowed: 4g; preferred: none
           |                         allowed: 3g, 4g; preferred: 4g
           |                         allowed: 3g, 4g; preferred: 3g
           |                current: allowed: 4g; preferred: none
  ----------------------------------
  Bands    |              supported: utran-1, utran-3, utran-4, utran-6, utran-5, utran-8,
           |                         utran-9, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5,
           |                         eutran-7, eutran-8, eutran-12, eutran-13, eutran-14, eutran-17,
           |                         eutran-18, eutran-19, eutran-20, eutran-25, eutran-26, eutran-28,
           |                         eutran-29, eutran-30, eutran-38, eutran-39, eutran-40, eutran-41,
           |                         eutran-42, eutran-43, eutran-48, eutran-66, eutran-71, utran-19
           |                current: eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7,
           |                         eutran-8, eutran-12, eutran-13, eutran-14, eutran-17, eutran-18,
           |                         eutran-19, eutran-20, eutran-25, eutran-26, eutran-28, eutran-29,
           |                         eutran-30, eutran-38, eutran-39, eutran-40, eutran-41, eutran-42,
           |                         eutran-43, eutran-48, eutran-66, eutran-71
  ----------------------------------
  IP       |              supported: ipv4, ipv6, ipv4v6
  ----------------------------------
 3GPP     |                   imei: 354175759991310
           |          enabled locks: fixed-dialing
           |            operator id: 40445
           |          operator name: airtel
           |           registration: home
  ----------------------------------
  3GPP EPS |   ue mode of operation: csps-2
           |    initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
           |     initial bearer apn: internet
           | initial bearer ip type: ipv4v6
  ----------------------------------
  SIM      |       primary sim path: /org/freedesktop/ModemManager1/SIM/0
           |         sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
           |                         slot 2: /org/freedesktop/ModemManager1/SIM/1
  ----------------------------------
  Bearer   |                  paths: /org/freedesktop/ModemManager1/Bearer/5
-------------- next part --------------
Hi,

I'm observing that in few cases (MM 1.18.2) that --simple-connect returns immediately in QMI mode without waiting for the timeout. No such premature exit is observed in MBIM i.e. MBIM mode works fine.

It's easily reproducible in my setup.

1] Successfully connect bearer first and then run following script

#!/bin/bash

mmcli -m 0 --simple-disconnect
mmcli -m 0 --set-current-bands=eutran-71
mmcli -m 0 --simple-connect="apn=internet" --timeout=10

--

Here, I've used eutran-71 band to reproduce the issue. My network provider does not support eutran-71. However, the problem is - if I use some valid band and it takes a little longer for the device to "latch" on the new band then -simple-connect immediately returns with failure :(

Logs are below when above script is run:

info 2021-11-30T05:05:27+00:00 : <info>  [modem0] state changed (connected -> disconnecting)
info 2021-11-30T05:05:27+00:00 : <info>  [modem0] state changed (disconnecting -> registered)
info 2021-11-30T05:05:27+00:00 : <info>  [modem0/bearer3] connection #1 finished: duration 17s, tx: 48 bytes, rx: 88 bytes
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect started...
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (4/8): wait to get fully enabled
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (5/8): register
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (6/8): bearer
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] simple connect state (7/8): connect
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] state changed (registered -> connecting)
info 2021-11-30T05:05:29+00:00 : <info>  [modem0/bearer4] couldn't start network: QMI protocol error (14): 'CallFailed'
info 2021-11-30T05:05:29+00:00 : <info>  [modem0/bearer4] verbose call end reason (3,2001): [cm] no-service
warning 2021-11-30T05:05:29+00:00 : <warn>  [modem0/bearer4] connection attempt #1 failed: Call failed: cm error: no-service
info 2021-11-30T05:05:29+00:00 : <info>  [modem0] state changed (connecting -> registered)
info 2021-11-30T05:05:29+00:00 : <info>  [modem0/bearer4] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes
err 2021-11-30T05:05:39+00:00 LTEMGR: ltemon_func.c:986 ltemonUpdateSignalParams: Failed: exitcode = 0 ret = 2
info 2021-11-30T05:05:48+00:00 : <info>  [modem0] 3GPP registration state changed (home -> idle)
info 2021-11-30T05:05:48+00:00 : <info>  [modem0] state changed (registered -> enabled)
info 2021-11-30T05:05:48+00:00 : <info>  [modem0] 3GPP registration state changed (idle -> unknown)
warning 2021-11-30T05:05:48+00:00 : <warn>  [modem0] couldn't load operator code: Current operator MCC/MNC is still unknown
warning 2021-11-30T05:05:48+00:00 : <warn>  [modem0] couldn't load operator name: Current operator id is still unknown

Any idea how this behaviour can be prevented? As I said before, in MBIM this problem is not observed and -simple-connect only exits after timeout (or successfully connects within timeout)

Please advise.
Amol

# mmcli -m 0
  ----------------------------------
  General  |                   path: /org/freedesktop/ModemManager1/Modem/0
           |              device id: c3e7a33989113dbfd81acfae3c4e31fdc86fcae6
  ----------------------------------
  Hardware |           manufacturer: Telit
           |                  model: LN920A12-WW
           |      firmware revision: M0L.000000-B013
           |         carrier config: default
           |           h/w revision: 0.10
           |              supported: gsm-umts, lte
           |                current: gsm-umts, lte
           |           equipment id: 354175759991310
  ----------------------------------
  System   |                 device: /sys/devices/platform/soc/soc:internal-regs/f10f0000.usb3/usb3/3-1
           |                drivers: option1, qmi_wwan
           |                 plugin: telit
           |           primary port: cdc-wdm0
           |                  ports: cdc-wdm0 (qmi), ttyUSB0 (ignored), ttyUSB1 (gps),
           |                         ttyUSB2 (at), ttyUSB3 (at), ttyUSB4 (ignored), wwan0 (net)
  ----------------------------------
  Numbers  |                    own: 9108813566
  ----------------------------------
  Status   |                   lock: sim-pin2
           |         unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |                  state: connected
           |            power state: on
           |            access tech: lte
           |         signal quality: 96% (recent)
  ----------------------------------
  Modes    |              supported: allowed: 3g; preferred: none
           |                         allowed: 4g; preferred: none
           |                         allowed: 3g, 4g; preferred: 4g
           |                         allowed: 3g, 4g; preferred: 3g
           |                current: allowed: 4g; preferred: none
  ----------------------------------
  Bands    |              supported: utran-1, utran-3, utran-4, utran-6, utran-5, utran-8,
           |                         utran-9, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5,
           |                         eutran-7, eutran-8, eutran-12, eutran-13, eutran-14, eutran-17,
           |                         eutran-18, eutran-19, eutran-20, eutran-25, eutran-26, eutran-28,
           |                         eutran-29, eutran-30, eutran-38, eutran-39, eutran-40, eutran-41,
           |                         eutran-42, eutran-43, eutran-48, eutran-66, eutran-71, utran-19
           |                current: eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7,
           |                         eutran-8, eutran-12, eutran-13, eutran-14, eutran-17, eutran-18,
           |                         eutran-19, eutran-20, eutran-25, eutran-26, eutran-28, eutran-29,
           |                         eutran-30, eutran-38, eutran-39, eutran-40, eutran-41, eutran-42,
           |                         eutran-43, eutran-48, eutran-66, eutran-71
  ----------------------------------
  IP       |              supported: ipv4, ipv6, ipv4v6
  ----------------------------------
 3GPP     |                   imei: 354175759991310
           |          enabled locks: fixed-dialing
           |            operator id: 40445
           |          operator name: airtel
           |           registration: home
  ----------------------------------
  3GPP EPS |   ue mode of operation: csps-2
           |    initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
           |     initial bearer apn: internet
           | initial bearer ip type: ipv4v6
  ----------------------------------
  SIM      |       primary sim path: /org/freedesktop/ModemManager1/SIM/0
           |         sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
           |                         slot 2: /org/freedesktop/ModemManager1/SIM/1
  ----------------------------------
  Bearer   |                  paths: /org/freedesktop/ModemManager1/Bearer/5


More information about the ModemManager-devel mailing list