天嵌 ARM开发社区

 找回密码
 注册
查看: 4148|回复: 3

tq6410-sdio wifi 无法动态分配ip

[复制链接]
pjl0505 发表于 2014-7-24 23:38:46 | 显示全部楼层 |阅读模式
根据帖子http://armbbs.net/forum.php?mod=viewthread&tid=14602&highlight=wpa%2B%2Bwifi,执行命令:wpa_supplicant  -Dwext -iwlan0 -c/etc/wpa_supplicant.conf  -dd& 是成功的,但是执行动态分配IP就不行:udhcpc -b -i wlan0   代码截图如下:
wpa_driver_wext_set_key: alg=2 key_idx=1 set_tx=0 seq_len=6 key_len=32
WPA: Sending EAPOL-Key 2/2
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 11 00 20 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b2 78 8f 54 9e 41 4d ad 00 4a 88 f7 cd 43 13 d4 00 00
WPA: Key negotiation completed with c0:61:18:f0:a8:cc [PTK=TKIP GTK=TKIP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to c0:61:18:f0:a8:cc completed (auth) [id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
EAPOL: startWhen --> 0
EAPOL: disable timer tick


[root@EmbedSky /]# udhcpc -b -i wlan0
udhcpc (v1.18.5) started
Setting IP address 0.0.0.0 on wlan0
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
[root@EmbedSky /]# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


wlan0     Link encap:Ethernet  HWaddr 00:27:13:ED:2A:DB  
          inet6 addr: fe80::227:13ff:feed:2adb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:638 (638.0 B)  TX bytes:1475 (1.4 KiB)


[root@EmbedSky /]#


静态分配IP是可以的,能够连接上外网,截图如下:
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_wext_set_key: alg=2 key_idx=1 set_tx=0 seq_len=6 key_len=32
WPA: Sending EAPOL-Key 2/2
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 11 00 20 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a1 37 06 7a b9 2d 16 40 1f 04 aa 37 a7 62 76 ec 00 00
WPA: Key negotiation completed with c0:61:18:f0:a8:cc [PTK=TKIP GTK=TKIP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to c0:61:18:f0:a8:cc completed (auth) [id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
EAPOL: startWhen --> 0
EAPOL: disable timer tick

[root@EmbedSky /]# cat etc/resolv.conf
nameserver 219.233.241.166
nameserver 211.167.97.67
[root@EmbedSky /]# ifconfig wlan0 192.168.1.22
[root@EmbedSky /]# route add default gw 192.168.1.2
[root@EmbedSky /]# route add default gw 192.168.1.1
[root@EmbedSky /]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=4.635 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=2.463 ms
^C
--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss


这到底什么情况啊,恳请遇到这种问题的同仁不吝赐教!
天嵌_support1 发表于 2014-7-25 08:58:46 | 显示全部楼层
将开发板上/usr/share/udhcp目录改名为/usr/share/udhcpc 试试。
 楼主| pjl0505 发表于 2014-7-25 13:58:42 | 显示全部楼层
将开发板上/usr/share/udhcp目录改名为/usr/share/udhcpc 试试。

昨天已经改过了,还是不行,真是奇怪了。。。
我那个udhcpc版本 会不会有问题?   udhcpc (v1.18.5) started
AAAgang 发表于 2017-4-19 23:57:29 来自手机 | 显示全部楼层
-q啊,试试~ udhcpc -q -i wlan0
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-4-29 12:29 , Processed in 1.062493 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表