Skip to content

Contents

describe

  • Wifi related interface

Interface version

Version numberMakerDate of formulationRevision date
1.0alan2022-07-26

POST request address

http://192.168.1.1/api

API List

NameDescription
getGet wif configuration
setSet wifi settings

1、get

Get the wifi configuration request parameters

{
"version": "1.0",
"sid": "d0ec44cfd0de6162c4bfe1d4362f03ef",
"module": "wifi",
"api": "get",
"param": {}
}

Request parameter description

Parameter nametypedescription
verstringAPI version
sidstringsession id returned after logging
modulestringrequested module
apistringrequested api interface

Return to the example

{
"module": "wifi",
"version": "1.0",
"api": "get",
"errcode": 0,
"result": {
"guest": {
"disabled": 1,
"ssid": "zZzzz+guest",
"encryption": "none"
},
"master": {
"ssid": "zZzzz",
"encryption": "mixed-psk",
"key": "123456789",
"hidden": 0,
"disabled": 0
},
"radio0": {
"current_channel": 11,
"chanlist": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
0
],
"bw": "auto",
"channel": 0
},
"radio1": {
"current_channel": 149,
"chanlist": [
36,
40,
44,
48,
149,
153,
157,
161,
165,
0
],
"bw": "auto",
"channel": 0
}
},
"sid": "9faedbbd29f344990d3a5301381a41d4"
}

Return to parameter description

Parameter nametypedescription
modulestringrequested module
versionstringapi version
apistringrequested api interface
errcodestringReturned error code
sidstringrequested sid
result.masterstringwifi main network configuration information
result.master.ssidstringssid of wifi main network
result.master.encryptionstringencryption method of wifi main network, mixed-psk means encryption, none means unencrypted
result.master.keystringwifi connection password for the wifi main network when setting mixed-psk
result.master.disablednumberWhether the main wifi network is turned on, 0 means on, 1 means off
result.master.hiddennumber1 means hidden ssid, 0 means not hidden
result.gueststringwifi guest network configuration information
result.guest.ssidstringssid for wifi guest network
result.guest.encryptionstringwifi guest network encryption method, mixed-psk means encryption, none means unencrypted
result.guest.keystringwifi connection key for wifi guest network when setting mixed-psk
result.guest.disablednumberWhether the wifi guest network is turned on, 0 means on, 1 means off
result.radio0stringwifi 2.4G network advanced configuration
result.radio0.bwstringwifi 2.4G network bandwidth mode, HT20, HT40 or auto (auto)
result.radio0.channelstringwifi channel of 2.4G network, 0 means using automatic channel
result.radio0.current_channelstringwifi 2.4G current working channel
result.radio0.chanlistarraywifi 2.4G supports channel list, 0 is automatic channel
result.radio1stringwifi Advanced configuration of 5G network
result.radio1.bwstringwifi Bandwidth mode of 5G network, HT20, HT40, HT80 or auto (auto)
result.radio1.channelstringwifi channel of 5G network, 0 means using automatic channel
result.radio1.current_channelstringwifi 5G current working channel
result.radio1.chanlistarraywifi 5G supports channel list, 0 is automatic channel

2、set

Set wifi interface request parameters

{
"version": "1.0",
"sid": "cdd2a5d9734c44df74745430dd7a149b",
"module": "wifi",
"api": "set",
"param": {
"guest": {
"ssid": "zZZZ-guest",
"encryption": "none",
"disabled": 0
},
"master": {
"ssid": "aaZzzz",
"encryption": "mixed-psk",
"key": "1234567890",
"disabled": 0
},
"radio0": {
"bw": "auto",
"channel": 0
},
"radio1": {
"bw": "auto",
"channel": 0
}
}
}

Request parameter description

Parameter nametypedescription
versionstringAPI version
sidstringsession id returned after logging
modulestringrequested module
apistringrequested api interface
param.masterstringwifi main network configuration information
param.master.ssidstringssid of wifi main network
param.master.encryptionstringencryption method of wifi main network, mixed-psk means encryption, none means unencrypted
param.master.keystringwifi connection password for the wifi main network when setting mixed-psk
param.master.disablednumberWhether the main wifi network is turned on, 0 means on, 1 means off
param.gueststringwifi guest network configuration information
param.guest.ssidstringssid for wifi guest network
param.guest.encryptionstringwifi guest network encryption method, mixed-psk means encryption, none means unencrypted
param.guest.keystringwifi connection key for wifi guest network when setting mixed-psk
param.guest.disablednumberWhether the wifi guest network is turned on, 0 means on, 1 means off
param.radio0stringwifi 2.4G network advanced configuration
param.radio0.bwstringwifi 2.4G network bandwidth mode, HT20, HT40 or auto (auto)
param.radio0.channelstringwifi channel of 2.4G network, 0 means using automatic channel
param.radio1stringwifi Advanced configuration of 5G network
param.radio1.bwstringwifi Bandwidth mode of 5G network, HT20, HT40, HT80 or auto (auto)
param.radio1.channelstringwifi channel of 5G network, 0 means using automatic channel

Return to the example

{
"module": "wifi",
"version": "1.0",
"api": "set",
"errcode": 0,
"result": {
},
"sid": "cdd2a5d9734c44df74745430dd7a149b"
}

Return to parameter description

Parameter nametypedescription
modulestringrequested module
versionstringapi version
apistringrequested api interface
errcodestringReturned error code
sidstringrequested sid
result.restart_wifiboolWill wifi restart after modifying wifi configuration