I'm trying to get my Huawei E5576-320 modem router to work via the USB link on Alpine Linux 3.12. I made some progress with manual switching the device into wwan or Hilink mode. However, on either end, I have no clue how to tell the modem to bring me online.
So, this is the situation so far:
- I want to use the modem as wwan device on a headless Alpine system
- For now, I've disabled WIFI in the modem's web interface (don't know if this matters for the wwan use of the USB connection)
- When I connect the modem with a MacBook Pro running macOS, the device switches to 12d1:14db and automatically connects me to the internal web interface and also succesfully enables internet access via the USB link. So the device itself basically works.
Now, to the alpine machine.
- When I connect the modem to the machine, it presents itself as expected with 12d1:1f01
- There is no udev installed yet and I hope I don't need it when setting up the /etc/network/interfaces file correctly with pre-up rules
- I use the following usb_modeswitch config file, stored under /etc/usb-modeswitch.d/12d1
Code: Select all
# Huawei E353 (3.se) and others
# Switch from default mass storage device mode 12d1:1f01 to ...
TargetVendor=0x12d1
# WWAN mode 12d1:155e
TargetProduct=0x155e
MessageContent="55534243123456780000000000000011063000000100010000000000000000"
# Broadband modem mode 12d1:1442
#TargetProduct=0x1442
#MessageContent="55534243000000000000000000000011060000000000000000000000000000"
# "ethernet" mode
#TargetProductList="14db,14dc"
#HuaweiNewMode=1
Code: Select all
# usb_modeswitch -v 12d1 -p 1f01 -c /etc/usb_modeswitch.d/12d1:1f01
Look for target devices ...
No devices in target mode or class found
Look for default devices ...
Found devices in default mode (1)
Access device 003 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x01 (out) and 0x81 (in)
Looking for active drivers ...
OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Could not reset endpoint (probably harmless): -99
Reset message endpoint 0x01
Could not reset endpoint (probably harmless): -4
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!
In WWAN mode (I will omit the ethernet mode from here, as I do not intend to use it if I don't have to), there is a new wwan0 network interface:
Code: Select all
# ip a
7: wwan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
There is also a new serial device:
Code: Select all
# ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Jun 12 17:59 /dev/ttyUSB0
Code: Select all
[ 184.209207] usb 1-2: USB disconnect, device number 3
[ 189.497604] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[ 189.639752] usb 1-2: New USB device found, idVendor=12d1, idProduct=155e, bcdDevice= 1.02
[ 189.639768] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 189.639784] usb 1-2: Product: HUAWEI_MOBILE
[ 189.639792] usb 1-2: Manufacturer: HUAWEI_MOBILE
[ 189.693978] usbcore: registered new interface driver usbserial_generic
[ 189.694043] usbserial: USB Serial support registered for generic
[ 189.702886] usbcore: registered new interface driver option
[ 189.702955] usbserial: USB Serial support registered for GSM modem (1-port)
[ 189.722762] cdc_ncm 1-2:1.1: MAC-Address: xx:xx:xx:xx:xx:xx
[ 189.722778] cdc_ncm 1-2:1.1: setting rx_max = 16384
[ 189.724330] cdc_ncm 1-2:1.1 wwan0: register 'cdc_ncm' at usb-0000:00:14.0-2, Mobile Broadband Network Device, xx:xx:xx:xx:xx:xx
[ 189.724436] usbcore: registered new interface driver cdc_ncm
[ 189.724477] option 1-2:1.0: GSM modem (1-port) converter detected
[ 189.725244] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 189.732600] usbcore: registered new interface driver cdc_wdm
[ 189.737610] usbcore: registered new interface driver cdc_mbim
I tried issuing the following command with the appropriate apn with no visual result:
Code: Select all
# echo -ne '\r\nAT^NDISUP=1,1,"xxxxxx"\r\n' > /dev/ttyUSB0
EDIT: I've also tried to configure the wwan port via /etc/network/interfaces:
Code: Select all
allow-hotplug wwan0
iface wwan0 inet dhcp
wwan_apn "xxxxx"
pre-up /usr/sbin/usb_modeswitch -v 12d1 -p 1f01 -c /etc/usb_modeswitch.d/12d1:1f01
Code: Select all
#ifup wwan0
I would like to use as less additional tools/packages as possible to keep my installation lean and clean. However, from that point, the knowledge I gathered is simply not enough to continue without help.
Thanks in advance!