API
Connect the Wi-Fi with provide SSID if profile is defined.
If the SSID profile is not defined, connection will require additional information. WEP or WPA-PSK connection require ‘key’
WPA-EAP and 802.1x connection require the Extensible Authentication Protocol(EAP) related information.
When credential cannot be obtained from existing SSID profile, nor supplied parameters, connection cannot be done.
Available in 7.1.1 or later
Input Parameters
Type | Notation | Mandatory | Description | |
connId | Number | <int> | required | Wi-Fi with the WAN connection ID to be used. |
ssid | String | <string> | required | SSID to be connected |
securityPolicy | String | { open, wep, wpa-eap, wpa- psk, 8021x } | required | Security Policy to connect the SSID |
key | String | <string> | optional | Key for WEP and WAP-PSK security policy |
loginId | String | <string> | optional | Login ID for Extensible Authentication Protocol (EAP) |
password | String | <string> | optional | Password for Extensible Authentication Protocol (EAP) |
eapMethod | String | { TTLS, PEAP} | optional | Extensible Authentication Protocol (EAP) Method |
eapPhase2 | String | { CHAP, MSCHAP, MSCHAPV2, PAP} | optional | Extensible Authentication Protocol (EAP) Phase 2 Method |
eapAuthenticationId | String | { anonymous, credentials } <string> | optional | Extensible Authentication Protocol (EAP) outer authentication identity |
eapAuthenticationId | String | { anonymous, credentials } <string> | optional | Extensible Authentication Protocol (EAP) outer authentication identity |
preferredBssid | String | <mac> | optional | Preferred BSSID of the Wi-Fi connection |
cURL Example
curl -b cookies.txt -H "Content-Type: application/json" -X POST -d '{"connId":1,"ssid":"Main SSID"}' http://192.168.1.1/api/cmd.wifi.connect
{ "stat": "ok" }