Cellular modem not starting when used in conjunction with bluetooth application

Hi there,

I’m running into a problem where modemManager does not initialize the cellular modem(Quectel EC25) inserted into my Balena Fin. This is similar to this issue.

In the end this causes the modem to not be listed:

root@06df7f7:~# mmcli -L
No modems were found

ModemManager logs:

root@06df7f7:~# journalctl -u ModemManager --no-pager
-- Logs begin at Fri 2020-01-03 15:06:46 UTC, end at Wed 2020-01-29 11:24:47 UTC. --
Jan 29 11:23:48 localhost ModemManager[696]: ModemManager (version 1.12.2) starting in system bus...
Jan 29 11:23:50 localhost ModemManager[696]: [/dev/cdc-wdm0] Opening device with flags 'version-info, proxy'...
Jan 29 11:23:50 localhost ModemManager[696]: [/dev/cdc-wdm0] loaded driver of cdc-wdm port: qmi_wwan
Jan 29 11:23:50 localhost ModemManager[696]: [/dev/cdc-wdm0] created endpoint
Jan 29 11:23:50 localhost ModemManager[696]: cannot connect to proxy: Could not connect: Connection refused
Jan 29 11:23:50 localhost ModemManager[696]: spawning new qmi-proxy (try 1)...
Jan 29 11:23:50 localhost ModemManager[696]: [/dev/cdc-wdm0] Checking version info (20 retries)...
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0] QMI Device supports 27 services:
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    ctl (1.5)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    wds (1.67)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    dms (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    nas (1.25)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    qos (1.12)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    wms (1.10)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    auth (1.3)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    at (1.2)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    voice (2.1)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    cat2 (2.24)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    uim (1.46)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    pbm (1.4)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    test (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    loc (2.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    sar (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    ts (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    tmd (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    wda (1.16)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    csvt (1.1)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    coex (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    pdc (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    rfrpe (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    dsd (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    unknown [0x2d] (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    unknown [0x30] (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    unknown [0x32] (1.0)
Jan 29 11:23:50 06df7f7 ModemManager[696]: [/dev/cdc-wdm0]    unknown [0x36] (1.0)
Jan 29 11:23:51 06df7f7 ModemManager[696]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc2/mmc2:0001/mmc2:0001:1': not supported by any plugin
Jan 29 11:23:51 06df7f7 ModemManager[696]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1': not supported by any plugin
Jan 29 11:24:00 06df7f7 ModemManager[696]: (tty/ttyUSB0) failed to parse QCDM version info command result: -7
Jan 29 11:24:04 06df7f7 ModemManager[696]: (net/uap0): released by device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc2/mmc2:0001/mmc2:0001:1'
Jan 29 11:24:04 06df7f7 ModemManager[696]: (net/wlan0): released by device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc2/mmc2:0001/mmc2:0001:1'
Jan 29 11:24:04 06df7f7 ModemManager[696]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc2/mmc2:0001/mmc2:0001:1': Operation was cancelled
Jan 29 11:24:04 06df7f7 ModemManager[696]: (net/wwan0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2'
Jan 29 11:24:04 06df7f7 ModemManager[696]: (usbmisc/cdc-wdm0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2'
Jan 29 11:24:04 06df7f7 ModemManager[696]: (net/eth0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1'
Jan 29 11:24:04 06df7f7 ModemManager[696]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1': Operation was cancelled
Jan 29 11:24:04 06df7f7 ModemManager[696]: (tty/ttyUSB1): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2'
Jan 29 11:24:04 06df7f7 ModemManager[696]: (tty/ttyUSB2): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2'
Jan 29 11:24:04 06df7f7 ModemManager[696]: (tty/ttyUSB0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2'
Jan 29 11:24:04 06df7f7 ModemManager[696]: (tty/ttyUSB3): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2'
Jan 29 11:24:06 06df7f7 ModemManager[696]: [plugin manager] task 0,ttyUSB1: error when checking support with plugin 'Quectel': 'Operation was cancelled'
Jan 29 11:24:06 06df7f7 ModemManager[696]: [plugin manager] task 0,ttyUSB1: failed: Operation was cancelled
Jan 29 11:24:06 06df7f7 ModemManager[696]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2': Operation was cancelled

If i SSH into the container and run mmcli -s the modemManager will retry and eventually find the modem.

The origin seems to be application containers running in priviliged mode and network mode:host.
In the previously linked issue a solution is proposed to use newer balena images which do not need these functions and udev.

We do use these newer images but still require priviliged mode and network mode:host in order for our application to support bluetooth.

Solutions I can think of:

  1. Fix the cause of the problem
  2. Setup a container to watch internet connectivity: If there’s a problem then run mmcli -S to retry modem configuration / initialization.

Suggestions? I’d prefer the first solution but currently do not know how I should go into resolving this.
The 2nd could work as a patch.

We are running BalenaOS 2.38.0 and 2.46.1 on the Balena Fin.

1 Like

Hello @rickvm, first of all welcome to the balena forums : )

Have you seen also this other thread which is very similar to the issue you describe? Could you follow my teammate @majorz’s advice there?
https://forums.balena.io/t/cant-easily-connect-to-the-internet-using-quectel-ec20-on-my-balenafin-v1-1/5547/31

Next, is it possible for you to share your docker files?
It’d help if you could slim down your docker files to the minimum that cause this problem. Then we could attempt to reproduce the issue on our end.

Cheers…