Huawei ME909s-120 modem goes offline and disappears
Bruno Vetter
bruno.vetter at outlook.com
Sun Dec 22 16:29:52 UTC 2019
> I don't see any such port exposed in your
> logs.
Some more ports seem to exist:
root at 9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Dec 20 16:13 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Dec 20 16:13 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Dec 20 16:13 /dev/ttyUSB2
crw-rw---- 1 root dialout 188, 3 Dec 20 16:13 /dev/ttyUSB3
crw-rw---- 1 root dialout 188, 4 Dec 20 16:13 /dev/ttyUSB4
crw-rw---- 1 root dialout 188, 5 Dec 20 16:13 /dev/ttyUSB5
root at 9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# find . -name interface|sort
./1-1.4:2.0/interface
./1-1.4:2.1/interface
./1-1.4:2.2/interface
./1-1.4:2.3/interface
./1-1.4:2.4/interface
./1-1.4:2.5/interface
./1-1.4:2.6/interface
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
> Does your
> system have the huawei_cdc_nmc and cdc-wdm drivers installed?
root at 9d52738:/lib/modules/4.19.71/kernel/drivers# find .|grep wdm
./usb/class/cdc-wdm.ko
root at 9d52738:/lib/modules/4.19.71/kernel/drivers# find .|grep huawei
./net/usb/huawei_cdc_ncm.ko
> Do you have the cdc_mbim driver
> installed in your system?
root at 9d52738:/lib/modules/4.19.71/kernel/drivers# find .|grep mbim
./net/usb/cdc_mbim.ko
> Do you have the "usb modeswitch" program
> installed?
Yes, I have. But so far, I had only used this for LTE sticks that present themselves as a mass storage initially. My impression was that for the Huawei 909 (mpcie) modeswitch was not necessary - but I have no proof for that.
> 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"
...
We had used a similar procedure for a Simcom 7100 modem:
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="00",SYMLINK+="modemS0"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="01",SYMLINK+="modemS1"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02",SYMLINK+="modemS2"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="03",SYMLINK+="modemS3"KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="01",SYMLINK+="modemGPS"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02",SYMLINK+="modemAT"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="03",SYMLINK+="modemPPP"
Or under Buildroot without udev, I used sth. like this:
#!/bin/sh
case "$1" in
start)
echo "Setting up modem..."
mknod /dev/ppp c 108 0
n=0
until [ $n -ge 12 ]
do
[ -c /dev/ttyUSB5 ] && break
n=$(( $n+1 ))
sleep 5
done
TTYUSB=$(find /sys/devices -maxdepth 8 -name 'ttyUSB?'|xargs -i sh -c 'echo $(basename {}) $(cat {}/../interface)')
set -- $(echo "$TTYUSB"|grep Modem)
if [ -n "$1" ]
then
echo "Discovered modem port @$1 -> /dev/modemPPP"
ln -s $1 /dev/modemPPP
else
echo "Could not find modem port"
exit 1
fi
set -- $(echo "$TTYUSB"|grep Pcui)
if [ -n "$1" ]
then
echo "Discovered pcui port @$1 -> /dev/modemAT"
ln -s $1 /dev/modemAT
else
echo "Could not find pcui port"
exit 1
fi
;;
stop)
;;
restart|reload)
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
> Also, could you get the output of "lsusb -v -d 12d1:15c1" and
> "usb-devices" and attach it here?
Sure, it's attached.
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191222/a581f5b9/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lsusb.txt
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191222/a581f5b9/attachment-0001.txt>
More information about the ModemManager-devel
mailing list