首页 > 其他 > 详细

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

时间:2014-01-14 21:50:29      阅读:763      评论:0      收藏:0      [点我收藏+]

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

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

原文:http://www.cnblogs.com/huazhen/p/3513892.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!