Modem manager looses connection to Huawei MS2372 Cellular Modem

Hi!

I am trying to connect a Huawei MS2372 Cellular Modem to my RPi 3B.

This works to some extent, as I have been able to ping 8.8.8.8 and connect to the device from the dashboard. However, after a few minutes (or seconds), it brakes, network manager reports no modem found:

root@44ca790:~# mmcli -L
No modems were found

Why doesn’t my modem work consistently?

The usb device is found, and it appears to not be a mode switching issue
since this command root@44ca790:~# usb-devices lists the modem:

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1506 Rev=01.02
S:  Manufacturer=HUAWEI_MOBILE
S:  Product=HUAWEI_MOBILE
C:  #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=2mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=03 Driver=option
I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=12 Driver=option
I:  If#=0x3 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=16 Driver=huawei_cdc_ncm

Here is a snippet from journalctl -u ModemManager:

Sep 17 13:13:03 44ca790 ModemManager[838]: Couldn't find associated cdc-wdm port for 'net/wwan0'
Sep 17 13:13:03 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/1: 3GPP Registration state changed (registering -> home)
Sep 17 13:13:03 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/1: state changed (connecting -> connected)
Sep 17 13:13:03 44ca790 ModemManager[838]: Simple connect state (8/8): All done
Sep 17 13:13:10 44ca790 ModemManager[838]: (net/wlan0): released by device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
Sep 17 13:13:10 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': Operation was cancelled
Sep 17 13:13:10 44ca790 ModemManager[838]: (usbmisc/cdc-wdm0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Sep 17 13:13:10 44ca790 ModemManager[838]: (net/wwan0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Sep 17 13:13:10 44ca790 ModemManager[838]: (tty/ttyUSB0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:03:16 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.1': not supported by any plugin
Jan 06 13:03:16 44ca790 ModemManager[838]: (tty/ttyUSB2): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:03:16 44ca790 ModemManager[838]: (tty/ttyUSB1): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:04:29 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': not supported by any plugin
Jan 06 13:04:29 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.1': not supported by any plugin
Jan 06 13:04:42 44ca790 ModemManager[838]: (net/wlan0): released by device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
Jan 06 13:04:42 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': Operation was cancelled
Jan 06 13:04:44 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.1': not supported by any plugin
Jan 06 13:04:47 44ca790 ModemManager[838]: [device /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3] creating modem with plugin 'Huawei' and '5' ports
Jan 06 13:04:47 44ca790 ModemManager[838]: Could not grab port (tty/ttyUSB1): 'Cannot add port 'tty/ttyUSB1', unhandled serial type'
Jan 06 13:04:47 44ca790 ModemManager[838]: Could not grab port (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
Jan 06 13:04:47 44ca790 ModemManager[838]: Modem for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3' successfully created
Jan 06 13:04:51 44ca790 ModemManager[838]: couldn't load list of Own Numbers: 'Not found'
Jan 06 13:04:51 44ca790 ModemManager[838]: Modem: state changed (unknown -> disabled)
Jan 06 13:04:51 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/2: state changed (disabled -> enabling)
Jan 06 13:04:51 44ca790 ModemManager[838]: Simple connect started...
Jan 06 13:04:51 44ca790 ModemManager[838]: Simple connect state (4/8): Wait to get fully enabled
Jan 06 13:04:52 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/2: state changed (enabling -> enabled)
Jan 06 13:04:52 44ca790 ModemManager[838]: Simple connect state (5/8): Register
Jan 06 13:04:52 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/2: 3GPP Registration state changed (unknown -> registering)
Jan 06 13:04:52 44ca790 ModemManager[838]: Simple connect state (6/8): Bearer
Jan 06 13:04:52 44ca790 ModemManager[838]: Simple connect state (7/8): Connect
Jan 06 13:04:52 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/2: state changed (enabled -> connecting)
Jan 06 13:04:52 44ca790 ModemManager[838]: Couldn't find associated cdc-wdm port for 'net/wwan0'
Jan 06 13:04:52 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/2: 3GPP Registration state changed (registering -> home)
Jan 06 13:04:52 44ca790 ModemManager[838]: Modem /org/freedesktop/ModemManager1/Modem/2: state changed (connecting -> connected)
Jan 06 13:04:52 44ca790 ModemManager[838]: Simple connect state (8/8): All done
Jan 06 13:04:59 44ca790 ModemManager[838]: (net/wlan0): released by device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
Jan 06 13:04:59 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': Operation was cancelled
Jan 06 13:05:01 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.1': not supported by any plugin
Jan 06 13:05:02 44ca790 ModemManager[838]: (usbmisc/cdc-wdm0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:05:02 44ca790 ModemManager[838]: (net/wwan0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:05:02 44ca790 ModemManager[838]: (tty/ttyUSB0): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:05:02 44ca790 ModemManager[838]: (tty/ttyUSB1): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:05:02 44ca790 ModemManager[838]: (tty/ttyUSB2): released by device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
Jan 06 13:06:14 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': not supported by any plugin
Jan 06 13:06:14 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.1': not supported by any plugin
Jan 06 13:06:30 44ca790 ModemManager[838]: (net/wlan0): released by device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
Jan 06 13:06:30 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': Operation was cancelled
Jan 06 13:06:31 44ca790 ModemManager[838]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.1': not supported by any plugin
Jan 06 13:06:33 44ca790 ModemManager[838]: [device /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3] creating modem with plugin 'Huawei' and '5' ports
Jan 06 13:06:33 44ca790 ModemManager[838]: Could not grab port (tty/ttyUSB1): 'Cannot add port 'tty/ttyUSB1', unhandled serial type'
Jan 06 13:06:33 44ca790 ModemManager[838]: Could not grab port (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
Jan 06 13:06:33 44ca790 ModemManager[838]: Modem for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3' successfully created

The system connection file:

$ cat system-config/my_cellular        
[connection]
id=cellular
type=gsm
autoconnect=true

[gsm]
apn=telia
pin=1234

[serial]
baud=115200

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Is there anything I can try or check to resolve this issue?

Hi, I have the same modem with me here and will check it out and get back to you.
Thanks,
Zahari

Hi, I checked the modem but I do not see any problems with it.

The output of usb-devices is exactly the same so it is the same modem model and revision.

Installed balenaOS 2.43.0+rev1 on a RPi 3B+ device from an empty application. I did not push any Dockerfile/container to it.

I used the following minimal connection profile:

[connection]
id=cellular
type=gsm
autoconnect=true

[ipv4]
method=auto

[ipv6]
method=ignore

I did not specify APN as it is retrieved automatically.

As a side note you may disable your PIN with mmcli -m 0 --pin="1234" --disable-pin.

A few things you may try:
It is possible that the RPi is not powered well enough/bad USB power cable. You may also try to connect it to other USB ports. Also you may check whether the modem is working correctly from another device/computer. And also you may check whether you will have better results with another SIM card.

Please let us know if any of those solves the issue for you.

Thanks,
Zahari

Thanks for looking into this Zahari.

My issue went away when I disabled udev in my application container. As described here Cellular not connecting on boot.

You may want to update the docs.