[OpenWrt-Devel] Huawei 3372 NCM support on CC not working
Vittorio G (VittGam)
openwrt at vittgam.net
Wed Jul 1 23:19:05 EDT 2015
Hello,
Are we talking about E3372h or E3372s?
I've got E3372h working by doing this:
echo 6000 > /sys/class/net/wwan0/cdc_ncm/tx_max
echo 0 > /sys/class/net/wwan0/cdc_ncm/min_tx_pkt
But it seems it didn't help an E3372s owner unfortunately. :/
My stick is a E3372h-153 with firmware 21.180.01.00.00. E3372s and h have
different hardware but same external look...
I'm forwarding here the mail I sent to modemmanager-devel some days ago.
-----
Hello,
I faced the deaf wwan0 problem with a Huawei E3372h-153.
I'm not using ModemManager but OpenWrt CC-rc2, with Linux 3.18.14.
I've enabled the debug port of the android running in the stick. (Yes, it's
running android but without dalvik, don't ask me why since it isn't even
tethering in the standard android way... The embedded linux can't even see the
modem interface via ifconfig, it's just a relay between the vxworks that handles
the modem and the usb port. Mah.)
To enable the debug port, just search on the 'net and you will easily find the
commands. You can brick the modem permanently if you play too much with it; so
I'm not going to write the commands here, since I don't want any responsibility
if you happen to break your internet key this way. Be careful! ;)
Anyway, I've seen that the android dmesg log was full of errors, one line per packet
sent from the host to the modem:
[002173183ms] ====ERROR:gnet_copy_skb skb->len=526 should be greater than len=342 + offset=184====
[002173935ms] ====ERROR:gnet_copy_skb skb->len=226 should be greater than len=42 + offset=184====
[002176186ms] ====ERROR:gnet_copy_skb skb->len=526 should be greater than len=342 + offset=184====
[002176207ms] ====ERROR:gnet_copy_skb skb->len=226 should be greater than len=42 + offset=184====
[002177205ms] ====ERROR:gnet_copy_skb skb->len=226 should be greater than len=42 + offset=184====
[002178205ms] ====ERROR:gnet_copy_skb skb->len=226 should be greater than len=42 + offset=184====
[002179187ms] ====ERROR:gnet_copy_skb skb->len=526 should be greater than len=342 + offset=184====
After testing many things, I've found the "magic" settings that do work:
echo 6000 > /sys/class/net/wwan0/cdc_ncm/tx_max
echo 0 > /sys/class/net/wwan0/cdc_ncm/min_tx_pkt
After issuing these commands, the interface works fine! (Or at least it seems
for now...)
Of course, I think that it's way far from perfect, but it's a starting point
for debugging at least.
I've seen that setting tx_max to 1698 (the minimum) only allows packets up to
1496 bytes to work (ping -s 1468).
If I increase the tx_max, the limit changes of course, and 1500-byte packets
get sent correctly.
But if the tx_max is too big, like with the default of 16384, a lot of delay
is introduced. It seems that a buffer needs to get full before the packets
are sent to the modem and then out to the internet... (I've checked with tcpdump
on the remote host that the modem will not send out packets before this hypotethical
buffer gets full, then they are sent all together.)
The number 6000 for tx_max seems to be a fair compromise between low delay (it's
like with 1698) and being able to send big packets in a burst (I've tested with
fragmented ping up to -s 30000, and also wget of a big file works great).
If you need some more testing, definitely let me know!
(By the way, just a note since it helped me with OpenWrt and might help you too:
in case you don't get AT^NDISDUP to connect, it's because this stick seems not to
want the APN name specified there. Instead, just set it with AT+CGDCONT=1,"IP","apn"
and then send AT^NDISDUP=1,1 to connect. To disconnect, send AT^NDISDUP=1,0 .)
Best regards,
Vittorio G
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list