zoukankan      html  css  js  c++  java
  • [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

  • 相关阅读:
    关于firstChild,firstElementChild和children
    trim(),正则表达式中文匹配
    Shell之基本用法
    Samba服务部署
    Linux基础(3)
    linux基础(2)
    Linux基础(1)
    网络基础及网络协议
    操作系统简介
    为何要学习计算机基础
  • 原文地址:https://www.cnblogs.com/juwan/p/15095267.html
Copyright © 2011-2022 走看看