RDK Documentation (Open Sourced RDK Components)
|
Wi-Fi Client HAL provides an interface (data structures and API) to interact with underlying Wi-Fi driver and enabling the client to be connected with an Access Point.
Data Structures | |
struct | _wifi_telemetry_ops_t |
Telemetry callback functions. More... | |
Typedefs | |
typedef INT(* | wifi_disconnectEndpoint_callback) (INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error) |
This call back should be registered by Wi-Fi manager to receive status updates from HAL in case of a connection/disconnection event. More... | |
typedef INT(* | wifi_connectEndpoint_callback) (INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error) |
This call back will be invoked when client automatically connect to Access Point. More... | |
typedef struct _wifi_telemetry_ops_t | wifi_telemetry_ops_t |
Telemetry callback functions. | |
Functions | |
INT | wifi_getCliWpsEnable (INT ssidIndex, BOOL *output_bool) |
This API checks WPS(Wi-Fi Protected Setup) functionality is enabled for this access point. More... | |
INT | wifi_setCliWpsEnable (INT ssidIndex, BOOL enableValue) |
This API enables or disables WPS functionality for this access point. More... | |
INT | wifi_getCliWpsDevicePIN (INT ssidIndex, ULONG *output_ulong) |
This API is used to read the device PIN required for making a WPS connection. More... | |
INT | wifi_setCliWpsDevicePIN (INT ssidIndex, ULONG pin) |
This API sets the WPS Device pin to the Wi-Fi hal. More... | |
INT | wifi_getCliWpsConfigMethodsSupported (INT ssidIndex, CHAR *methods) |
This API is used to get WPS configuration methods supported by the device. More... | |
INT | wifi_getCliWpsConfigMethodsEnabled (INT ssidIndex, CHAR *output_string) |
This function indicates WPS configuration methods enabled on the device. More... | |
INT | wifi_setCliWpsConfigMethodsEnabled (INT ssidIndex, CHAR *methodString) |
This API sets the active WPS method. More... | |
INT | wifi_getCliWpsConfigurationState (INT ssidIndex, CHAR *output_string) |
This API is used to get the WPS config status, whether "configured" or "not configured". More... | |
INT | wifi_setCliWpsEnrolleePin (INT ssidIndex, CHAR *EnrolleePin) |
This API sets the PIN to connect. User get the EnrolleePin (device pin from AP device) give to hostapd for pairing. More... | |
INT | wifi_setCliWpsButtonPush (INT ssidIndex) |
Start the Push button pairing. More... | |
INT | wifi_cancelCliWPS (INT ssidIndex) |
Stop the WPS process. More... | |
INT | wifi_connectEndpoint (INT ssidIndex, CHAR *AP_SSID, wifiSecurityMode_t AP_security_mode, CHAR *AP_security_WEPKey, CHAR *AP_security_PreSharedKey, CHAR *AP_security_KeyPassphrase, int saveSSID, CHAR *eapIdentity, CHAR *carootcert, CHAR *clientcert, CHAR *privatekey) |
This API starts the connection process from client with an AP. More... | |
INT | wifi_disconnectEndpoint (INT ssidIndex, CHAR *AP_SSID) |
This API disconnects the access point specified. More... | |
INT | wifi_clearSSIDInfo (INT ssidIndex) |
void | wifi_disconnectEndpoint_callback_register (wifi_disconnectEndpoint_callback callback_proc) |
Callback registration function. More... | |
void | wifi_connectEndpoint_callback_register (wifi_connectEndpoint_callback callback_proc) |
Callback registration function. More... | |
void | wifi_telemetry_callback_register (wifi_telemetry_ops_t *telemetry_ops) |
INT | wifi_lastConnected_Endpoint (wifi_pairedSSIDInfo_t *pairedSSIDInfo) |
This call will give the last saved AP's ssid. More... | |
struct _wifi_telemetry_ops_t |
Telemetry callback functions.
Definition at line 378 of file wifi_client_hal.h.
Data Fields | |
void(* | init )(char *name) |
void(* | event_s )(char *marker, char *value) |
void(* | event_d )(char *marker, int value) |
typedef INT(* wifi_disconnectEndpoint_callback) (INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error) |
This call back should be registered by Wi-Fi manager to receive status updates from HAL in case of a connection/disconnection event.
[in] | ssidIndex | The index of SSID array. |
[in] | AP_SSID | The ssid to disconnect. |
[out] | error | Indicates the Wi-Fi connection sttaus. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 347 of file wifi_client_hal.h.
typedef INT(* wifi_connectEndpoint_callback) (INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error) |
This call back will be invoked when client automatically connect to Access Point.
[in] | ssidIndex | The index of SSID array. |
[in] | AP_SSID | The ssid to disconnect. |
[out] | error | Indicates the Wi-Fi connection status. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 366 of file wifi_client_hal.h.
INT wifi_getCliWpsEnable | ( | INT | ssidIndex, |
BOOL * | output_bool | ||
) |
This API checks WPS(Wi-Fi Protected Setup) functionality is enabled for this access point.
[in] | ssidIndex | The index of the SSID array. |
[out] | output_bool | Boolean value which indicates the wps enabled status. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 867 of file wifi_client_hal.c.
INT wifi_setCliWpsEnable | ( | INT | ssidIndex, |
BOOL | enableValue | ||
) |
This API enables or disables WPS functionality for this access point.
[in] | ssidIndex | The index of the SSID array. |
[in] | enableValue | Boolean value to enable or disable WPS. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 872 of file wifi_client_hal.c.
INT wifi_getCliWpsDevicePIN | ( | INT | ssidIndex, |
ULONG * | output_ulong | ||
) |
This API is used to read the device PIN required for making a WPS connection.
[in] | ssidIndex | The index of the SSID array. |
[out] | output_ulong | Output parameter which saves the Device PIN. This value is to be printed on the device. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 877 of file wifi_client_hal.c.
INT wifi_setCliWpsDevicePIN | ( | INT | ssidIndex, |
ULONG | pin | ||
) |
This API sets the WPS Device pin to the Wi-Fi hal.
[in] | ssidIndex | The index of the SSID array. |
[in] | pin | The PIN code to set. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 882 of file wifi_client_hal.c.
INT wifi_getCliWpsConfigMethodsSupported | ( | INT | ssidIndex, |
CHAR * | methods | ||
) |
This API is used to get WPS configuration methods supported by the device.
This function provides the comma-separated list of strings, each list item is an enumeration of:
Device must support PushButton and PIN methods.
[in] | ssidIndex | The index of SSID array. |
[out] | methods | The WPS supported methods. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 896 of file wifi_client_hal.c.
INT wifi_getCliWpsConfigMethodsEnabled | ( | INT | ssidIndex, |
CHAR * | output_string | ||
) |
This function indicates WPS configuration methods enabled on the device.
The API provides the comma-separated list of strings. Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter.
[in] | ssidIndex | The index of SSID array. |
[out] | output_string | The current WPS method. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 909 of file wifi_client_hal.c.
INT wifi_setCliWpsConfigMethodsEnabled | ( | INT | ssidIndex, |
CHAR * | methodString | ||
) |
This API sets the active WPS method.
[in] | ssidIndex | The index of SSID array. |
[in] | methodString | The method to enable. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 920 of file wifi_client_hal.c.
INT wifi_getCliWpsConfigurationState | ( | INT | ssidIndex, |
CHAR * | output_string | ||
) |
This API is used to get the WPS config status, whether "configured" or "not configured".
[in] | ssidIndex | The index of SSID array |
[in] | output_string | The output paramter which holds the wps config status. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 931 of file wifi_client_hal.c.
INT wifi_setCliWpsEnrolleePin | ( | INT | ssidIndex, |
CHAR * | EnrolleePin | ||
) |
This API sets the PIN to connect. User get the EnrolleePin (device pin from AP device) give to hostapd for pairing.
[in] | ssidIndex | The index of SSID array. |
[in] | EnrolleePin | PIN code to connect to the access point. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 937 of file wifi_client_hal.c.
INT wifi_setCliWpsButtonPush | ( | INT | ssidIndex | ) |
Start the Push button pairing.
[in] | ssidIndex | The index of SSID array. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 1295 of file wifi_client_hal.c.
INT wifi_cancelCliWPS | ( | INT | ssidIndex | ) |
Stop the WPS process.
[in] | ssidIndex | The index of SSID array. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
INT wifi_connectEndpoint | ( | INT | ssidIndex, |
CHAR * | AP_SSID, | ||
wifiSecurityMode_t | AP_security_mode, | ||
CHAR * | AP_security_WEPKey, | ||
CHAR * | AP_security_PreSharedKey, | ||
CHAR * | AP_security_KeyPassphrase, | ||
int | saveSSID, | ||
CHAR * | eapIdentity, | ||
CHAR * | carootcert, | ||
CHAR * | clientcert, | ||
CHAR * | privatekey | ||
) |
This API starts the connection process from client with an AP.
It uses the input parameters to connect using a supported security method and encryption standard. The security methods can make use of passphrase, public/private key pairs etc.
[in] | ssidIndex | The index of SSID array. |
[in] | AP_SSID | The ssid to connect. |
[in] | AP_security_mode | The security mode to use. |
[in] | AP_security_WEPKey | The wep key. |
[in] | AP_security_PreSharedKey | The pre shared key. |
[in] | AP_security_KeyPassphrase | The key passphrase. |
[in] | saveSSID | Option to save profile in wpa supplicant. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 1348 of file wifi_client_hal.c.
INT wifi_disconnectEndpoint | ( | INT | ssidIndex, |
CHAR * | AP_SSID | ||
) |
This API disconnects the access point specified.
[in] | ssidIndex | The index of SSID array. |
[in] | AP_SSID | The ssid to disconnect. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 1666 of file wifi_client_hal.c.
void wifi_disconnectEndpoint_callback_register | ( | wifi_disconnectEndpoint_callback | callback_proc | ) |
Callback registration function.
[in] | callback_proc | the callback function to disconnect the client. |
Definition at line 244 of file wifi_client_hal.c.
void wifi_connectEndpoint_callback_register | ( | wifi_connectEndpoint_callback | callback_proc | ) |
Callback registration function.
[in] | callback_proc | The callback function to connect the client to the access point. |
Definition at line 238 of file wifi_client_hal.c.
void wifi_telemetry_callback_register | ( | wifi_telemetry_ops_t * | telemetry_ops | ) |
[in] | telemetry_ops | Telemetry callback functions |
Definition at line 250 of file wifi_client_hal.c.
INT wifi_lastConnected_Endpoint | ( | wifi_pairedSSIDInfo_t * | pairedSSIDInfo | ) |
This call will give the last saved AP's ssid.
[out] | pairedSSIDInfo | Structure which holds the last connected access point information. |
RETURN_OK | returns O if successful, appropriate error code otherwise. |
Definition at line 1555 of file wifi_client_hal.c.