Get AP info

1. API Description

This API is used to get AP information.

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

Administrator Rights Logged-in
Yes Yes

2. Input Parameters

Name Required Type Description
iface Yes String The network card name, wlan1

3. Output Parameters

Name Type Description
status Int Status code
ssid String The AP name
hw_mode String The working frequency of WiFi
a: 5GHz
g: 2.4GHz
ht String The frequency bandwidth, including HT20, HT40, HT80, and HT160
channel Int The default AP channel
country-code String Refer to ISO/IEC 3166-1
enc String Security type
NONE: No authentication; WPA2-PSK: WPA2-Personal
ipaddr String The IP address
dhcp-ip-start Address The starting IP address allocated by DHCP
dhcp-ip-end Address The ending IP address allocated by DHCP
enable-surfing Boolean Whether to enable "Share Ethernet"
true: Yes; false: No
first-use Boolean The first time to switch to the AP mode
true: Yes; false: No
ap-to-sta-reboot-effect Boolean Whether reboot is required after switching from AP to Wi-Fi
true: Yes; false: No
sta-to-ap-reboot-effect Boolean Whether reboot is required after switching from Wi-Fi to AP
true: Yes; false: No
support-freq Array The supported frequency list
support-ht-2g Array The bandwidth supported by 2.4G
support-ht-25g Array The bandwidth supported by 5G
support-channels Array The supported channels

4. Example

Getting AP information.

Input Example
{
  "iface": "wlan1"
}
Output Example
{
    "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. 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
39 MW_STATUS_MISMATCH The network card is missing

results matching ""

    No results matching ""