Get network card info

1. API Description

This API is used to get network card information.

Request mode: POST [ip]/api/network/if-info

Administrator Rights Logged-in
No Yes

2. Input Parameters

None

3. Output Parameters

Name Type Description
status Int Status code
code String Status description
device-name String The device name
net Array of NetData The network card list
ext-mobile-first Booean Reserved
NetData
Name Type Description
support-enable Boolean Whether to support Enable/Disable Wi-Fi/AP
true: Yes; false: No
enable Boolean Whether the network card service is enabled
true: Yes; false: No
prio Int Network card priority
0: No priority, generally refering to USB, ETH CONSOLE; 1 ~ 99 is normal
iface String The network card name
type Int The network card type
0: Ethernet
1: Wi-Fi/AP
2: USB Sharing
3: USB NET
4: Built-in 4G/5G
5: Bridge
use-dhcp Boolean Whether to enable DHCP to get IP address
true: Yes; false: No
ipaddr String IP address
ipv6addr String IPv6 address
netmask String The subnet mask
gateway String The gateway address
dns1 String Primary DNS. Empty characters mean not set.
dns2 String Secondary DNS. Empty characters mean not set.
mac String The MAC address
link-speed Int The link speed
10: 10Mbps
100: 100Mbps
1000: 1Gbps
2500: 2.5Gbps
10000: 10Gbps
12: full-speed
480: high-speed
5000: super-speed-5g
10000: super-speed-10g
link-state Int The link state
0: Network port exception
1: Not connected
2: Connected
tx-speed-kbps Int The sending speed (Kbps)
rx-speed-kbps Int The receiving speed (Kbps)
mode Int The working mode of wireless network card
0: STA mode; 1: AP mode
mode-lock Boolean Whether the wireless card working mode is locked or not
true: Yes; false: No
ssid String The AP name
reboot-require Boolean Whether it requires reboot when the wireless network card switches working mode
true: Yes; false: No
enable-ncm Boolean Whether USB NET is enabled.
true: Enabled; false: Disabled
sim-state Int The SIM card state
0: not ready
1: ready
2: PIN
3: PUK
pin-remaind Int The remaining PIN times
standard Int Cellular network signal types
0: Unknown; 2: 2G; 3: 3G; 4: 4G; 5: 5G
Signal quality for 3G and below refers to RSSI
Signal reference for 4G/5G is RSRP
rssi Int Cellular Network Signal Strength
Very Good: RSSI > -65dBm
Good: RSSI = -65 ~ -75dBm
Average: RSSI = -75 ~ -85dBm
Poor: RSSI = -85 ~ -95dBm
Very Poor: RSSI < -95dBm
rsrp Int 4G/5G RSRP
Very Good: RSRP>-115dBm
Good: RSRP=-120 to -115dBm
Average: RSRP=-125 to -120dBm
Poor: RSRP=-130 to -125dBm
Very Poor: RSRP<-130dBm
rsrq Int 4G/5G RSRQ value, in dB
sinr Int 4G/5G SINR value, in dB
imei-no String IMEI information
operator String The operator, including CHN-MOBLIE, CHN-UNICOM, CHN-CT, Orange, O2, Vodafone, AT&T, T-Mobile, Verizon, Google Fi
phone-number String SIM number
vendor String The vendor of the 4G/5G module
product String The product information of the 4G module

4. Example

Obtaining network card information.

Input Example
None
Output Example
{
    "device-name": "00A601230913015",
    "ext-mobile-first": false,
    "net": [
        {
            "support-enable": false,
            "enable": true,
            "prio": 34,
            "iface": "eth0",
            "type": 0,
            "use-dhcp": true,
            "ipaddr": "10.10.6.222",
            "netmask": "255.255.240.0",
            "gateway": "10.10.0.1",
            "dns1": "10.10.1.3",
            "dns2": "",
            "ipv6addr": [
                "fe80::d2c8:57ff:fe81:c75e"
            ],
            "mac": "d0:c8:57:81:c7:5e",
            "link-speed": 1000,
            "link-state": 2,
            "tx-speed-kbps": 0,
            "rx-speed-kbps": 35
        }
        {
            "support-enable": true,
            "enable": true,
            "prio": 41,
            "iface": "wlan0",
            "type": 1,
            "mode": 1,
            "mode-lock": false,
            "ssid": "Magewell_ASR_3015_5G",
            "reboot-require": false,
            "use-dhcp": true,
            "ipaddr": "",
            "netmask": "",
            "gateway": "",
            "dns1": "",
            "dns2": "",
            "ipv6addr": [
                "fe80::d2c8:57ff:fe81:b7f1"
            ],
            "mac": "d0:c8:57:81:b7:f1",
            "link-speed": -1,
            "link-state": 2,
            "tx-speed-kbps": 0,
            "rx-speed-kbps": 0
        }
        {
            "support-enable": false,
            "enable": true,
            "prio": 36,
            "iface": "wwan0",
            "type": 4,
            "use-dhcp": true,
            "ipaddr": "",
            "netmask": "",
            "gateway": "",
            "dns1": "",
            "dns2": "",
            "ipv6addr": [
            ],
            "mac": "1a:97:9f:84:3a:e2",
            "link-speed": -1,
            "link-state": 0,
            "tx-speed-kbps": 0,
            "rx-speed-kbps": 0,
            "enable-ipv6": false,
            "sim-state": 2,
            "pin-remaind": 3,
            "standard": 0,
            "rssi": 0,
            "rsrp": 0,
            "rsrq": 0,
            "sinr": 0,
            "band": "",
            "imei-no": "",
            "phone-number": "",
            "operator": "",
            "version": "",
            "vendor": "Quectel Wireless Solutions Co., Ltd.",
            "product": "EC20\/EC25\/EM05-CE LTE modem"
        }
    ],
    "status": 0,
    "code": "Success"
}

5. Error Code

No error code related to the API business logic. For other error codes, see Common Error Codes.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""