以下是在tina直接输入命令“wifi -h” 得到的帮助信息
************************* sta mode Options **************************
-
wifi -o sta
-
open sta mode
wifi -f -
close sta mode
wifi -s -
scan wifi
wifi -c ssid [passwd] -
connect to an encrypted or non-encrypted ap
wifi -d -
disconnect from ap
wifi -a [enable/disable] -
Auto reconnect
wifi -l [all] -
list connected or saved ap information
wifi -r [ssid/all] -
remove a specified network or all networks
wifi -p [softap/ble/xconfig/soundwave] - softap/ble/xconfig/soundwave distribution network
************************* ap mode Options ***************************
-
wifi -o ap [ssid] [passwd]
- open ap mode
- if ssid and passwd is not set, start the default configuration: (allwinner-ap Aa123456)
-
if only set ssid, start the ap without passwd
wifi -l -
list current ap mode information
wifi -f - close ap mode
*********************** monitor mode Options ************************
-
wifi -o monitor
-
open monitor mode
wifi -f - close monitor mode
*************************** other Options ***************************
-
wifi -D [error/warn/info/debug/dump/exce]
-
set debug level
wifi -g -
get system mac addr
wifi -m [macaddr] -
set system mac addr
wifi -h - print help
这么来看的话,第一步应该先打开sta模式
wifi -o sta
第二步扫描附近的wifi得到列表
wifi -s
这里的扫描要说一下,好像会一直进行扫描的,需要自己ctrlC一下,终止扫描
然后连接自己的wifi
wifi -c ssid password
提示已经连接上了,接下来尝试一下能不能ping通百度
看来也是可以的,这下说明了wifi是连接成功了