Quectel EC25-E and Raw IP on 4.4 kernel
Tomas Krivanek
tom at atack.cz
Sun Jan 29 19:02:59 UTC 2017
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. 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". 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.
This is how it looks on the OpenWRT router:
root at turris:~# uname -a
Linux turris 4.4.44-dabbb3f8c1f6d8bc106a968e85eb53e0-6 #1 SMP Sat Jan 28 13:04:31 UTC 2017 armv7l n
root at turris:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y
root at turris:~# uqmi -d /dev/cdc-wdm0 --wda-get-data-format
"raw-ip"
root at turris:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"
root at turris:~# uqmi -d /dev/cdc-wdm0 --get-current-settings
{
"pdp-type": "ipv4",
"ip-family": "ipv4",
"mtu": 1500,
"ipv4": {
"ip": "100.74.62.152",
"dns1": "160.218.161.60",
"dns2": "194.228.211.33",
"gateway": "100.74.62.153",
"subnet": "255.255.255.240"
},
"ipv6": {
},
"domain-names": {
}
}
root at turris:~# ifconfig wwan0
wwan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:100.74.62.152 P-t-P:100.74.62.152 Mask:255.255.255.240
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:6 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2486 (2.4 KiB) TX bytes:8376 (8.1 KiB)
Where should I look? What can I check?
Thanks,
Tomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20170129/5ffa9d9d/attachment.html>
More information about the libqmi-devel
mailing list