中级会员
- 积分
- 211
- 金钱
- 211
- 注册时间
- 2018-7-16
- 在线时间
- 77 小时
|
5金钱
/ # modprobe 8188eu.ko
RTL871X: module init start
RTL871X: rtl8188eu v4.3.0.9_15178.20150907
RTL871X: build time: Apr 9 2020 20:32:59
bFWReady == _FALSE call reset 8051...
RTL871X: rtw_ndev_init(wlan0)
usbcore: registered new interface driver rtl8188eu
RTL871X: module init ret=0
/ # random: nonblocking pool is initialized
/ # ifconfig wlan0 up
==> rtl8188e_iol_efuse_patch
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/ # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:13:EF:F1:22:B0
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/ # wpa_supplicant -D wext -c /etc/wpa_supplicant.conf -i wlan0 &
/ # Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
RTL871X: set bssid:00:00:00:00:00:00
ioctl[SIOCSIWAP]: Operation not pRTL871X: set ssid [g▒isQ▒J▒)ͺ▒▒▒▒F|▒T▒▒vZ.c3▒ɚ▒~▒▒] fw_state=0x00 000008
ermitted
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
RTL871X: indicate disassoc
wlan0: Trying to associate with 04:95:e6:30:d5:b8 (SSID='FAST123'RTL871X: set ssid [FAST123] fw_st ate=0x00000008
freq=2432 MHz)
Failed to add suRTL871X: set bssid:04:95:e6:30:d5:b8
pported operating classes IE
RTL871X: start auth
RTL871X: auth success, start assoc
RTL871X: assoc success
RTL871X: recv eapol packet
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: Associated with 04:95:e6:30:d5:b8
RTL871X: send eapol packet
RsvdPageNum: 8
RTL871X: recv eapol packet
RTL871X: send eapol packet
RTL871X: recv eapol packet
RTL871X: send eapol packet
RTL871X: set pairwise key camid:4, addr:04:95:e6:30:d5:b8, kid:0, type:AES
wlan0: WPA: Key negotiation completed with 04:95:e6:30:d5:b8 [PTKRTL871X: set group key camid:5, a ddr:04:95:e6:30:d5:b8, kid:1, type:AES
=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 04:95:e6:30:d5:b8 completed [id=0 id_str=]
/ # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:13:EF:F1:22:B0
inet6 addr: fe80::213:efff:fef1:22b0/64 Scopeink
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:78 errors:0 dropped:25 overruns:0 frame:0
TX packets:8 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22755 (22.2 KiB) TX bytes:973 (973.0 B)
/ # ifconfig wlan0 192.168.3.233 netmask 255.255.255.0
/ # ping -I 192.168.3.233 192.168.3.4
PING 192.168.3.4 (192.168.3.4) from 192.168.3.233: 56 data bytes
--- 192.168.3.4 ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
/ # ping -I 192.168.3.233 192.168.3.18
PING 192.168.3.18 (192.168.3.18) from 192.168.3.233: 56 data bytes
--- 192.168.3.18 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
/ # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:13:EF:F1:22:B0
inet addr:192.168.3.233 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::213:efff:fef1:22b0/64 Scopeink
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:488 errors:0 dropped:70 overruns:0 frame:0
TX packets:8 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:125912 (122.9 KiB) TX bytes:973 (973.0 B)
/ # cd usr/share/udhcpc/
/usr/share/udhcpc # ls
default.script
/usr/share/udhcpc # udhcpc -i wlan0
udhcpc: started, v1.29.0
Setting IP address 0.0.0.0 on wlan0
udhcpc: sending discover
udhcpc: sending select for 192.168.3.60
udhcpc: lease of 192.168.3.60 obtained, lease time 86400
Setting IP address 192.168.3.60 on wlan0
Deleting routers
route: SIOCDELRT: No such process
Adding router 192.168.3.1
Recreating /etc/resolv.conf
Adding DNS server 192.168.3.1
/usr/share/udhcpc # ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:13:EF:F1:22:B0
inet addr:192.168.3.60 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::213:efff:fef1:22b0/64 Scopeink
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:601 errors:0 dropped:114 overruns:0 frame:0
TX packets:12 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:166076 (162.1 KiB) TX bytes:1853 (1.8 KiB)
/usr/share/udhcpc # ping -I 192.168.3.60 www.baidu.com
/usr/share/udhcpc # ping -I 192.168.3.60 192.168.3.4
PING 192.168.3.4 (192.168.3.4) from 192.168.3.60: 56 data bytes
--- 192.168.3.4 ping statistics ---
11 packets transmitted, 0 packets received, 100% packet loss
需要把\busybox-1.1.2\examples\udhcp下的脚本simple.script(是simple.script文件,该目录还有个sample.script文件,注意不要复制错了)改名为default.script,放在开发板上的/usr/share/dhcpc/目录下(目录需要自己创建),才能将获取的IP写到指定的网卡中。
先是udhcpc不能获取ip,试过了其他帖子的做法可以获取ip但是ping又行不通,这是为啥
|
-
ping命令行不通
最佳答案
查看完整内容[请看2#楼]
左神,我试了好久之前按照别人帖子这个方法busybox的examples/udhcp/下copy simple.script文件到开发板/usr/share/udhcpc/不行
最后我把buildroot的这个文件弄过来才ok
|