Wifi Manager Service

Created on June 21, 2022

Summary

The WIFI Manager API provides support to client applications that wish to enable WIFI communications on a STB.


Version:  4

Adds one new event:  onWifiSignalThresholdChanged


API Name

org.rdk.wifiManager_4


Methods

nameargumentsreturn valuedescription
getCurrentStatenoneenumgets the current WIFI state (see onWIFIStateChanged for state definitions)
getAvailableSSIDsnonearray

gets the currently available networks.  Each element of the array is an object containing the following properties:

ssid (string)

security (int) – supported values are NONE – 0, WPA – 1, WEP – 2

signalStrength(int) – the RSSI signal strength value for this endpoint.  A zero value indicates the device is not in range.

frequency (double) – the supported frequency for this ssid, measured in GHz

getConnectedSSIDnoneobject

Returns the properties of the currently connected SSID which include:

ssid (string) – the name of the SSID

bssid (string) – the Basic Service Set ID (mac address)

rate (float) – the Physical data rate in Mbps

noise (float) – the average noise strength in dBm

signalStrength (float) – the RSSI value in dBm

setEnabledenable: booleannonewhen true, enables the wifi adapter for this device.  When false, disables the wifi adapter.
connect

ssid :: string

passphrase :: string

securityMode :: int

boolean

attempts to connect to the specified ssid with the given passphrase.  Passphrase can be null when the network security is NONE.  See “Security Modes” section below.

Returns true if the connection was successful.

connectnonebooleanInternally calls connect(ssid, passphrase, securityMode) with the stored stored/paired SSID and passphrase.
initiateWPSPairingtimeout :: intnone

Initiates the connection via WPS.  This should fire CONNECTING and CONNECTED state change events if successful or CONNECTION_FAILED error events if unsuccessful.  If WPS pairing has not been completed by the specified timeout, it should result in a CONNECTION_FAILED state change.

timeout – the period of time to wait for the WPS pairing to complete in seconds
saveSSID

ssid :: string

passphrase :: string

securityMode :: int

boolean

Saves the ssid, passphrase and security mode for future sessions.

If an SSID was previously saved, the new SSID and passphrase will overwrite the existing one.

Returns false if the save failed, and true if the save was successful.

clearSSIDnoneboolean

Clears the saved SSID and BSSID.

Returns false if the SSIDs could not be cleared, or true if the clear operation was successful.

getPairedSSIDnonestringreturns the SSID if one was previously saved through saveSSID, otherwise returns NULL.
getPairedSSIDInfononeobject

This is intended to replace getPairedSSID.  Returns an object with the following k/v pairs:

“SSID” – The SSID that the device is paired to.

“BSSID” – The radio BSSID that the device is paired to.

isPairednonebooleanreturns true if this device has been previously paired ( calling saveSSID marks this device as paired )


Security Modes

valuedescription
0NONE – No security
1WEP_64
2WEP_128
3WPA_PSK_TKIP
4WPA_PSK_AES
5WPA2_PSK_TKIP
6WPA2_PSK_AES
7WPA_ENTERPRISE_TKIP
8WPA_ENTERPRISE_AES
9WPA2_ENTERPRISE_TKIP
10WPA2_ENTERPRISE_AES


15NOT_SUPPORTED

Events

namepayloaddescription
onWIFIStateChangedstate (int), isLNF (int)

indicates that the state has changed

state indicates the current wifi state:

0 – UNINSTALLED – the device was in an installed state and was uninstalled; OR the device does not have a wifi radio installed

1 – DISABLED – the device is installed (or was just installed) and has not yet been enabled

2 – DISCONNECTED – the device is installed and enabled, but not yet connected to a network

3 – PAIRING – the device is in the process of pairing, but not yet connected to a network

4 – CONNECTING – the device is attempting to connect to a network

5 – CONNECTED – the device is successfully connected to a network

6 – FAILED – the device has encountered an unrecoverable error with the wifi adapter

isLNF : Not in use.

onErrorcode (int)a recoverable, unexcpected error occurred, as defined by one of the following values:

