API
Obtain the WAN status
In fw 8.0.0, band, and signal are updated, the API support multiple bands
Avaliable in 8.0.0 or later
Input Parameters
Type | Notation | Mandatory | Description | |
id | Array | <numlist> | optional | list the WAN information base on id, multiple value is accepted, if id is absent, all WAN will be return |
lite | String | { yes, no } | optional | Limited data within the connection will be get when the field set to ‘yes’ Otherwise, all status information will be got. NOTE: This parameter will not have effect on MAX device. |
Return Parameters
Return JSON
Type | Notation | Description | |
order | Array | list of <conn_Obj> | The order of connection by ID |
<conn_id> | Object | <WAN_Status_Obj> | WAN Status information |
<WAN_Status_Obj>
Type | Notation | Description | |
name | String | <string> | Name of the WAN connection |
statusLed | String | { empty, gray, red, yellow, green, flash } | LED color for UI |
asLan | Boolean | <boolean> | WAN port is performing WAN as LAN or not |
enable | Boolean | <boolean> | WAN is enabled or not |
locked | Boolean | <boolean> | WAN is locked or not. |
scheduledOff | Boolean | <boolean> | Only appear if Connection is scheduled and currently off |
message | String | <string> | WAN status message |
uptime | Number | <number> | Uptime in seconds |
type | String | { modem, wireless, gobi, cellular, ipsec, adsl, ethernet } | WAN connection type For cellular WAN In fw8.0.1 or later, it will return “cellular”. Before fw8.0.1, it will return “gobi” |
virtualType | String | { modem, wireless, gobi, cellular, ipsec, adsl, ethernet } | WAN connection type For cellular WAN In fw8.0.1 or later, it will return “cellular”. Before fw8.0.1, it will return “gobi” |
priority | Number | <number> | Priority of the WAN. The field will not appear if the WAN is disabled |
groupset | Number | <number> | Group set of the WAN connection |
ip | String | <ipv4> | IP address |
mask | Number | <maskn> | Subnet mask. The field will not appear if ip is not exist or lite=yes |
gateway | String | <ipv4> | Gateway. The field will not appear if ip is not exist or lite=yes |
method | String | { dhcp static } | Connection method, DHCP or Static IP. The field will not appear if lite=yes |
mode | String | { NAT, IP Forwarding } | Connection mode. The field will not appear if lite=yes |
dns | Array | list of <ipv4> | DNS Server list. The field will not appear if lite=yes |
aditionalIp | Array | list of <ipv4> | Additional IP address list. The field will not appear if lite=yes |
mtu | Number | [576, 9000] | MTU value. The field will not appear if auto or lite=yes |
mss | Number | [536, 8960] | MSS value. This field will not appear if auto or lite=yes |
mac | String | <mac> | MAC address. This field will not appear if lite=yes |
wireless | Object | <Wifi_Obj> | WAN connection detail for wireless. The field will only appear if type is wifi |
modem | Object | <Modem_Obj> | WAN connection detail for modem. The field will only appear if type is modem |
cellular | Object | <Gobi_Obj> | WAN connection detail for gobi. The field will only appear if type is cellular |
gobi | Object | <Gobi_Obj> | WAN connection detail for gobi. The field will only appear if type is gob NOTE: This object is deprecated in firmware 8.0.1. |
<Wifi_Obj>
Type | Notation | Description | |
signal | Object | <Signal_Obj> | Signal information |
ssid | String | <string> | SSID of the Wifi. The field will not appear if lite=yes |
bssid | String | <string> | BSSID. The field will not appear if lite=yes |
Modem_Obj>
Type | Notation | Description | |
name | String | <string> | Modem adaptor name |
vendorId | Number | <integer> | Modem adaptor vendor ID |
productId | Number | <integer> | Modem adaptor product ID |
manufacturer | String | <string> | Modem adaptor manufacturer |
carrier | Object | <Carrier_Obj> | Carrier Information |
signalLevel | Number | [ 0, 5] | Signal level |
network | Striing | <string> | Network name |
imsi | String | <string> | International Mobile Subscriber Identity (IMSI). The field will not appea if lite=yes |
iccid | Array | <string> | Integrate circuit card identity (ICCID). The field will not appear if lite=yes |
esn | Array | <string> | Electronic Serial Number (ESN). The field will not appear if lite=yes |
mtn | Array | <string> | Mobile Telecommunications Network (MTN). The field will not appear if lite=yes |
apn | String | <string> | APN. The field will not appear if lite=yes |
username | String | <string> | Username for APN. The field will not appear if lite=yes |
password | String | <string> | Password for APN. The field will not appear if lite=yes |
dialNumber | String | <string> | Dial number for APN. The field will not appear if lite=yes |
band | Array | list of <Band_Obj> | Cellular band information. Including Band Name and signal info |
<Gobi_Obj>
Type | Notation | Description | |
roamingStatus | Object | <Roaming_Obj> | Roaming status information |
network | String | <string> | Network name This information will be deprecated in fw8.0.1 |
mobileType | String | <string> | Network name As “network” is deprecated in fw8.0.1, please change the key to use “mobileType” to get the information in fw8.0.1 or later |
sim | Object | <SIM_Group_Obj> | SIM information |
remoteSim | Object | <Remote_SIM_Obj> | Remote SIM information, this field will only appear when remote SIM is enable |
carrier | Object | <Carrier_Obj> | Carrier information |
signal Level | Number | [0,5] | Signal Level |
meid | Object | <MEID_Obj> | Hex and Dec value of Mobile Equipment Identifier (MEID). The field wil not appear if lite=yes |
imei | String | <string> | International Mobile Equipment Identity (IMEI). The field will not appear if lite=yes |
esn | String | <string> | Electronic Serial Number (ESN). The field will not appear if lite=yes |
mode | String | <string> | Gobi network mode. The field will not appear if lite=yes |
band | Array | list of <Band_Obj> | Gobi band information. Including Band Name and signal info |
mcc | String | <string> | Three decimal digits as Mobile Country Code (MCC) |
mnc | String | <string> | Two or Three decimal digits as Mobile Network Code (MNC) |
cellTower | Object | <Cell_Tower_Obj> | Cell Tower information |
<Band_Obj>
Type | Notation | Description | |
name | String | <string> | Band Name |
signal | Object | <Signal_Obj> | Signal information |
<Signal_Obj>
Type | Notation | Description | |
rssi | Number | <number> | Received Signal Strength Indicator (RSSI), only appear in Gobi and Modem |
sinr | Number | <number> | Signal to Interference plus Noise Ratio (SINR), only appear in Gobi an Modem |
snr | Number | <number> | Signal-to-noise ratio (SNR), only appear in Gobi and has value |
ecio | Number | <number> | Energy to Interference Ratio (Ec/Io), only appear in Gobi and has value |
rsrp | Number | <number> | Reference Signal Received Power (RSRP), only appear in Gobi and Modem |
rsrg | Number | <number> | Reference Signal Received Quality (RSRQ), only appear in Gobi |
strength | Number | <number> | Wi-Fi signal strength, only appear in Wifi |
<SIM_Group_Obj>
Type | Notation | Description | |
order | Array | <numlist> | list of <sim_id> |
<sim_id> | Object | <SIM_Obj> | SIM Information for SIM ID |
<Remote_SIM_Obj>
Type | Notation | Description | |
imsi | String | <string> | – |
serialNumber | String | <string> | – |
slot | Number | <number> | Number of slot |
autoApp | Boolean | <boolean> | Indicate the APN, Username and Password fields are auto detect or custom values Only available in fw8.1.1 or later |
apn | String | <string> | APN. The field will not appear if lite=yes Only available in fw8.1.1 or later |
username | String | <string> | Username for APN. The field will not appear if lite=yes Only available in fw8.1.1 or later |
password | String | <string> | Password for APN. The field will not appear if lite=yes Only available in fw8.1.1 or later |
<Carrier_Obj>
Type | Notation | Description | |
name | String | <string> | Carrier name |
country | String | <string> | Carrier country. The field will not appear if lite = yes |
<MEID_Obj>
Type | Notation | Description | |
hex | String | <string> | MEID value in HEX |
dec | String | <string> | MEID value in DEC |
<SIM_Obj>
Type | Notation | Description | |
status | String | { In Use, SIM Card Detected, No SIM Card Detected } | SIM card status |
active | Boolean | <boolean> | SIM card active status |
apn | String | <string> | APN. The field will not appear if lite=yes |
username | String | <string> | Username for APN. The field will not appear if lite=yes |
password | String | <string> | Password for APN. The field will not appear if lite=yes |
imsi | String | <string> | International Mobile Subscriber Identity (IMSI). The field will not appea if lite=yes |
iccid | String | <string> | Integrate circuit card identity (ICCID). The field will not appear if lite=ye |
mtn | String | <string> | Mobile Telecommunications Network (MTN). The field will not appear if lite=yes |
<Roaming_Obj>
Type | Notation | Description | |
code | Number | {0, 1, 2} | Roaming Status Code |
message | String | { roaming, home, roaming partner } | Readable Roaming Status Code and message relation: 0 – roaming 1 – home 2 – roaming partner |
<Cell_Tower_Obj>
Type | Notation | Description | |
cellId | Number | <number> | Cell ID of the each base transceiver status |
cellPlmn | Number | <number> | Cell Public Land Mobile Network (Cell PLMN) of the tower |
cellUtltranId | Number | <number> | Cell UTRAN ID |
tac | Number | <number> | Tracking Area Code for LTE network |
lac | Number | <number> | Location Area Code for GSM/UMTS network |
cURL Example
curl -b cookies.txt http://192.168.1.1/api/status.wan.connection?id=1 2
{ "stat": "ok", "response": { "1": { "name": "CUST WAN 1", "enable": true, "asLan": false, "message": "Connected", "uptime": 27037017, "type": "ethernet", "virtualType": "ethernet", "priority": 0, "ip": "192.168.123.144", "statusLed": "green", "mask": 24, "gateway": "12.23.34.0", "method": "dhcp", "mode": "NAT", "dns": [ "12.22.32.12", "12.34.67.89" ], "mtu": 576 }, "2": { "name": "WAN2", "enable": true, "asLan": false, "message": "No Cable Detected", "uptime": 27066417, "type": "ethernet", "virtualType": "ethernet", "priority": 0, "statusLed": "red", "method": "static", "mode": "IP Forwarding", "mtu": 1440 }, "order": [ 1, 2 ] } }