wpa_cli连接网络

for AP that doesn`t have encryption
>add_network (It will display a network id for you, assume it returns 0)
>set_network 0 ssid “666”
>set_network 0 key_mgmt NONE
>enable_network 0
>quit


for AP that has WEP
>add_network (assume returns 1)
>set_network 1 ssid “666”
>set_network 1 key_mgmt NONE
>set_network 1 wep_key0 “your ap passwork”(if usting ASCII, it need
 quotation marks, if using hex, then don`t need the double quotation
marks)
>set_network 1 wep_tx_keyidx 0
>select_network 1 (optional, remember, if you are connecting with another
AP, you should select it to disable the another)
>enable_network 1

for AP that has WPA-PSK/WPA2-PSK
>add_network (assume returns 2)
>set_network 2 ssid “666”
>set_network 2 psk “your pre-shared key”
>select_network 2 (optional, remember, if you are connecting with another
AP, you should select it to disable the another)
>enable_network 2

猜你喜欢

转载自blog.csdn.net/nh5431313/article/details/78191649