【已解决】iwlist scan或iwlist scanning的输出结果不稳定/return no Access Point/No scan results
【问题】
去尝试iwlist的使用,发现iwlist scan输出的结果,不稳定,或者说,很多时候输出的结果都不太一样。
主要表现为,有时候可以正常搜索出来很多无线网络的详细信息,有时候只能找到当前有效的那单个无线网络,而有时候完全都找不到一个有效的无线网络:
crifan@crifan-laptop:~/download$ iwlist scanning
lo Interface doesn’t support scanning.
eth0 Interface doesn’t support scanning.
wlan0 Scan completed :
Cell 01 – Address: D8:5D:4C:76:B5:D8
ESSID:”TP-LINK_76B5D8″
Protocol:IEEE802.11bg
Mode:Master
Channel:1
Encryption key:on
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 9 11 6 12 18 24 36 48 54
Quality:42 Signal level:0 Noise level:165
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Preauthentication Supported
Extra: Last beacon: 220ms ago
。。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。。
Cell 22 – Address: 00:23:CD:97:31:44
ESSID:”ECO-5#401″
Protocol:IEEE802.11bg
Mode:Master
Channel:12
Encryption key:on
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 9 11 6 12 18 24 36 48 54
Quality:42 Signal level:0 Noise level:165
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
Preauthentication Supported
Extra: Last beacon: 1860ms ago
crifan@crifan-laptop:~/download$ iwlist scanning
lo Interface doesn’t support scanning.
eth0 Interface doesn’t support scanning.
wlan0 Scan completed :
Cell 01 – Address: D8:5D:4C:47:E6:B4
ESSID:”TP-LINK_noDailUp”
Protocol:IEEE802.11bg
Mode:Master
Channel:5
Encryption key:off
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 9 11 6 12 18 24 36 48 54
Quality:93 Signal level:0 Noise level:140
Extra: Last beacon: 1849ms ago
crifan@crifan-laptop:~/download$ iwlist scanning
lo Interface doesn’t support scanning.
eth0 Interface doesn’t support scanning.
wlan0 No scan results
后来,去网上找原因,看到这里的解释:
http://linuxcommand.org/man_pages/iwlist8.html
“ scan[ning]
。。。
Triggering scanning is a privileged operation (root only) and
normal users can only read left-over scan results. 。。。”
即,使用iwlist scan[ning]的时候,是需要超级用户的权限的,所以去尝试用sudo执行,就可以正常地,每次都可以找到无线网络了:
crifan@crifan-laptop:~/download$ sudo iwlist scanning
lo Interface doesn’t support scanning.
eth0 Interface doesn’t support scanning.
wlan0 Scan completed :
Cell 01 – Address: 94:0C:6D:D7:89:62
ESSID:”TP”
Protocol:IEEE802.11bg
Mode:Master
Channel:1
Encryption key:on
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 9 11 6 12 18 24 36 48 54
Quality:42 Signal level:0 Noise level:165
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
Preauthentication Supported
Extra: Last beacon: 179ms ago
Cell 02 – Address: D8:5D:4C:47:E6:B4
ESSID:”TP-LINK_noDailUp”
Protocol:IEEE802.11bg
Mode:Master
Channel:5
Encryption key:off
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 9 11 6 12 18 24 36 48 54
Quality:90 Signal level:0 Noise level:141
Extra: Last beacon: 94ms ago
。。。。。。。。。。。。。。
Cell 26 – Address: 1C:BD:B9:B3:67:2A
ESSID:”chome”
Protocol:IEEE802.11N-24G
Mode:Master
Channel:13
Encryption key:on
Bit Rates:300 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 11 6 9 12 18 24 36 48 54
Quality:42 Signal level:0 Noise level:165
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD0E0050F204104A0001101044000102
Extra: Last beacon: 7ms ago
Cell 27 – Address: 00:1B:11:A6:CE:CC
ESSID:”dlink-sophia”
Protocol:IEEE802.11bg
Mode:Master
Channel:6
Encryption key:on
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 48 18 24 36 54
Quality:42 Signal level:0 Noise level:165
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
Extra: Last beacon: 104ms ago
【总结】
1.使用iwlist scan或iwlist scanning的时候,需要加上sudo,即超级用户/root用户的权限去执行:sudo iwlist scan[ning]
2.遇到命令使用有问题的,首先要想到去man一下,此处即 man iwlist去看看其使用说明,常见注意事项,应该都可以找到解释的。
转载请注明:在路上 » 【已解决】iwlist scan或iwlist scanning的输出结果不稳定/return no Access Point/No scan results