0 – SSID_CHANGEDthe SSID of the network changed

1 – CONNECTION_LOSTthe connection to the network was lost

2 – CONNECTION_FAILEDthe connection failed for an unknown reason

3 – CONNECTION_INTERRUPTEDthe connection was interrupted

4 – INVALID_CREDENTIALSthe connection failed due to invalid credentials

5 – NO_SSIDthe SSID does not exist

6 – UNKNOWNany other error

7 – WIFI_AUTH_FAILEDThe connection failed due to auth failure
onSSIDsChangednonefired when a new SSID becomes available or an existing SSID is no longer available
onPairingStateChangedstate

fired when the pairing state changes and can be one of the values below:

UNPAIRED – If the device is in a paired state, and the SSID is cleared, the device becomes unpaired

PAIRING_STARTED – The pairing has started. This can happen when the user presses the pairing button on the wireless device, when initiateWPSPairing is invoked, or when connect(ssid, passphrase) is invoked. onWifiStateChanged(PAIRING) will occur between PAIRING_STARTED and PAIRED.

PAIRED – Pairing has completed.  The device is paired.


typeString – the type of pairing (WPS, WPA, WEP, WPA2, NONE).  NONE is the only value that can be received when state is UNPAIRED(0)
onWPSPairingButtonPressednoneindicates that the WPS pairing button was pressed
onWifiSignalThresholdChanged

signalStrength (float)

strength (string)

signalStrength – float value in dBm

strength – string value of “Excellent”, “Good”, “Fair” or “Weak”


Version:  3

Adds methods getPairedSSIDInfo, getSwitchToPrivateResults, setAutoSwitchToPrivateEnabled, isAutoSwitchToPrivateEnabled, setStopLNFWhileDisconnected, isStopLNFWhileDisconnected.  Adds isLNF attribute to onWIFIStateChanged event.


API Name

org.rdk.wifiManager_3


Methods

nameargumentsreturn valuedescription
getCurrentStatenoneenumgets the current WIFI state (see onWIFIStateChanged for state definitions)
getAvailableSSIDsnonearray

gets the currently available networks.  Each element of the array is an object containing the following properties:

ssid (string)

security (int) – supported values are NONE – 0, WPA – 1, WEP – 2

signalStrength(int) – the RSSI signal strength value for this endpoint.  A zero value indicates the device is not in range.

frequency (double) – the supported frequency for this ssid, measured in GHz

getConnectedSSIDnoneobject

Returns the properties of the currently connected SSID which include:

ssid (string) – the name of the SSID

bssid (string) – the Basic Service Set ID (mac address)

rate (float) – the Physical data rate in Mbps

noise (float) – the average noise strength in dBm

signalStrength (float) – the RSSI value in dBm

setEnabledenable: booleannonewhen true, enables the wifi adapter for this device.  When false, disables the wifi adapter.
connect

ssid :: string

passphrase :: string

securityMode :: int

boolean

attempts to connect to the specified ssid with the given passphrase.  Passphrase can be null when the network security is NONE.  See “Security Modes” section below.

Returns true if the connection was successful.

connectnonebooleanInternally calls connect(ssid, passphrase, securityMode) with the stored stored/paired SSID and passphrase.
initiateWPSPairingtimeout :: intnone

Initiates the connection via WPS.  This should fire CONNECTING and CONNECTED state change events if successful or CONNECTION_FAILED error events if unsuccessful.  If WPS pairing has not been completed by the specified timeout, it should result in a CONNECTION_FAILED state change.

timeout – the period of time to wait for the WPS pairing to complete in seconds

saveSSID

ssid :: string

passphrase :: string

securityMode :: int

boolean

Saves the ssid, passphrase and security mode for future sessions.

If an SSID was previously saved, the new SSID and passphrase will overwrite the existing one.

Returns false if the save failed, and true if the save was successful.

clearSSIDnoneboolean

Clears the saved SSID and BSSID.

Returns false if the SSIDs could not be cleared, or true if the clear operation was successful.

