API
Discover nearby Wi-Fi access points
Available in 7.1.1 or later
Input Parameters
Type | Notation | Mandatory | Description | |
connId | Number | <conn_id> | required | Wi-Fi with the WAN connection ID to be used. |
infoType | String | { status, config } | optional | Additional information can be requested along with discovered Wi-Fi access point. config – indicates if the connect profile is present status – indicates if the SSID is connected, or with connect profile |
sortBy | String | { name, security, signal, channel } | optional | Sort by name, security method, signal or channel. When omitted, it will sort by name and the defined SSID will be on the head of the array |
sortOrder | String | { asc, desc } | optional | Sort with descending or ascending order |
Return Parameters
Return JSON
Type | Notation | Description | |
– | Array | list of <Wifi_Obj> | List of discovered Wi-Fi Access Points |
<Wifi_Obj>
Type | Notation | Description | |
ssid | String | <string> | Service Set Identifier (SSID) |
bssid | String | <mac> | Basic Service Set Identifier (BSSID) |
signal | Number | <Number> | Signal in dBm Deprecated in firmware 8.1.0 |
signalStrength | Number | <Number> | Signal in dBm Introduced in firmware 8.1.0 |
signalLevel | Number | [0,5] | Signal level Introduced in firmware 8.1.0 |
channel | Number | <Number> | Channel |
securityPolicy | String | { open, wep, wpa-eap, wpa-psk, 8021x } | Security Policy |
status | Object | <Status_Obj> | Status Information |
config | Object | <Status_Obj> | Config Information |
<Status_Obj>
Type | Notation | Description | |
inUse | Boolean | <boolean> | SSID profile is targeted as connection. |
connected | Boolean | <boolean> | Wi-Fi is currently connected to this SSID. |
<Config_Obj>
Type | Notation | Description | |
profileId | Number | <integer> | ID of the connect profile for this SSID. |
automatic | Boolean | <boolean> | Indicates if Wi-Fi is configured to connect this SSID automatically. |
cURL Example
curl -b cookies.txt http://192.168.1.1/api/cmd.wifi.scan?connId=1&infoType=status
{ "stat": "ok", "response": { { "ssid": "Main SSID", "bssid": "A2:E5:B8:55:89:DF", "signal": -68, "channel": 10, "securityPolicy": "wpa-psk", "status": { "inUse": true, "connected": true } } ] }