openwrt之wifi 脚本指令与 uci 指令/ ap + sta / 配置连接上级路由器

root@xxx:~# wifi help
Usage: /sbin/wifi [down|detect|reload|status]

enables (default), disables or detects a wifi configuration

root@xxx:~# wifi up/down  //打开、关闭wifi 接口(包括ap、sta),但是不写会存储(重启设备,恢复默认值)

root@xxx:~# wifi detects > /etc/config/wireless   // 生成无线配置文件(uci get / set 获取/设置此配置文件内的值)

root@xxx:~# wifi status

{
"radio0": {
"up": false,
"pending": true,
"autostart": true,
"disabled": false,
"config": {
"channel": "auto",
"hwmode": "11ng",
"path": "platform\/qca953x_wmac",
"ht_capab": [
"LDPC",
"SHORT-GI-20",
"SHORT-GI-40",
"TX-STBC",
"RX-STBC1",
"DSSS_CCK-40"
],
"htmode": "HT20",
"country": "CN",
"txpower": 15,
"disabled": false
},
"interfaces": [
{
"section": "@wifi-iface[0]",
"config": {
"mode": "ap",
"ssid": "Leedarson_9A1462",
"encryption": "psk-mixed",
"ifname": "wlan0",
"key": "12345678",
"wps_pushbutton": true,
"network": [
"lan"
],
"mode": "ap"
}
},
{
"section": "@wifi-iface[1]",
"config": {
"encryption": "psk-mixed",
"ssid": "Leedarson",
"mode": "sta",
"bssid": "B8:55:10:17:55:68",
"ifname": "wlan0-1",
"key": "12345678",
"wps_pushbutton": true,
"mode": "sta",
"network": [
"wwan"
],
"disabled": false
}
}
]
}

}

root@xxxx:~# uci 
Usage: uci [] []
Commands:
batch
export     []
import     []
changes    []
commit     []
add        
add_list   .

.

你可能感兴趣的:(openwrt,openwrt,wifi,up,uci,set,get)