getPairedSSIDnonestringreturns the SSID if one was previously saved through saveSSID, otherwise returns NULL.
getPairedSSIDInfononeobject

This is intended to replace getPairedSSID.  Returns an object with the following k/v pairs:

“SSID” – The SSID that the device is paired to.

“BSSID” – The radio BSSID that the device is paired to.

isPairednonebooleanreturns true if this device has been previously paired ( calling saveSSID marks this device as paired )


Security Modes

valuedescription
0NONE – No security
1WEP_64
2WEP_128
3WPA_PSK_TKIP
4WPA_PSK_AES
5WPA2_PSK_TKIP
6WPA2_PSK_AES
7WPA_ENTERPRISE_TKIP
8WPA_ENTERPRISE_AES
9WPA2_ENTERPRISE_TKIP
10WPA2_ENTERPRISE_AES


15NOT_SUPPORTED

Events

namepayloaddescription
onWifiStateChangedstate (int), isLNF (int)

indicates that the state has changed

state indicates the current wifi state:

0 – UNINSTALLED – the device was in an installed state and was uninstalled; OR the device does not have a wifi radio installed

1 – DISABLED – the device is installed (or was just installed) and has not yet been enabled

2 – DISCONNECTED – the device is installed and enabled, but not yet connected to a network

3 – PAIRING – the device is in the process of pairing, but not yet connected to a network

4 – CONNECTING – the device is attempting to connect to a network

5 – CONNECTED – the device is successfully connected to a network

6 – FAILED – the device has encountered an unrecoverable error with the wifi adapter

isLNF : Not in Use

onErrorcode (int)a recoverable, unexcpected error occurred, as defined by one of the following values:

0 – SSID_CHANGEDthe SSID of the network changed

1 – CONNECTION_LOSTthe connection to the network was lost

2 – CONNECTION_FAILEDthe connection failed for an unknown reason

3 – CONNECTION_INTERRUPTEDthe connection was interrupted

4 – INVALID_CREDENTIALSthe connection failed due to invalid credentials

5 – NO_SSIDthe SSID does not exist

6 – UNKNOWNany other error

7 – WIFI_AUTH_FAILEDThe connection failed due to auth failure
onSSIDsChangednonefired when a new SSID becomes available or an existing SSID is no longer available
onPairingStateChangedstate

fired when the pairing state changes and can be one of the values below:

UNPAIRED – If the device is in a paired state, and the SSID is cleared, the device becomes unpaired

PAIRING_STARTED – The pairing has started. This can happen when the user presses the pairing button on the wireless device, when initiateWPSPairing is invoked, or when connect(ssid, passphrase) is invoked. onWifiStateChanged(PAIRING) will occur between PAIRING_STARTED and PAIRED.

PAIRED – Pairing has completed.  The device is paired.


typeString – the type of pairing (WPS, WPA, WEP, WPA2, NONE).  NONE is the only value that can be received when state is UNPAIRED(0)
onWPSPairingButtonPressednoneindicates that the WPS pairing button was pressed


Version:  2

This version adds the switchToPrivate call, which invokes the Lost and Found process to switch to the private SSID.


API Name

org.rdk.wifiManager_2


Methods

nameargumentsreturn valuedescription
getCurrentStatenoneenumgets the current WIFI state (see onWIFIStateChanged for state definitions)
getAvailableSSIDsnonearray

gets the currently available networks.  Each element of the array is an object containing the following properties:

ssid (string) – the name of the SSID

bssid (string) – the Basic Service Set ID (mac address)

security (int) – supported values are defined in the Security Modes table below

signalStrength(float) – the RSSI value in dBm

frequency (float) – the supported frequency for this ssid, measured in GHz

getConnectedSSIDnoneobject

Returns the properties of the currently connected SSID which include:

ssid (string) – the name of the SSID

bssid (string) – the Basic Service Set ID (mac address)

rate (float) – the Physical data rate in Mbps

noise (float) – the average noise strength in dBm

signalStrength (float) – the RSSI value in dBm

