tiny6410用usb-wifi命令行连wifi问题解决办法
来源:互联网 发布:淘宝虚拟商品怎么发货 编辑:程序博客网 时间:2024/06/05 18:11
之前遇到了点阻碍,不过还是顺利找到解决方法。
首先你要确定你自己用的USB-WIFI是什么芯片,然后去找官网提供的驱动包,自己进行编译。
而我用的是rt2070的USB-WIFI,所以,我这里就只介绍如何编译rt2070吧。
第一步,scan-wifi。激活wlan0。输入scan-wifi即可。scan-wifi是友善提供的工具。
cfg80211: Calling CRDA to update world regulatory domainlibertas_sdio: Libertas SDIO driverlibertas_sdio: Copyright Pierre Ossmanusbcore: registered new interface driver ath9k_htcusbcore: registered new interface driver rt73usbusb 1-1.3: reset full speed USB device using s3c2410-ohci and address 3usbcore: registered new interface driver rt2800usbrtw driver version=v3.0.1590.20110511usbcore: registered new interface driver rtl8192cuusbcore: registered new interface driver zd1211rw
第二步,设置wpa_supplicant.conf
vi /etc/wpa_supplicant.conf
内容为:
ctrl_interface=/var/run/wpa_supplicantnetwork={ ssid="xxxx" //这里xxxx指的是你无线网络名字 proto=WPA key_mgmt=WPA-PSK //你选的是什么安全设置你就写哪种。我选的第一种,所以就是WPA-PSK psk="*****" //*****指密码。}
第三步,静态设置wlan0的IP
ifconfig wlan0 192.168.1.101
第四步,用wpa_supplicant连接上网
wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant.conf &
-d :增加调试信息
-Dwext :wext,驱动名称
-iwlan0 :wlan0,网络接口名称
/etc/wpa_supplicant.conf :wpa_supplicant的配置文件path
这里需要注意的是,当你输入这个命令后,出现如下提示:
Try to find WPA-enabled AP0: 0a:25:12:6b:1f:f6 ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known2: 06:25:12:62:a4:0b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known3: 00:23:89:99:72:50 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE4: 00:23:89:99:72:51 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE5: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE6: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IETry to find non-WPA AP0: 0a:25:12:6b:1f:f6 ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known2: 06:25:12:62:a4:0b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known3: 00:23:89:99:72:50 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch4: 00:23:89:99:72:51 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch5: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch6: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatchNo suitable AP found.
你可以先在里面找找是否有你设的无线网络,如果有,你看一下双引号里面的是什么,比如“linux” ,linux是我设的无线网,如果发现你的无线网后面有个空格,就跟这里linux后面有个空格一样。那你就注意,你是不是在设置无线网的时候多加个空格,这时候你有两种方法,第一种,改无线网名,把空格去掉,第二种就是修改wpa_supplicant.conf文件,在ssid后面的双引号里加个空格,跟提示的对应,都可以。
我的成功连接的打印信息如下:
[root@FriendlyARM /]# wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant.conf &[root@FriendlyARM /]# Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'Reading configuration file '/etc/wpa_supplicant.conf'ctrl_interface='/var/run/wpa_supplicant'Line: 2 - start of a new network blockssid - hexdump_ascii(len=5): 6c 69 6e 75 78 linux proto: 0x1key_mgmt: 0x2PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]PSK (from passphrase) - hexdump(len=32): [REMOVED]Priority group 0 id=0 ssid='linux'Initializing interface (2) 'wlan0'SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf capabilities: key_mgmt 0xf enc 0xf flags 0x0WEXT: Operstate: linkmode=1, operstate=5Own MAC address: 48:02:2a:24:35:55wpa_driver_wext_set_wpawpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_countermeasureswpa_driver_wext_set_drop_unencryptedRSN: flushing PMKID list in the driverSetting scan request: 0 sec 100000 usecEAPOL: SUPP_PAE entering state DISCONNECTEDEAPOL: KEY_RX entering state NO_KEY_RECEIVEEAPOL: SUPP_BE entering state INITIALIZEEAP: EAP entering state DISABLEDAdded interface wlan0RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b06 len=8RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b1a len=40State: DISCONNECTED -> SCANNINGStarting AP scan (broadcast SSID)Trying to get current scan results first without requesting a new scan to speed up initial associationioctl[SIOCGIWSCAN]: Resource temporarily unavailableFailed to get scan resultsFailed to get scan results - try scanning againSetting scan request: 0 sec 0 usecStarting AP scan (broadcast SSID)ioctl[SIOCSIWSCAN]: Device or resource busyScan requested (ret=-1) - scan timeout 5 secondsFailed to initiate AP scan.Setting scan request: 10 sec 0 usecEAPOL: disable timer tickRTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b19 len=8Received 1345 bytes of scan results (4 BSSes)New scan results availableSelecting BSS from priority group 0Try to find WPA-enabled AP0: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 00:25:12:6b:1f:f6 ssid='CMCC' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE2: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE3: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IETry to find non-WPA AP0: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 00:25:12:6b:1f:f6 ssid='CMCC' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch2: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch3: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatchNo suitable AP found.Setting scan request: 5 sec 0 usecStarting AP scan (broadcast SSID)Scan requested (ret=0) - scan timeout 30 secondsRTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b19 len=8Received 1682 bytes of scan results (5 BSSes)New scan results availableSelecting BSS from priority group 0Try to find WPA-enabled AP0: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 00:25:12:6b:1f:f6 ssid='CMCC' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE2: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE3: 06:25:12:6b:1f:a8 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known4: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IETry to find non-WPA AP0: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 00:25:12:6b:1f:f6 ssid='CMCC' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch2: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch3: 06:25:12:6b:1f:a8 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known4: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatchNo suitable AP found.Setting scan request: 5 sec 0 usecStarting AP scan (broadcast SSID)Scan requested (ret=0) - scan timeout 30 secondsRTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b19 len=8Received 2667 bytes of scan results (8 BSSes)New scan results availableSelecting BSS from priority group 0Try to find WPA-enabled AP0: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 00:25:12:6b:1f:f6 ssid='CMCC' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE2: 06:25:12:62:a4:0b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known3: 00:23:89:99:72:50 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE4: 00:23:89:99:72:51 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE5: 06:25:12:6b:1f:a8 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known6: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE7: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IETry to find non-WPA AP0: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 00:25:12:6b:1f:f6 ssid='CMCC' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch2: 06:25:12:62:a4:0b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known3: 00:23:89:99:72:50 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch4: 00:23:89:99:72:51 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch5: 06:25:12:6b:1f:a8 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known6: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch7: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatchNo suitable AP found.Setting scan request: 5 sec 0 usecStarting AP scan (broadcast SSID)Scan requested (ret=0) - scan timeout 30 secondsRTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b19 len=8Received 2345 bytes of scan results (7 BSSes)New scan results availableSelecting BSS from priority group 0Try to find WPA-enabled AP0: 0a:25:12:6b:1f:f6 ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known2: 06:25:12:62:a4:0b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known3: 00:23:89:99:72:50 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE4: 00:23:89:99:72:51 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE5: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE6: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IETry to find non-WPA AP0: 0a:25:12:6b:1f:f6 ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known1: 0a:25:12:62:a4:0b ssid='' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 skip - SSID not known2: 06:25:12:62:a4:0b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID not known3: 00:23:89:99:72:50 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch4: 00:23:89:99:72:51 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch5: 00:23:89:98:f7:90 ssid='ChinaNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatch6: 00:23:89:98:f7:91 ssid='GDUPT' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - SSID mismatchNo suitable AP found.Setting scan request: 5 sec 0 usecStarting AP scan (broadcast SSID)Scan requested (ret=0) - scan timeout 30 secondsRTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b19 len=8Received 3268 bytes of scan results (9 BSSes)New scan results availableSelecting BSS from priority group 0Try to find WPA-enabled AP0: ec:17:2f:60:45:a8 ssid='linux' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 selected based on WPA IE selected WPA AP ec:17:2f:60:45:a8 ssid='linux'Trying to associate with ec:17:2f:60:45:a8 (SSID='linux' freq=2437 MHz)Cancelling scan requestWPA: clearing own WPA/RSN IEAutomatic auth_alg selection: 0x1WPA: using IEEE 802.11i/D3.0WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 1WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00WPA: using GTK CCMPWPA: using PTK CCMPWPA: using KEY_MGMT WPA-PSKWPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02No keys have been configured - skip key clearingwpa_driver_wext_set_drop_unencryptedState: SCANNING -> ASSOCIATINGwpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)WEXT: Operstate: linkmode=-1, operstate=5wpa_driver_wext_associatewpa_driver_wext_set_pskSetting authentication timeout: 10 sec 0 usecEAPOL: External notification - EAP success=0EAPOL: External notification - EAP fail=0EAPOL: External notification - portControl=AutoRSN: Ignored PMKID candidate without preauth flagRTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b06 len=8RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b04 len=12RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b1a len=13RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b19 len=8Received 3620 bytes of scan results (10 BSSes)New scan results availableSelecting BSS from priority group 0Try to find WPA-enabled AP0: ec:17:2f:60:45:a8 ssid='linux' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 selected based on WPA IE selected WPA AP ec:17:2f:60:45:a8 ssid='linux'Already associated with the selected AP.RSN: Ignored PMKID candidate without preauth flagRTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedRTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8c08 len=154AssocResp IE wireless event - hexdump(len=146): 01 08 02 04 0b 0c 12 16 18 24 32 04 30 48 60 6c 2d 1a 6e 10 03 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 1a 6e 10 03 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 06 05 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 16 06 05 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 18 00 50 f2 02 01 01 03 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedWireless event: cmd=0x8b15 len=20Wireless event: new AP: ec:17:2f:60:45:a8Association info eventresp_ies - hexdump(len=146): 01 08 02 04 0b 0c 12 16 18 24 32 04 30 48 60 6c 2d 1a 6e 10 03 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 1a 6e 10 03 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 06 05 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 16 06 05 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 18 00 50 f2 02 01 01 03 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00State: ASSOCIATING -> ASSOCIATEDwpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)WEXT: Operstate: linkmode=-1, operstate=5Associated to a new BSS: BSSID=ec:17:2f:60:45:a8No keys have been configured - skip key clearingAssociated with ec:17:2f:60:45:a8WPA: Association event - clear replay counterWPA: Clear old PTKEAPOL: External notification - portEnabled=0EAPOL: External notification - portValid=0EAPOL: External notification - EAP success=0EAPOL: External notification - portEnabled=1EAPOL: SUPP_PAE entering state CONNECTINGEAPOL: enable timer tickEAPOL: SUPP_BE entering state IDLESetting authentication timeout: 10 sec 0 usecCancelling scan requestRX EAPOL from ec:17:2f:60:45:a8RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 02 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 61 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 00Setting authentication timeout: 10 sec 0 usecIEEE 802.1X RX: version=2 type=3 length=95 EAPOL-Key type=254 key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack) key_length=16 key_data_length=0 replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02 key_nonce - hexdump(len=32): 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 61 key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00 key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00 key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 02 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 61 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 00State: ASSOCIATED -> 4WAY_HANDSHAKEWPA: RX message 1 of 4-Way Handshake from ec:17:2f:60:45:a8 (ver=2)WPA: Renewed SNonce - hexdump(len=32): ad ca 44 6f 07 8e 7b 56 83 79 f9 fe 36 5b 1f 20 fc 59 a5 de b6 e2 e9 a1 28 c6 c0 54 53 9f 30 40WPA: PTK derivation - A1=48:02:2a:24:35:55 A2=ec:17:2f:60:45:a8WPA: PMK - hexdump(len=32): [REMOVED]WPA: PTK - hexdump(len=48): [REMOVED]WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02WPA: Sending EAPOL-Key 2/4WPA: TX EAPOL-Key - hexdump(len=123): 01 03 00 77 fe 01 0a 00 10 00 00 00 00 00 00 00 02 ad ca 44 6f 07 8e 7b 56 83 79 f9 fe 36 5b 1f 20 fc 59 a5 de b6 e2 e9 a1 28 c6 c0 54 53 9f 30 40 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 f0 b1 99 bc 2d 0a 68 8a 6d c1 b7 6f 84 af b5 80 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02RX EAPOL from ec:17:2f:60:45:a8RX EAPOL - hexdump(len=123): 02 03 00 77 fe 01 ca 00 10 00 00 00 00 00 00 00 03 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 61 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 2c 4e b4 c8 b4 f1 49 6d 62 47 0f 51 19 9c 16 44 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02IEEE 802.1X RX: version=2 type=3 length=119 EAPOL-Key type=254 key_info 0x1ca (ver=2 keyidx=0 rsvd=0 Pairwise Install Ack MIC) key_length=16 key_data_length=24 replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03 key_nonce - hexdump(len=32): 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 61 key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00 key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00 key_mic - hexdump(len=16): 2c 4e b4 c8 b4 f1 49 6d 62 47 0f 51 19 9c 16 44WPA: RX EAPOL-Key - hexdump(len=123): 02 03 00 77 fe 01 ca 00 10 00 00 00 00 00 00 00 03 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 61 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 2c 4e b4 c8 b4 f1 49 6d 62 47 0f 51 19 9c 16 44 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKEWPA: RX message 3 of 4-Way Handshake from ec:17:2f:60:45:a8 (ver=2)WPA: IE KeyData - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02WPA: Sending EAPOL-Key 4/4WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 01 0a 00 10 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 d4 c6 6b 06 6a 29 3f b3 75 f3 a5 e6 fb ae 3c fd 00 00WPA: Installing PTK to the driver.WPA: RSC - hexdump(len=6): 00 00 00 00 00 00wpa_driver_wext_set_key: alg=3 key_idx=0 set_tx=1 seq_len=6 key_len=16State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKERX EAPOL from ec:17:2f:60:45:a8RX EAPOL - hexdump(len=123): 02 03 00 77 fe 03 92 00 10 00 00 00 00 00 00 00 04 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 5f 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 a6 f8 fb ca 47 36 3b 50 1f 81 2c 85 fe bb 56 91 00 18 9c be 46 9f 50 2a 29 c8 c7 21 95 75 e6 29 0c af d5 04 dc 31 30 c8 51 36IEEE 802.1X RX: version=2 type=3 length=119 EAPOL-Key type=254 key_info 0x392 (ver=2 keyidx=1 rsvd=0 Group Ack MIC Secure) key_length=16 key_data_length=24 replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 04 key_nonce - hexdump(len=32): 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 5f key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00 key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00 key_mic - hexdump(len=16): a6 f8 fb ca 47 36 3b 50 1f 81 2c 85 fe bb 56 91WPA: RX EAPOL-Key - hexdump(len=123): 02 03 00 77 fe 03 92 00 10 00 00 00 00 00 00 00 04 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 5f 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 a6 f8 fb ca 47 36 3b 50 1f 81 2c 85 fe bb 56 91 00 18 9c be 46 9f 50 2a 29 c8 c7 21 95 75 e6 29 0c af d5 04 dc 31 30 c8 51 36WPA: RX message 1 of Group Key Handshake from ec:17:2f:60:45:a8 (ver=2)State: GROUP_HANDSHAKE -> GROUP_HANDSHAKEWPA: Group Key - hexdump(len=16): [REMOVED]WPA: Installing GTK to the driver (keyidx=1 tx=0 len=16).WPA: RSC - hexdump(len=6): 00 00 00 00 00 00wpa_driver_wext_set_key: alg=3 key_idx=1 set_tx=0 seq_len=6 key_len=16WPA: Sending EAPOL-Key 2/2WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 12 00 10 00 00 00 00 00 00 00 04 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 30 5f 97 99 3a 9b 94 df b4 0a 12 8b b5 a7 41 22 00 00WPA: Key negotiation completed with ec:17:2f:60:45:a8 [PTK=CCMP GTK=CCMP]Cancelling authentication timeoutState: GROUP_HANDSHAKE -> COMPLETEDCTRL-EVENT-CONNECTED - Connection to ec:17:2f:60:45:a8 completed (auth) [id=0 id_str=]wpa_driver_wext_set_operstate: operstate 0->1 (UP)WEXT: Operstate: linkmode=-1, operstate=6EAPOL: External notification - portValid=1EAPOL: External notification - EAP success=1EAPOL: SUPP_PAE entering state AUTHENTICATINGEAPOL: SUPP_BE entering state SUCCESSEAP: EAP entering state DISABLEDEAPOL: SUPP_PAE entering state AUTHENTICATEDEAPOL: SUPP_BE entering state IDLEEAPOL authentication completed successfullyRTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedEAPOL: startWhen --> 0EAPOL: disable timer tickRX EAPOL from ec:17:2f:60:45:a8RX EAPOL - hexdump(len=123): 02 03 00 77 fe 03 92 00 10 00 00 00 00 00 00 00 06 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 5f 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 ee 54 68 ce 37 45 01 c5 cd bd 69 3b 63 93 a0 e3 00 18 9c be 46 9f 50 2a 29 c8 c7 21 95 75 e6 29 0c af d5 04 dc 31 30 c8 51 36IEEE 802.1X RX: version=2 type=3 length=119 EAPOL-Key type=254 key_info 0x392 (ver=2 keyidx=1 rsvd=0 Group Ack MIC Secure) key_length=16 key_data_length=24 replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 06 key_nonce - hexdump(len=32): 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 5f key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00 key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00 key_mic - hexdump(len=16): ee 54 68 ce 37 45 01 c5 cd bd 69 3b 63 93 a0 e3WPA: RX EAPOL-Key - hexdump(len=123): 02 03 00 77 fe 03 92 00 10 00 00 00 00 00 00 00 06 98 79 62 5a 11 d0 e9 78 95 8d 2f 2d 3e 55 33 35 21 ff 28 cd eb 9b f8 6e 3f b2 2a f5 9b e2 6d 5f 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 ee 54 68 ce 37 45 01 c5 cd bd 69 3b 63 93 a0 e3 00 18 9c be 46 9f 50 2a 29 c8 c7 21 95 75 e6 29 0c af d5 04 dc 31 30 c8 51 36WPA: RX message 1 of Group Key Handshake from ec:17:2f:60:45:a8 (ver=2)State: COMPLETED -> GROUP_HANDSHAKEWPA: Group Key - hexdump(len=16): [REMOVED]WPA: Installing GTK to the driver (keyidx=1 tx=0 len=16).WPA: RSC - hexdump(len=6): 00 00 00 00 00 00wpa_driver_wext_set_key: alg=3 key_idx=1 set_tx=0 seq_len=6 key_len=16WPA: Sending EAPOL-Key 2/2WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 12 00 10 00 00 00 00 00 00 00 06 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 27 1b a2 60 91 43 16 a4 df c0 98 62 84 85 bb 0f 00 00WPA: Group rekeying completed with ec:17:2f:60:45:a8 [GTK=CCMP]Cancelling authentication timeoutState: GROUP_HANDSHAKE -> COMPLETED
这个时候,你可以输入ifconfig查看,wlan0是否有数据流。
wlan0 Link encap:Ethernet HWaddr 48:02:2A:24:35:55 inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:85 errors:0 dropped:1 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:19029 (18.5 KiB) TX bytes:618 (618.0 B)
只要RX和TX有数据,不是0B。就代表成功了。欢呼吧。对了。接下来还有
第五步,将eth0 down掉,或者是改成别的IP段,反正不能跟wlan0在同一IP段。
[root@FriendlyARM /]# ifconfig eth0 downIgnore event for foreign ifindex 2[root@FriendlyARM /]# ifconfig eth0 down[root@FriendlyARM /]# ifconfiglo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1 errors:0 dropped:0 overruns:0 frame:0 TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:68 (68.0 B) TX bytes:68 (68.0 B)wlan0 Link encap:Ethernet HWaddr 48:02:2A:24:35:55 inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:128 errors:0 dropped:1 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:30244 (29.5 KiB) TX bytes:618 (618.0 B)
第六步,加路由.添加完,你可以试着ping网关。
route add default gw 192.168.1.1
[root@FriendlyARM /]# route add default gw 192.168.1.1[root@FriendlyARM /]# ping 192.168.1.1PING 192.168.1.1 (192.168.1.1): 56 data bytes64 bytes from 192.168.1.1: seq=0 ttl=64 time=2173.410 ms64 bytes from 192.168.1.1: seq=1 ttl=64 time=1247.833 ms64 bytes from 192.168.1.1: seq=2 ttl=64 time=238.314 ms64 bytes from 192.168.1.1: seq=3 ttl=64 time=123.821 ms64 bytes from 192.168.1.1: seq=4 ttl=64 time=165.622 ms64 bytes from 192.168.1.1: seq=5 ttl=64 time=209.468 ms64 bytes from 192.168.1.1: seq=6 ttl=64 time=138.300 ms^C--- 192.168.1.1 ping statistics ---7 packets transmitted, 7 packets received, 0% packet lossround-trip min/avg/max = 123.821/613.824/2173.410 ms
第七步,ping外网
[root@FriendlyARM /]# ping www.baidu.comPING www.baidu.com (220.181.111.148): 56 data bytes64 bytes from 220.181.111.148: seq=0 ttl=53 time=747.509 ms64 bytes from 220.181.111.148: seq=1 ttl=53 time=320.500 ms64 bytes from 220.181.111.148: seq=2 ttl=53 time=180.353 ms64 bytes from 220.181.111.148: seq=3 ttl=53 time=64.297 ms64 bytes from 220.181.111.148: seq=4 ttl=53 time=589.996 ms64 bytes from 220.181.111.148: seq=5 ttl=53 time=656.760 ms64 bytes from 220.181.111.148: seq=6 ttl=53 time=1066.557 ms64 bytes from 220.181.111.148: seq=7 ttl=53 time=609.515 ms64 bytes from 220.181.111.148: seq=8 ttl=53 time=144.448 ms
成功了。
当然这个只是一种情况下的连接,希望大家有什么建议或者想法都可以留言与我交流。谢谢
如果还是不行,可以考虑一下/etc/resov.conf这个文件。nameserver 192.168.1.1
- tiny6410用usb-wifi命令行连wifi问题解决办法
- tiny6410用usb-wifi命令行连wifi问题解决办法
- tiny6410用usb-wifi命令行连wifi问题
- 命令行连wifi
- wifi 直连 wifi p2p
- iOS使用SSH通过USB直连 比WIFI快
- wifi直连
- 情结- WiFi 直连
- wifi连adb
- Wifi直连
- 树莓派WiFi重连
- Android -wifi 直连(wifi direct )
- Android -wifi 直连(wifi direct
- Android -wifi 直连(wifi direct )
- Android -wifi 直连(wifi direct )
- wifi直连(Android)Wifi-Direct
- 获取wifi密码办法
- 移植usb wifi 驱动
- Herd Sums
- 桌面数据库
- Mysql 创建外键 1005 err 150
- 算法源码之单链表逆置
- 利用dos命令定时运行计算机
- tiny6410用usb-wifi命令行连wifi问题解决办法
- eclipse插件收集
- 使用runloop阻塞线程的正确写法
- directshow filter 调试步骤
- 简单FTP服务器软件
- oracle 链接问题
- 被神化的乔布斯
- 搜索引擎(一)体系结构 思维导图
- C++中string的连续加法需要注意的一个地方