获取AP信息

1.接口描述

接口说明:获取AP信息。

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

管理员权限 登录认证

2.输入参数

参数名称 必选 类型 描述
iface String 网卡名称,wlan1

3.输出参数

参数名称 类型 描述
status Int 状态码
ssid String AP 网络名称
hw_mode String Wi-Fi工作频率
a:5GHz; g: 2.4GHz
ht String Wi-Fi带宽,有效值:HT20、HT40、HT80、HT160
channel Int AP 默认通道
country-code String 参考ISO/IEC 3166-1
enc String 安全类型
NONE:无;WPA2-PSK:WPA2-个人版
ipaddr String IP地址
dhcp-ip-start 地址 DHCP 分配的IP起始地址
dhcp-ip-end 地址 DHCP 分配的IP结束地址
enable-surfing Boolean 是否启用“共享以太网”
true:是;false:否
first-use Boolean 首次切换到AP模式
true:是;false:否
ap-to-sta-reboot-effect Boolean AP切换到Wi-Fi是否需要重启
true:是;false:否
sta-to-ap-reboot-effect Boolean Wi-Fi切换到AP是否需要重启
true:是;false:否
support-freq Array 支持的频率列表
support-ht-2g Array 2.4G支持的带宽
support-ht-25g Array 5G支持的带宽
support-channels Array 支持的通道列表,详情略

4.示例

获取AP信息。

输入示例
{
  "iface": "wlan1"
}
输出示例
{
    "ssid": "test_kb22",
    "hw_mode": "a",
    "ht": "HT80",
    "channel": 36,
    "country-code": "CN",
    "enc": "NONE",
    "ipaddr": "192.168.67.1",
    "dhcp-ip-start": "192.168.67.2",
    "dhcp-ip-end": "192.168.67.50",
    "first-use": false,
    "ap-to-sta-reboot-effect": true,
    "sta-to-ap-reboot-effect": false,
    "enable-surfing": true,
    "support-freq": [
        {
            "freq": "2.4G",
            "hw-mode": "g"
        },
        {
            "freq": "5G",
            "hw-mode": "a"
        }
    ],
    "support-ht-2g": [
        "HT20"
    ],
    "support-ht-5g": [
        "HT20",
        "HT80"
    ],
    "support-channels": {
        "channels": [
            {
                "code": [
                    "US",
                    "CA"
                ],
                "2g-chans": [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10,
                    11
                ],
                "5g-chans": [
                    36,
                    40,
                    44,
                    48,
                    149,
                    153,
                    157,
                    161,
                    165
                ]
            },
            {
                "code": [
                    "AL",
                    "AM",
                    "AT",
                    "AZ",
                    "BA",
                    "BE",
                    "BG",
                    "BY",
                    "CH",
                    "CY",
                    "CZ",
                    "DE",
                    "DK",
                    "EE",
                    "EL",
                    "ES",
                    "FI",
                    "FR",
                    "GE",
                    "HR",
                    "HU",
                    "IE",
                    "IS",
                    "IT",
                    "LI",
                    "LT",
                    "LU",
                    "LV",
                    "MD",
                    "ME",
                    "MK",
                    "MT",
                    "NL",
                    "NO",
                    "PL",
                    "PT",
                    "RO",
                    "RS",
                    "RU",
                    "SE",
                    "SI",
                    "SK",
                    "TR",
                    "UA",
                    "UK"
                ],
                "2g-chans": [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10,
                    11
                ],
                "5g-chans": [
                    36,
                    40,
                    44,
                    48,
                    149,
                    153,
                    157,
                    161,
                    165
                ]
            },
            {
                "code": [
                    "JP"
                ],
                "2g-chans": [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10,
                    11,
                    12,
                    13
                ],
                "5g-chans": [
                    36,
                    40,
                    44,
                    48
                ]
            },
            {
                "code": [
                    "CN"
                ],
                "2g-chans": [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10,
                    11,
                    12,
                    13
                ],
                "5g-chans": [
                    36,
                    40,
                    44,
                    48,
                    149,
                    153,
                    157,
                    161,
                    165
                ]
            }
        ],
        "global-2g-chans": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13
        ],
        "global-5g-chans": [
            36,
            40,
            44,
            48,
            149,
            153,
            157,
            161,
            165
        ]
    },
    "status": 0
}

5.错误码

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

错误码 定义 说明
7 MW_STATUS_INVALID_ARG 参数缺失
39 MW_STATUS_MISMATCH 网卡不存在

与“”相关结果约

    找不到与“”相关的结果