setEnabledenable: booleannonewhen true, enables the wifi adapter for this device.  When false, disables the wifi adapter.
connect

ssid :: string

passphrase :: string

securityMode :: int

boolean

attempts to connect to the specified ssid with the given passphrase.  Passphrase can be null when the network security is NONE.  See “Security Modes” section below.

Returns true if the connection was successful.

connectnonebooleanInternally calls connect(ssid, passphrase, securityMode) with the stored stored/paired SSID and passphrase.
initiateWPSPairingnonenoneInitiates the connection via WPS.  This should fire CONNECTING and CONNECTED state change events if successful or CONNECTION_FAILED error events if unsuccessful.
saveSSID

ssid :: string

passphrase :: string

securityMode :: int

boolean

Saves the ssid, passphrase and security mode for future sessions.

If an SSID was previously saved, the new SSID and passphrase will overwrite the existing one.

Returns false if the save failed, and true if the save was successful.

clearSSIDnoneboolean

Clears the saved SSID.

Returns false if the could not be cleared, and true if the clear operation was successful.

getPairedSSIDnonestringreturns the SSID if one was previously saved through saveSSID, otherwise returns NULL
isPairednonebooleanreturns true if this device has been previously paired ( calling saveSSID marks this device as paired )


Security Modes

valuedescription
0NONE – No security
1WEP_64
2WEP_128
3WPA_PSK_TKIP
4WPA_PSK_AES
5WPA2_PSK_TKIP
6WPA2_PSK_AES
7WPA_ENTERPRISE_TKIP
8WPA_ENTERPRISE_AES
9WPA2_ENTERPRISE_TKIP
10WPA2_ENTERPRISE_AES


15NOT_SUPPORTED


Events

namepayloaddescription
onWIFIStateChangedstate (int)indicates that the state has changed, state can be one of the following values:

0 – UNINSTALLEDthe device was in an installed state and was uninstalled; OR the device does not have a wifi radio installed

1 – DISABLEDthe device is installed (or was just installed) and has not yet been enabled

2 – DISCONNECTEDthe device is installed and enabled, but not yet connected to a network

3 – PAIRINGthe device is in the process of pairing, but not yet connected to a network

4 – CONNECTINGthe device is attempting to connect to a network

5 – CONNECTEDthe device is successfully connected to a network

6 – FAILEDthe device has encountered an unrecoverable error with the wifi adapter
onErrorcode (int)a recoverable, unexcpected error occurred, as defined by one of the following values:

0 – SSID_CHANGEDthe SSID of the network changed

1 – CONNECTION_LOSTthe connection to the network was lost

2 – CONNECTION_FAILEDthe connection failed for an unknown reason

3 – CONNECTION_INTERRUPTEDthe connection was interrupted

4 – INVALID_CREDENTIALSthe connection failed due to invalid credentials

5 – NO_SSIDthe SSID does not exist

6 – UNKNOWNany other error

7 – WIFI_AUTH_FAILEDThe connection failed due to auth failure
onSSIDsChangednonefired when a new SSID becomes available or an existing SSID is no longer available
onPairingStateChangedstatefired when the pairing state changes and can be one of the values below:

0 – UNPAIREDIf the device is in a paired state, and the SSID is cleared, the device becomes unpaired

1 – PAIRING_STARTEDThe pairing has started. This can happen when the user presses the pairing button on the wireless device, when initiateWPSPairing is invoked, or when connect(ssid, passphrase) is invoked. onWifiStateChanged(PAIRING) will occur between PAIRING_STARTED and PAIRED.

2 – PAIREDPairing has completed.  The device is paired.

typeString – the type of pairing (WPS, WPA, WEP, WPA2, NONE).  NONE is the only value that can be received when state is UNPAIRED(0)



Version:  1


API Name

org.rdk.wifiManager_1


Methods

nameargumentsreturn valuedescription
getCurrentStatenoneenumgets the current WIFI state (see onWIFIStateChanged for state definitions)
getAvailableSSIDsnonearray

