Skip to main content

Network

Endpoint Overview

MethodPathPurpose
GET/network/lanGet wired network configuration
PUT/network/lanSet wired network configuration
GET/network/wlanGet wireless IPv4 configuration
PUT/network/wlanSet wireless IPv4 configuration
GET/network/wifiGet current Wi-Fi connection info
GET/network/wifi-statusQuery Wi-Fi power status
POST/network/wifi-status?power=on/offToggle Wi-Fi power
GET/network/wifi-listScan nearby Wi-Fi networks
POST/network/wifiConnect to Wi-Fi
DELETE/network/wifiDisconnect or forget Wi-Fi
GET/web/settingQuery HTTP API settings
POST/web/settingSet HTTP API settings
GET/ftp/settingQuery FTP service settings
POST/ftp/settingSet FTP service settings

LAN and WLAN Configuration

Get Configuration

GET /network/lan
GET /network/wlan

Response:

{
"dIpv4": {
"sV4Address": "192.168.7.200",
"sV4Gateway": "192.168.6.2",
"sV4Method": "static",
"sV4Netmask": "255.255.254.0"
},
"dLink": {
"bEnableMethod": true,
"iPower": 1,
"sAddress": "40:FD:F3:25:1A:8E",
"sDNS1": "202.96.134.133",
"sDNS2": "223.5.5.5",
"sInterface": "wlan0"
}
}
FieldDescription
dIpv4.sV4AddressIPv4 address
dIpv4.sV4GatewayIPv4 gateway
dIpv4.sV4MethodIP assignment method, dhcp or static
dIpv4.sV4NetmaskIPv4 subnet mask
dLink.sDNS1 / dLink.sDNS2DNS servers
dLink.sAddressMAC address
dLink.sInterfaceNetwork interface name, e.g. eth0 or wlan0
dLink.iPowerInterface power state
dLink.bEnableMethodWhether manual configuration is enabled

Set Configuration

PUT /network/lan
PUT /network/wlan

Request body:

{
"dIpv4": {
"sV4Address": "192.168.1.123",
"sV4Gateway": "192.168.1.1",
"sV4Method": "dhcp",
"sV4Netmask": "255.255.255.0"
},
"dLink": {
"sDNS1": "8.8.8.8",
"sDNS2": "8.8.4.4",
"bEnableMethod": true
}
}

Response:

{
"code": 0,
"message": "SUCCESS TO SET IP"
}

Current Wi-Fi Info

GET /network/wifi

The response structure is the same as LAN/WLAN configuration.

Wi-Fi Power

Query Wi-Fi Power Status

GET /network/wifi-status

Response:

{
"iPower": 1,
"id": 1,
"sType": "wifi"
}
FieldDescription
iPowerWi-Fi power state, 1 on, 0 off
idInterface ID
sTypeInterface type

Toggle Wi-Fi Power

POST /network/wifi-status?power=on
POST /network/wifi-status?power=off
ParameterValueDescription
poweron, offTurn Wi-Fi on or off

Wi-Fi Scan and Connect

Scan Wi-Fi List

GET /network/wifi-list

Response:

[
{
"sBssid": "58:b4:bb:93:b8:e3",
"sSsid": "SEEED-MKT",
"iFrequency": 5180,
"iRssi": -44,
"sFlags": "[WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS]",
"sConnected": true,
"sReserved": true
}
]
FieldDescription
sBssidWi-Fi BSSID, used as the unique identifier for connection
sSsidWi-Fi network name
iFrequencyFrequency channel
iRssiSignal strength
sFlagsSecurity type
sConnectedWhether currently connected
sReservedWhether the password is saved

Connect to Wi-Fi

POST /network/wifi

Request body:

{
"sSsid": "58:b4:bb:93:b8:e3",
"sPassword": "your_wifi_password"
}
FieldDescription
sSsidWi-Fi unique identifier; use the sBssid value from /network/wifi-list
sPasswordWi-Fi password

Response:

{
"code": 0,
"message": ""
}

Disconnect or Forget Wi-Fi

DELETE /network/wifi?disconnect=<ssid>
DELETE /network/wifi?Ignore=<ssid>
ParameterDescription
disconnectDisconnect from the specified Wi-Fi
IgnoreForget the specified Wi-Fi

Response:

{
"code": 0,
"message": "",
"status": 0
}
statusDescription
0Success
-1Timeout
-2Wrong password

HTTP API Settings

Query Settings

GET /web/setting

Response:

{
"sEnable": true,
"sApiKey": "M8RZVF3hXrVDk*%2%LlN*^7nuCRHPiIT"
}
FieldDescription
sEnableWhether HTTP API is enabled
sApiKeyAPI key

Set Settings

POST /web/setting

Request body:

{
"sEnable": true,
"sApiKey": "your_api_key"
}

FTP Service Settings

Query Settings

GET /ftp/setting

Response:

{
"sEnable": false,
"sFtpPassword": "Seeed123.",
"sFtpPort": "21",
"sFtpUser": "ftpuser"
}
FieldDescription
sEnableWhether FTP service is enabled
sFtpPortFTP port
sFtpUserFTP username
sFtpPasswordFTP password

Set Settings

POST /ftp/setting

Request body:

{
"sEnable": true,
"sFtpPort": "21",
"sFtpUser": "ftpuser",
"sFtpPassword": "StrongPassword123!"
}

Multicast

GET /network/muticast
note

This endpoint is listed in the device API table. If the current firmware does not support it, the device may return a 404 or API Not Found response.

Error codes:

CodeDescription
10001FTP password too weak
10004FTP port out of range
10005FTP port already in use

Technical Support and Product Discussion

Thank you for choosing our products! We are here to provide you with various support to ensure your experience with our products is as smooth as possible. We offer multiple communication channels to meet different preferences and needs.

Loading Comments...