美文网首页
ADB或者串口模式下进行WIFI配置

ADB或者串口模式下进行WIFI配置

作者: Atlans | 来源:发表于2018-04-04 11:21 被阅读0次

1.echo 1 > /dev/wmtWifi,启动WIFI驱动

2.进入/system/bin目录,首先运行服务端wpa_supplicant。

./wpa_supplicant -iwlan0 -Dnl80211 -c/system/etc/wifi/wpa_supplicant.conf

3.cd /system/bin

wpa_cli -p /data/misc/wpa_supplicant

4.scan

5.scan_results

6.连WIFI的命令行,有以下几种:

for AP that doesn`t have encryption

>add_network (It will display a network id for you, assume it returns 0)

>set_network 0 ssid “666”

>set_network 0 key_mgmt NONE

>enable_network 0

>quit

for AP that has WEP

>add_network (assume returns 1)

>set_network 1 ssid “666”

>set_network 1 key_mgmt NONE

>set_network 1 wep_key0 “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

for AP that has WPA-PSK/WPA2-PSK

>add_network (assume returns 2)

>set_network 2 ssid “666”

>set_network 2 psk “your pre-shared key”

>select_network 2 (optional, remember, if you are connecting with another

AP, you should select it to disable the another)

>enable_network 2

相关文章

网友评论

      本文标题:ADB或者串口模式下进行WIFI配置

      本文链接:https://www.haomeiwen.com/subject/fdlkhftx.html