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

    技术2022-05-20  48

            wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf  &wpa_cli save_configwpa_cli reconfigurewpa_cli list_networkswpa_cli statuswpa_cli remove_network 0wpa_cli -ieth1 scan  //搜索无线网wpa_cli -ieth1 scan_results  //显示搜索结果wpa_cli -ieth1 add_network

    例如:wpa_cli -ieth1 add_networkwpa_cli -ieth1 set_network 1 ssid "TEST_IP"wpa_cli -ieth1 set_network 1 key_mgmt NONEwpa_cli -ieth1 set_network 1 wep_key0 "2223344"wpa_cli -ieth1 set_network 1 wep_tx_keyidx 0wpa_cli -ieth1 select_network 1wpa_cli -ieth1 enable_network 1wpa_cli -ieth1 quitwpa_cli -ieth1 dhclient eth1

    wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf  &wpa_cli -ieth1add_network (assume returns 1)set_network 1 ssid "TEST_IP"set_network 1 key_mgmt NONEset_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 0select_network 1  (optional, remember, if you are connecting with another AP, you should select it to disable the another)enable_network 1quitdhclient eth1


    最新回复(0)