Get Network Interface Information

555

# Get Network Interface Information

Path:

/api/ifstatus.json

Method: GET

Content-type: application/json; charset=utf-8

API Descritpion: This can be used to get the network interface information.

Response

Name Type Example Description
types Array [] Network type; each type represents one element of the array.
peers Array [] The IP and MAC address of the device that has connected to the hotspot generated by the player.
SSID String uwef Wi-Fi or hotspot name
channel int 1 Wi-Fi AP channel
pass String iiiiiiiiiii Wi-Fi or hotspot password
carrier int 1 Indicates whether the player is connecting to this type of network; 1: Yes, 0: No
type String lan Network type; Wi-Fi, Wi-Fi AP (hotspot), LAN, and 4G
enbaled int 0 Status of this type of network; 1: Open, 0: Closed
connected int 0 Indicate whether the network connection is successful; 1: Successful, 0: Failed
ips Object {} IP information
broadcast String 192.168.4.255 Broadcast address
ip String 192.168.43.1 IP address
mac String d2:e0:d1:71🆎f6 MAC address
mask String 255.255.0.0 Subnet mask
speed int 62 Transmission speed of the Wi-Fi network (unit: Mbps)
priority int 0 Wi-Fi priority
dns1 String 192.168.1.1 Preferred DNS server
dns1 String 192.168.1.1 Alternate DNS server
mode String static The way to designate IP address; DHCP or Static IP.
operstate String up LAN connection status; up: Connected, down: Disconnected
strength int 0 4G signal strength

Example

{
	"types": [{
		"peers": [],
		"SSID": "a35-1234",
		"channel": 6,
		"pass": "123456789",
		"carrier": 0,
		"connected": 0,
		"enabled": 0,
		"ips": {
			"broadcast": "192.168.43.255",
			"ip": "192.168.43.1",
			"mask": "255.255.255.0"
		},
		"type": "wifi ap"
	}, {
		"speed": -1,
		"ssids": [],
		"state": "UNINITIALIZED",
		"carrier": 0,
		"connected": 0,
		"enabled": 0,
		"type": "wifi"
	}, {
		"carrier": 1,
		"connected": 0,
		"enabled": 1,
		"ips": {
			"dns1": "223.5.5.5",
			"dns2": "202.96.128.166",
			"gateway": "192.168.1.1",
			"ip": "192.168.1.240",
			"mask": "255.255.255.0"
		},
		"mac": "00:0b:12:22:33:90",
		"mode": "dhcp",
		"operstate": "unknown",
		"type": "lan"
	}, {
		"strength": 0,
		"carrier": 0,
		"connected": 0,
		"enabled": 0,
		"type": "4G"
	}]
}