Huawei ME909s-120 modem goes offline and disappears

Aleksander Morgado aleksander at aleksander.es
Mon Dec 23 08:27:10 UTC 2019


On 22/12/19 17:29, Bruno Vetter wrote:
> root at 9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# find . -name interface|sort|xargs cat
> CDC Ethernet Control Model (ECM)
> CDC Ethernet Data
> Huawei Mobile Connect - Modem
> Huawei Mobile Connect - Application
> Huawei Mobile Connect - Pcui
> Huawei Mobile Connect - Ctrl
> Huawei Mobile Connect - Serial B

This is something we could use ourselves as well to automatically detect port types, I'll add a task to handle this.

> 
>> Does the Huawei command reference
>> specify which port is which?
> 
> No. I think you cannot rely on a fixed mapping between ttyUSBx and a specific modem port. On a different software stack (not balenaOS) we had followed a suggestion to create symlinks via udev. Something similar to this:
> KERNELS=="1-1.3*", SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02", SYMLINK+="modemPPP"
> KERNELS=="1-1.3*", SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="04", SYMLINK+="modemAT"
> ...

This info is fine. We also never bind the interface name to the type, we also bind the interface number as in your example above, but not with symlinks.

Could you edit the huawei port type rules file and add these three lines somewhere in the middle of the other rules?
$ vim /lib/udev/rules.d/77-mm-huawei-net-port-types.rules
SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="15c1", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_PPP}="1"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="15c1", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"

Then:
$ sudo udevadm control --reload
$ sudo udevadm trigger
$ sudo sytemctl restart ModemManager

Then retry connection/disconnection attempts, and attach debug logs.


Anyway, according to the lsusb output, your modem has 3 different USB configurations, and configuration #3 is a full MBIM configuration. This is what you should definitely try to use, and forget about PPP or other huawei-specific setup all together (although please try the test above as well...). If I'm not mistaken, usb_modeswitch has some logic to "prefer MBIM configurations" always and do the USB configuration switching automatically. You could try to test that running this:

$ sudo usb_modeswitch -v 12d1 -p 15c1 --configuration 3

After that, the module should re-enumerate using MBIM. I assume your setup has libmbim and ModemManager installed with MBIM support as well, right?


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list