Quectel EC25-E and Raw IP on 4.4 kernel

Bjørn Mork bjorn at mork.no
Sun Jan 29 20:59:18 UTC 2017


Tomas Krivanek <tom at atack.cz> writes:

> Hi all,
>
> 	I am trying to get Quectel EC25-E working under OpenWRT (kernel
> 	4.4.44). The modem was not recognized, so I "backported" Bjørn
> 	Mork's patches (just by copying qmi_wwan.c from 4.9) and
> 	recompiled OpenWRT image. Now I can see /dev/cdc-wdm0 device and
> 	wwan0 interface. I can talk to it using uqmi and get it
> 	connected to the LTE network. However it looks like the modem
> 	does not support 802.3 mode anymore. Changing mode using "uqmi
> 	-d /dev/cdc-wdm0 --wda-set-data-format 802.3" have no
> 	effect. Result of "uqmi -d /dev/cdc-wdm0 --wda-get-data-format"
> 	is still "raw-ip". So i changed /sys/class/net/wwan0/qmi/raw_ip
> 	to 'Y' and connect to LTE again.

So far, this is as expected.  The EC25 behaves similar to e.g the Sierra
Wireless MC7455, and does not support 802.3 mode.

>       DHCP does not negotiate IP address but I am able to setup
>       network manually, using values from "uqmi -d /dev/cdc-wdm0
>       --get-current-settings".


This is probably a symptom of the same problem as below.  The busybox
udhcpc client works fine with raw-ip interfaces.

> When trying to ping remote server over LTE and Internet, funny things
> happen. ICMP echo request is sent correctly, reach remote server,
> reply is received by OpenWRT but packet is not recognized as
> IPv4. Using tcpdump on OpenWRT i can see this:
>
> Echo request:
>
> 0000  45 00 00 54 46 57 40 00 40 01 08 32 64 4a 3e 98   E..TFW at .@..2dJ>.
> 0010  59 66 ef d7 08 00 c6 f6 37 0b 00 00 5b da 9e 23   Yf......7...[..#
> 0020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 0030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 0040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 0050  00 00 00 00                                       ....
>
> And received response:
>
> 0000  ef d7 64 4a 3e 98 00 00 ce f6 37 0b 00 00 5b da   ..dJ>.....7...[.
> 0010  9e 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00   .#..............
> 0020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 0030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 0040  00 00 00 00 00 00                                 ......
>
> The first two bytes of packet ass seen by tcpdump are actually last
> two bytes of source IP address (59 66 ef d7 - destination IP in
> request). So the first 14 bytes of the IP packet is missing. It looks
> like something thinks there is ethernet header and decide to remove
> it. But there is no ethernet header and beginning of IP packet is
> removed instead.

Yes, that certainly looks like something stripped off the first 14
bytes.  Maybe you forgot the commit 81e0ce79f291 ("usbnet: allow
mini-drivers to consume L2 headers") when backporting the raw-ip
support?

Without that patch, usbnet will call eth_type_trans() which does
skb_pull_inline(skb, ETH_HLEN).
 


Bjørn


More information about the libqmi-devel mailing list