linux下WIFI的AP搜索及连接方法

        
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 -ieth1 scan  //搜索无线网
wpa_cli -ieth1 scan_results  //显示搜索结果
wpa_cli -ieth1 add_network


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

wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf  &
wpa_cli -ieth1
add_network (assume returns 1)
set_network 1 ssid "TEST_IP"
set_network 1 key_mgmt NONE
set_network 1 wep_key0  "123456" //“your ap passwork”(if usting ASCII, it need double 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
quit
dhclient eth1

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值