C114门户论坛百科APPEN| 举报 切换到宽版

亚星游戏官网

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索
查看: 7975|回复: 1

[技术讨论] linux 4g lte huawei E3372 嵌入式4g拨号 [复制链接]

军衔等级:

亚星游戏官网-yaxin222  新兵

注册:2015-11-11
发表于 2015-11-20 15:18:21 |显示全部楼层
我使用的HUAWEI的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

谁能帮帮小弟,跪谢!!

举报本楼

本帖有 1 个回帖,您需要登录后才能浏览 登录 | 注册
您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系大家 |网站地图  

GMT+8, 2024-11-7 03:29 , Processed in 0.249965 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部
XML 地图 | Sitemap 地图