设置AP

1.接口描述

接口说明:设置AP。

请求方式:POST [ip]/api/network/ap-config

管理员权限 登录认证

2.输入参数

参数名称 必选 类型 描述
ap-to-sta-reboot-effect Boolean AP切换Wi-Fi模式是否需要重启
true:是;false:否
channel Int AP 默认通道
country-code String 参考ISO/IEC 3166-1
dhcp-ip-end String DHCP 分配的IP结束地址
dhcp-ip-start String DHCP 分配的IP起始地址
enable-surfing Boolean 是否启用“共享以太网”
true:是;false:否
enc String 安全类型
NONE:无;WPA2-PSK:WPA2-个人版
ext-ap-reset-passwrod-on-time Boolean 是否启用“每日更新密码”
true:是;false:否
first-use Boolean 首次切换到AP模式
true:是;false:否
ht String 频段带宽
有效值:HT20、HT40、HT80、HT160
ipaddr String IP 地址
iface String 网卡名称,wlan1
ssid String AP 网络名称
sta-to-ap-reboot-effect Boolean Wi-Fi切换到AP是否需要重启
true:是;false:否

3.输出参数

参数名称 类型 描述
status Int 状态码

4.示例

设置AP。

输入示例
{
  "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"
}
输出示例
{
  "status": 0
}

5.错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 定义 说明
7 MW_STATUS_INVALID_ARG 参数缺失或错误

与“”相关结果约

    找不到与“”相关的结果