Repository navigation
Description
I have been trying to get my E3372 to work in NCM-Mode in the current trunk.
This has been working quite well for a while now, when manually sending the AT^NDISDUP,1,1,"apn" to /dev/ttyUSB0, and setting the wwan0 to proto dhcp.
(provided that all the necessary packages, esp. kmod-usb-net-huawei-cdc-ncm are installed)
But using the builtin (i.e. setting the proto for wwan0 to wwan or ncm) tools, it did not work at all.
- proto wwan
There the issue is, that the Stick has USB Vendor/ProductID 12d1:1506 and is therefore recognized as something else, which defaults to using ppp instead of ncm
I don't know if the E367/E398 support NCM, but if yes then it would probably be a good idea to change that.
And there are a few issues at hand:
ncm.sh uses getcardinfo.gcom to select the device manufacturer, but my stick returns the line just "Manufacturer:" without anything which leads to an empty string. This then leads to all the sent commands being empty which does obviously not work.
When fixing the manufacturer string to "huawei" in ncm.sh, it basically works, but then the initialization fails at the AT+CGDCONT=1,... command, which the stick does not support.
From what my tests have shown, the stick does not need any initialization at all besides the AT^NDISDUP,1,1,...
In order to create a clean solution, I would recommend:
Somehow reworking the ncm.sh in order how to decide which commandset to use. Maybe a similar way as in wwan.sh could be possible? (selection based on USB Vendor&DeviceID).
And as it is clear now that not all devices by one manufacturer need the same commands, a bit more differentiation will be needed in ncm.json.
I'm definitely willing to help to resolve this issue, but I'm not yet familiar enough with the codebase to come up with a solution all on my own.
Activity
adrianmihalko commentedon Oct 17, 2017
Any update on this? I can't use my Huawei modem with OpenWRT/LEDE.
The guide is useless:
https://wiki.openwrt.org/doc/recipes/ethernetoverusb_ncm
halms commentedon Oct 18, 2017
I digged into this a bit back then copied a bit together a "new" protocol.
It is basically still just writing the AT^NDISDUP to a device file, but automates this a bit better.
As before, the packages
kmod-usb-net-huawei-cdc-ncmand probablyusb-modeswitchhave to be installed.The following files need to go under
/lib/netifd/protohttps://gist.github.com/halmi/70ac29a31878f8675366459a3a4b9fe2
There are two variants, but I mainly used the
huawei_dhcpone.I then configured the interface as
Took me quite a while to figure all this out, but it has been running very nicely for over a year now.
adrianmihalko commentedon Oct 18, 2017
Hello Halmi,
I have kmod-usb-net-huawei-cdc-ncm installed, but I have no device /dev/cdc-wdm0.
Issuing command:
echo -e "AT^NDISDUP=1,1,"internet"\r" > /dev/ttyUSB0
...the LED on the modem constantly lit, which means it is connected to the network.
I have no idea why I don't have /dev/cdc-wdm0 device, do you have any idea?
usbmode -l is empty, interesting. But If I am not wrong it must works, because 12d1:1506 is a modified indentifier.
In rPi where I have this modem working I have modeswitch config:
adrianmihalko commentedon Oct 18, 2017
Edit:
Ok I reinstalled everything, including Lede on rPi. I installed kmod-usb-net-huawei-cdc-ncm as you suggested.
Now, /dev/cdc-wdm0 is recognized correctly.
Installed /lib/netifd/proto/huawei_dhcp.sh, chmod +x…
Created network interface in /etc/config/network as you wrote.
Result: It's working. Yeah. :)
1, it does not connect on start. How do you manage this?
2, What happens if there is a network problem, do you monitor your connection and in case restart the interface? Or just simple problem the dhcp from your ISP expiring, I think you need to restart interface too.
nixnuex commentedon Nov 11, 2017
Tried the
huawei_dhcpwith my Huawei 3372 non-HiLink USB LTE Adapter and it worked out of the box! Thanks a lot! Started up automatically on boot, will see if it always stays online.nss-tools: stop assuming every board is wired like the GL-B3000
nss-tools: stop assuming every board is wired like the GL-B3000
x64: add legacy IDE, fix VirtualBox bug openwrt#84 and Fujitsu Futro …
bpi-r4pro-8x: notes - sweep 2026-09-23: forum openwrt#17248 openwrt#84-…
nss-tools: stop assuming every board is wired like the GL-B3000