I recently digged out my Huawei E303s-2 and plugged it to my TP-Link TL-WR1043NDv2 running Chaos Calmer stable release.
Reason enough to necropost in this thread...
The E303 is always being discovered as -or should I write: 'modeswitched to' a CDC device.
It turned out, that /etc/usb-mode.json switches 12d1:1f01 to 12d1:14db.
The message content, that will initialize a serial modem "55534243000000000000000000000011060000000000000000000000000000", is missing in the json's messages array there.
The block for 12d1:1f01 in the original usb-mode.json is:
"12d1:1f01": {
"*": {
"t_vendor": 4817,
"t_product": [ 5339, 5340 ],
"mode": "HuaweiNew",
"no_driver": true,
"msg": [ ]
}
},
So target devices are 14db an 14dc. (=CDC)
I tried to supply an additional, custom config, but that was inconclusive:
As a result of that custom modeswitch I am getting three modem ports, for a device with the ids 12d1:1001, but the original usb-modeswitch contained another modeswitch ...
"12d1:1001": {
"*": {
"t_class": 255,
"mode": "Huawei",
"msg": [ ]
}
},
The modem is being switched back an forth in between these, rendering it unusable.
Hence I replaced the usb-mode.json with a file containing the following:
{
"messages" : [
"55534243000000000000000000000011060000000000000000000000000000"
],
"devices" : {
"12d1:1f01": {
"*": {
"t_vendor": 4817,
"t_product": [ 4097, 5339, 5340, 7937 ],
"msg": [ 0 ],
}
},
}
}
Now I am getting a "stable" 12d1:1001 with three modem ports, that I can talk to through socat:
socat - file:/dev/ttyUSB0,raw,echo=0,crtscts,crnl
But I seem to be unable to connect with this... ATD*99# throws "NO CARRIER".
(The modem is unlocked, it's working flawlessly on Ubuntu Linux 14.04 LTS).
I am wondering why now OpenWRT seems to use HiLink modes on those modems? I would have expected, that users would prefer to let their routers do PPP and NAT to circumvent problems of NAT trunks on the one hand or to use officially assigned IPs over mobile internet directly in order to use port forwards and such. (Here in Austria you can apply for a non RFC1918 IPv4 address at least at Hutchison Drei (3) using "Open Internet" oder with VOLmobil (and probably others) in exchange for a monthly extra rate.
Who is the maintainer of the json-style usb-modeswitch?
What is the official strategy of OpenWRT developers to cope with 3G/4G modems?
Update: It seems, that the on the OpenWRT wiki the basic recommendation is not to install the usb-modeswitch in these cases...
I'd suggest to keep to different modeswitch-DBs - one for those preferring serial mode (which I guess are almost all OpenWRT users in favour of network neutrality) and one for the easy to use snapshots (using hilink).
(Last edited by epek on 7 Nov 2015, 11:44)