gets the currently available networks.  Each element of the array is an object containing the following properties:

ssid (string)

security (int) – supported values are defined in the Security Modes table below

signalStrength(float) – the RSSI value in dBm

frequency (float) – the supported frequency for this ssid, measured in GHz

setEnabledenable: booleannonewhen true, enables the wifi adapter for this device.  When false, disables the wifi adapter.
connect

ssid :: string

passphrase :: string

securityMode :: int

boolean

attempts to connect to the specified ssid with the given passphrase.  Passphrase can be null when the network security is NONE.  See “Security Modes” section below.

Returns true if the connection was successful.

connectnonebooleanInternally calls connect(ssid, passphrase, securityMode) with the stored stored/paired SSID and passphrase.
initiateWPSPairingnonenoneInitiates the connection via WPS.  This should fire CONNECTING and CONNECTED state change events if successful or CONNECTION_FAILED error events if unsuccessful.
saveSSID

ssid :: string

passphrase :: string

securityMode :: int

boolean

Saves the ssid, passphrase and security mode for future sessions.

If an SSID was previously saved, the new SSID and passphrase will overwrite the existing one.

Returns false if the save failed, and true if the save was successful.

clearSSIDnoneboolean

Clears the saved SSID.

Returns false if the could not be cleared, and true if the clear operation was successful.

getPairedSSIDnonestringreturns the SSID if one was previously saved through saveSSID, otherwise returns NULL
isPairednonebooleanreturns true if this device has been previously paired ( calling saveSSID marks this device as paired )


Security Modes

valuedescription
0NONE – No security
1WEP_64
2WEP_128
3WPA_PSK_TKIP
4WPA_PSK_AES
5WPA2_PSK_TKIP
6WPA2_PSK_AES
7WPA_ENTERPRISE_TKIP
8WPA_ENTERPRISE_AES
9WPA2_ENTERPRISE_TKIP
10WPA2_ENTERPRISE_AES


15NOT_SUPPORTED



Events

namepayloaddescription
onWIFIStateChangedstate (int)indicates that the state has changed, state can be one of the following values:

0 – UNINSTALLEDthe device was in an installed state and was uninstalled; OR the device does not have a wifi radio installed

1 – DISABLEDthe device is installed (or was just installed) and has not yet been enabled

2 – DISCONNECTEDthe device is installed and enabled, but not yet connected to a network

3 – PAIRINGthe device is in the process of pairing, but not yet connected to a network

4 – CONNECTINGthe device is attempting to connect to a network

5 – CONNECTEDthe device is successfully connected to a network

6 – FAILEDthe device has encountered an unrecoverable error with the wifi adapter
onErrorcode (int)a recoverable, unexcpected error occurred, as defined by one of the following values:

0 – SSID_CHANGEDthe SSID of the network changed

1 – CONNECTION_LOSTthe connection to the network was lost

2 – CONNECTION_FAILEDthe connection failed for an unknown reason

3 – CONNECTION_INTERRUPTEDthe connection was interrupted

4 – INVALID_CREDENTIALSthe connection failed due to invalid credentials

5 – NO_SSIDthe SSID does not exist

6 – UNKNOWNany other error

7 – WIFI_AUTH_FAILEDThe connection failed due to auth failure
onSSIDsChangednonefired when a new SSID becomes available or an existing SSID is no longer available
onPairingStateChangedstatefired when the pairing state changes and can be one of the values below:

0 – UNPAIREDIf the device is in a paired state, and the SSID is cleared, the device becomes unpaired

1 – PAIRING_STARTEDThe pairing has started. This can happen when the user presses the pairing button on the wireless device, when initiateWPSPairing is invoked, or when connect(ssid, passphrase) is invoked. onWifiStateChanged(PAIRING) will occur between PAIRING_STARTED and PAIRED.

2 – PAIREDPairing has completed.  The device is paired.

typeString – the type of pairing (WPS, WPA, WEP, WPA2, NONE).  NONE is the only value that can be received when state is UNPAIRED(0)
Go To Top