Set AP

1. API Description

This API is used to set AP.

Request mode: POST [ip]/api/network/ap-config

Administrator Rights Logged-in
Yes Yes

2. Input Parameters

Name Required Type Description
ap-to-sta-reboot-effect Yes Boolean Whether reboot is required after switching from AP to Wi-Fi
true: Yes; false: No
channel Yes Int The default AP channel
country-code Yes String Refer to ISO/IEC 3166-1
dhcp-ip-end Yes String The ending IP address allocated by DHCP
dhcp-ip-start Yes String The starting IP address allocated by DHCP
enable-surfing Yes Boolean Whether to enable "Share Ethernet"
true: Yes; false: No
enc Yes String Security type
NONE: No authentication; WPA2-PSK: WPA2-Personal
ext-ap-reset-passwrod-on-time Yes Boolean Whether to enable "Change password daily".
true: Yes; false: No
first-use Yes Boolean The first time to switch to the AP mode
true: Yes; false: No
ht Yes String The frequency bandwidth, including HT20, HT40, HT80, and HT160
ipaddr Yes String IP address
iface Yes String The network card name, wlan1
ssid Yes String The AP name
sta-to-ap-reboot-effect Yes Boolean Whether reboot is required after switching from Wi-Fi to AP
true: Yes; false: No

3. Output Parameters

Name Type Description
status Int Status code

4. Example

Setting AP.

Input Example
{
  "ap-to-sta-reboot-effect": true,
  "channel": 44,
  "country-code": "CN",
  "dhcp-ip-end": "192.168.67.254",
  "dhcp-ip-start": "192.168.67.2",
  "enable-surfing": false,
  "enc": "WPA2-PSK",
  "ext-ap-reset-passwrod-on-time": false,
  "first-use": false,
  "ht": "HT20",
  "hw_mode": "a",
  "ipaddr": "192.168.67.1",
  "ssid": "USB-Fusion_5002_5G",
  "sta-to-ap-reboot-effect": false,
  "iface": "wlan1"
}
Output Example
{
  "status": 0
}

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
7 MW_STATUS_INVALID_ARG Missing required parameters

results matching ""

    No results matching ""