iwpriv是linux下配置无线网络的工具。
1. 使用ifconfig查看无线网卡的名字,
sh-# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:E7:06:00:00
inet addr:192.168.0.162 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4108 errors:0 dropped:2269 overruns:0 frame:0
TX packets:548 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:577677 (564.1 Kb) TX bytes:89655 (87.5 Kb)
Interrupt:40 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:640 (640.0 b) TX bytes:640 (640.0 b)
wl0 Link encap:Ethernet HWaddr 00:6B:9E:1E:FF:12
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:11194 errors:1333 dropped:12 overruns:0 frame:0
TX packets:10344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4413296 (4.2 Mb) TX bytes:4300092 (4.1 Mb)
sh-#
2. 查看当前无线网络的连接状况,
sh-# ./iwpriv wl0 connStatus
wl0 connStatus:Disconnected
sh-#
3. 使用iwlist命令扫描无线网络,
sh-# ./iwlist wl0 scanning
[ 4834.305660] ===>rt_ioctl_giwscan. 40(40) BSS returned, data->length = 6781
wl0 Scan completed :
Cell 01 - Address: 14:D6:4D:29:05:54
Protocol:11b/g/n BW40
ESSID:"V_Test"
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality=78/100 Signal level=-59 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:300 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: DD270050F204104A0001101044000102104700100000000000001000000014D64D290554103C000103
Cell 03 - Address: 40:16:9F:C4:C5:E4
Protocol:11b/g/n BW40
ESSID:""
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality=78/100 Signal level=-59 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:150 Mb/s
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD0E0050F204104A0001101044000102
Cell 06 - Address: 14:E6:E4:4A:29:56
Protocol:11b/g BW20
ESSID:"TP-LINK_4A2956"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=73/100 Signal level=-61 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD0E0050F204104A0001101044000102
Cell 07 - Address: 14:CF:92:73:C4:80
Protocol:11b/g/n BW40
ESSID:"TP-LINK_73C480"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=100/100 Signal level=-49 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:150 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Cell 13 - Address: 00:1A:1E:04:5B:A2
Protocol:11b/g BW20
ESSID:""
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=57/100 Signal level=-67 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : 802.1x
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : 802.1x
Cell 15 - Address: B8:A3:86:AC:A2:5A
Protocol:11b/g/n BW40
ESSID:"XULIN"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=100/100 Signal level=-39 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:300 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD0E0050F204104A0001101044000102
sh-#
4. 设定无线网络,
sh-# ./iwpriv wl0 set NetworkType=Infra
sh-# ./iwpriv wl0 set AuthMode=WPA2PSK
sh-# ./iwpriv wl0 set EncrypType=TKIP
sh-# ./iwpriv wl0 set WPAPSK=11111111
5. 连接无线网络,
sh-# ./iwpriv wl0 set SSID=XULIN
6. 可以为什么没有连上呢?
sh-# ./iwpriv wl0 connStatus
wl0 connStatus:Disconnected
sh-#
很多时候可以通过控制台命令来确定无线网络问题是无线网络本身的问题
还是基于无线网络之上的应用软件问题。
分享到:
相关推荐
iwpriv iwlist iw工具
iwpriv工具
iwpriv android/linux push it to /system/bin/ chmod 777 for it.
iwpriv_RF手动调试
mtk openwrt wifi使用命令控制wifi行为的说明,包括大部分命令介绍和使用
wifi调试工具汇总,iwlist,iwconfig,iwpriv等,以及自己亲测连接开放热点的流程说明
找了良久才找到这个开源代码,并成功交叉编译通过,用于实际项目中。 可依据实际需要修改Makefile中的"CC=gcc","AR=ar"这两个, 以便cross compile; 其余makefile不需要修改;用 make clean;make all即可编译。...
工具文件
代码如下:sudo ifconfig wlan0 down&&sudo ifconfig wlan0 hw ether 12:34:56:78:9a:bc & sudo ifconfig wlan0 up 上面的“wlan0”是自己网卡的名称,我这个显然是无线网卡,具体因设备而定,请使用ifconfig -a来...
压缩包包含iwpriv iwlist iwconfig三个可执行文件,可用在Android平台用于调试wifi
Athreos无线wifi芯片开发文档,介绍iwpriv,iwconfig命令。 The AP driver command line interface consists of wireless tools presentde in this document to view and modify AP driver environment variables.
亲测是适用于mt7603e和mt7612e 在wifi芯片产测校准中用到 即wlan facility做产测中会先使用iwpriv去配置wifi驱动进入到ate模式然后打流进行测试 这个手册里面就有相关的iwpriv命令
iwpriv工具通过ioctl动态获取相应无线网卡驱动的private_args所有扩展参数.pdf
wireless_tools.26.tar.gz,内含iwconfig ,iwlist, iwspy, iwpriv, iwgetid, iwevent, iwlib等文件
很好的无线网卡驱动代码,适用于PC机和嵌入式Linux开发
linux系统下的无线常用命令iwconfig,iwlist,iwpriv源代码。
mtk的wifi配置文档,包含wifi基本的iwpriv 指令解释和使用,MTK_Wi-Fi_SoftAP_Software_Programming_Guide
#define CONFIG_MP_IWPRIV_SUPPORT 1 #endif //#ifndef CONFIG_MP_INCLUDED #define CONFIG_AP_MODE 1 #define CONFIG_NATIVEAP_MLME 1 // Added by Albert 20110314 #define CONFIG_P2P 1 #ifdef CONFIG_P2P /...