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

  • 相关阅读:
    使用httputils上传图片到服务器
    Android与服务器http连接模块代码
    简单的三次登陆和入门级九九乘法表的实现
    简单购物车的实现
    python常见数据类型
    python基础一
    python入门一
    python简介
    day1 java基础语法
    LeftStr函数使用
  • 原文地址:https://www.cnblogs.com/juwan/p/15095267.html
Copyright © 2011-2022 走看看