[linux wpa_cli] WIFI AP搜索、连接方法

2021/8/4 7:09:51

本文主要是介绍[linux wpa_cli] WIFI AP搜索、连接方法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

搜索 AP

wpa_cli -iwlan0 scan //搜索无线网
wpa_cli -iwlan0 scan_results //显示搜索结果
wpa_cli -iwlan0 add_network

root@sipeed:/# wpa_cli -iwlan0 scan
OK
root@sipeed:/# wpa_cli -iwlan0 scan
FAIL-BUSY
root@sipeed:/# wpa_cli -iwlan0 scan_results
bssid / frequency / signal level / flags / ssid
58:41:20:05:07:96	2437	-77	[WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS]	Sipeed_Guest
84:74:60:89:2a:10	2447	-73	[WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS]ChinaNet-vNqX
58:41:20:04:e4:d1	2412	-88	[WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS]	Sipeed_2.4G
root@sipeed:/#

wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf &
wpa_cli save_config
wpa_cli reconfigure
wpa_cli list_networks
wpa_cli status
wpa_cli remove_network 0
wpa_cli -iwlan0 scan //搜索无线网
wpa_cli -iwlan0 scan_results //显示搜索结果
wpa_cli -iwlan0 add_network

例如:
wpa_cli -iwlan0 add_network
wpa_cli -iwlan0 set_network 1 ssid "TEST_IP"
wpa_cli -iwlan0 set_network 1 key_mgmt NONE
wpa_cli -iwlan0 set_network 1 wep_key0 "2223344"
wpa_cli -iwlan0 set_network 1 wep_tx_keyidx 0
wpa_cli -iwlan0 select_network 1
wpa_cli -iwlan0 enable_network 1
wpa_cli -iwlan0 quit
wpa_cli -iwlan0 dhclient eth1



这篇关于[linux wpa_cli] WIFI AP搜索、连接方法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程