通信人家园

标题: linux 4g lte huawei E3372 嵌入式4g拨号  [查看完整版帖子] [打印本页]

时间:  2015-11-20 15:18
作者: wdsjy1314     标题: linux 4g lte huawei E3372 嵌入式4g拨号

我使用的华为的E3372,3.10内核,联通sim卡,可虚拟出wwan0,但用udhcpc获取ip失败:
udhcpc -i wwan0
udhcpc (v1.16.1) started
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
...
抓包:
tcpdump -ni wwan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wwan0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:06:48.787096 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
23:06:48.787688 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
23:07:11.828097 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
23:07:11.828799 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
...
使用AT指令,可获取到ip,gw,dns等值,但把这些值配置到wwan0上,也不能访问外网,
操作如下:
# microcom -t 5000 -s 115200 /dev/ttyUSB1
ATZ
OK
AT^NDISDUP=1,1,"3gnet"
OK

^NDISSTAT:1,,,"IPV4"
# microcom -t 5000 -s 115200 /dev/ttyUSB1
AT^DHCP?
^DHCP: 84771C0A,F8FFFFFF,81771C0A,81771C0A,7B7B7B7B,7C7B7B7B,150000000,150000000

OK
翻译为:
ip:       84771C0A,(10.28.119.132)
mask:F8FFFFFF, (255.255.255.248)
gw :    81771C0A,(10.28.119.129)
dhcpserver: 81771C0A,(10.28.119.129)
dns:    7B7B7B7B,(123.123.123.123)
dns:    7C7B7B7B,(123.123.123.124)
max_tx: 150000000bps
max_rx: 150000000bps

# ifconfig wwan0 10.28.119.132 netmask 255.255.255.248
# route add default gw 10.28.119.129
#
# vi /etc/resolv.conf

nameserver 123.123.123.123
nameserver 123.123.123.124

ping www.baidu.com
一直没有反应
抓包:
tcpdump -ni wwan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wwan0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:27:48.868715 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:48.869187 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:49.870131 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:49.870542 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:50.872114 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28

谁能帮帮小弟,跪谢!!


时间:  2015-11-23 10:26
作者: wdsjy1314

顶顶




通信人家园 (https://www.txrjy.com/) Powered by C114