<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">> I don't see any such port exposed in your<br>
> logs.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Some more ports seem to exist:</div>
<div class="PlainText"><span>root@9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# ls -l /dev/ttyUSB*<br>
</span>
<div>crw-rw---- 1 root dialout 188, 0 Dec 20 16:13 /dev/ttyUSB0<br>
</div>
<div>crw-rw---- 1 root dialout 188, 1 Dec 20 16:13 /dev/ttyUSB1<br>
</div>
<div>crw-rw---- 1 root dialout 188, 2 Dec 20 16:13 /dev/ttyUSB2<br>
</div>
<div>crw-rw---- 1 root dialout 188, 3 Dec 20 16:13 /dev/ttyUSB3<br>
</div>
<div>crw-rw---- 1 root dialout 188, 4 Dec 20 16:13 /dev/ttyUSB4<br>
</div>
<span>crw-rw---- 1 root dialout 188, 5 Dec 20 16:13 /dev/ttyUSB5</span><br>
</div>
<div class="PlainText"><span><span>root@9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# find . -name interface|sort<br>
</span>
<div>./1-1.4:2.0/interface<br>
</div>
<div>./1-1.4:2.1/interface<br>
</div>
<div>./1-1.4:2.2/interface<br>
</div>
<div>./1-1.4:2.3/interface<br>
</div>
<div>./1-1.4:2.4/interface<br>
</div>
<div>./1-1.4:2.5/interface<br>
</div>
<div>./1-1.4:2.6/interface<br>
</div>
<div>root@9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# find . -name interface|sort|xargs cat<br>
</div>
<div>CDC Ethernet Control Model (ECM)<br>
</div>
<div>CDC Ethernet Data<br>
</div>
<div>Huawei Mobile Connect - Modem<br>
</div>
<div>Huawei Mobile Connect - Application<br>
</div>
<div>Huawei Mobile Connect - Pcui<br>
</div>
<div>Huawei Mobile Connect - Ctrl<br>
</div>
<span>Huawei Mobile Connect - Serial B</span><br>
</span></div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><span style="background: var(--white);">> Does your</span><br>
</div>
<div class="PlainText">> system have the huawei_cdc_nmc and cdc-wdm drivers installed?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><span>root@9d52738:/lib/modules/4.19.71/kernel/drivers# find .|grep wdm<br>
</span>
<div>./usb/class/cdc-wdm.ko<br>
</div>
<div>root@9d52738:/lib/modules/4.19.71/kernel/drivers# find .|grep huawei<br>
</div>
<span>./net/usb/huawei_cdc_ncm.ko</span><br>
</div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><span style="background: var(--white);">> Do you have the cdc_mbim driver</span><br>
</div>
<div class="PlainText">> installed in your system?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><span>root@9d52738:/lib/modules/4.19.71/kernel/drivers# find .|grep mbim<br>
</span><span>./net/usb/cdc_mbim.ko</span><br>
</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">> Do you have the "usb modeswitch" program<br>
> installed?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">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.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><span style="background: var(--white);">> Does the Huawei command reference</span><br>
> specify which port is which?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">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:</div>
<div class="PlainText"><span>KERNELS=="1-1.3*", SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02", SYMLINK+="modemPPP" <br>
</span><span>KERNELS=="1-1.3*", SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="04", SYMLINK+="modemAT"</span><br>
</div>
<div class="PlainText"><span>...</span></div>
<div class="PlainText">We had used a similar procedure for a Simcom 7100 modem:</div>
<div class="PlainText"><span>KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="00",SYMLINK+="modemS0"
<br>
</span>
<div>KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="01",SYMLINK+="modemS1"
<br>
</div>
<div>KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02",SYMLINK+="modemS2"
<br>
</div>
<div>KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="03",SYMLINK+="modemS3"<span style="background: var(--white);">KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="01",SYMLINK+="modemGPS"
</span></div>
<div>KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02",SYMLINK+="modemAT"
<br>
</div>
<span>KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="03",SYMLINK+="modemPPP"</span><br>
</div>
<div class="PlainText"><span><br>
</span></div>
<div class="PlainText"><span>Or under Buildroot without udev, I used sth. like this:</span></div>
<div class="PlainText"><span><br>
</span></div>
<div class="PlainText"><span><span>#!/bin/sh <br>
</span>
<div> <br>
</div>
<div>case "$1" in
<br>
</div>
<div> start)
<br>
</div>
<div> echo "Setting up modem..."
<br>
</div>
<div> mknod /dev/ppp c 108 0
<br>
</div>
<div> n=0 <br>
</div>
<div> until [ $n -ge 12 ] <br>
</div>
<div> do
<br>
</div>
<div> [ -c /dev/ttyUSB5 ] && break
<br>
</div>
<div> n=$(( $n+1 )) <br>
</div>
<div> sleep 5 <br>
</div>
<div> done
<br>
</div>
<div> TTYUSB=$(find /sys/devices -maxdepth 8 -name 'ttyUSB?'|xargs -i sh -c 'echo $(basename {}) $(cat {}/../interface)') <br>
</div>
<div> set -- $(echo "$TTYUSB"|grep Modem) <br>
</div>
<div> if [ -n "$1" ]
<br>
</div>
<div> then
<br>
</div>
<div> echo "Discovered modem port @$1 -> /dev/modemPPP" <br>
</div>
<div> ln -s $1 /dev/modemPPP
<br>
</div>
<div> else
<br>
</div>
<div> echo "Could not find modem port"
<br>
</div>
<div> exit 1
<br>
</div>
<div> fi
<br>
</div>
<div> set -- $(echo "$TTYUSB"|grep Pcui)
<br>
</div>
<div> if [ -n "$1" ]
<br>
</div>
<div> then
<br>
</div>
<div> echo "Discovered pcui port @$1 -> /dev/modemAT" <br>
</div>
<div> ln -s $1 /dev/modemAT <br>
</div>
<div> else
<br>
</div>
<div> echo "Could not find pcui port" <br>
</div>
<div> exit 1
<br>
</div>
<div> fi
<br>
</div>
<div> ;;
<br>
</div>
<div> stop) <br>
</div>
<div> ;;
<br>
</div>
<div> restart|reload) <br>
</div>
<div> ;;
<br>
</div>
<div> *)
<br>
</div>
<div> echo "Usage: $0 {start|stop|restart}" <br>
</div>
<div> exit 1
<br>
</div>
<div>esac
<br>
</div>
<div> <br>
</div>
<span>exit $?</span><br>
</span></div>
<div class="PlainText"><br>
> Also, could you get the output of "lsusb -v -d 12d1:15c1" and<br>
> "usb-devices" and attach it here?<br>
<br>
Sure, it's attached.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Bruno</div>
</span></font></div>
</div>
</body>
</html>