RDK-V WiFi HAL 0.2.0
 
Loading...
Searching...
No Matches
wifi_client_hal.h
Go to the documentation of this file.
1/*
2 * If not stated otherwise in this file or this component's LICENSE file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2016 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18*/
19
20/********************************************************************
21
22 module: wifi_client_hal.h
23
24 ---------------------------------------------------------------
25 description:
26
27 This header file gives the function call prototypes and
28 structure definitions used for the RDK-Video
29 WiFi client hardware abstraction layer
30
31 ---------------------------------------------------------------
32
33 environment:
34
35 This HAL layer is intended to support WiFi drivers
36 through an open API
37
38*********************************************************************/
39#ifndef __WIFI_CLINET_HAL_H__
40#define __WIFI_CLINET_HAL_H__
41
42/**
43 * @addtogroup HPK Hardware Porting Kit
44 * @{
45 * @defgroup RDKV_WIFI RDK-V WiFi
46 * @{
47 * @defgroup RDKV_WIFI_HAL WiFi HAL
48 * @{
49 * @defgroup WIFI_CLIENT_HAL WiFi Client HAL
50 * @{
51 * WiFi Client HAL provides an interface (data structures and API) to interact with underlying WiFi driver and
52 * enabling the client to be connected with an access point.
53 */
54
55/**
56 * @file wifi_client_hal.h
57 */
58
59#include <wifi_common_hal.h>
60//----------------------------------------------------------------------------------------------------
61//Device.WiFi.EndPoint //EndPoint list is mananged by RDKB wifi agent
62//Device.WiFi.EndPoint.{i}.Enable
63//Device.WiFi.EndPoint.{i}.Status
64//Device.WiFi.EndPoint.{i}.Alias
65//Device.WiFi.EndPoint.{i}.ProfileReference
66//Device.WiFi.EndPoint.{i}.SSIDReference
67//Device.WiFi.EndPoint.{i}.ProfileNumberOfEntries
68//----------------------------------------------------------------------------------------------------
69//Device.WiFi.EndPoint.{i}.Stats.LastDataDownlinkRate
70//Device.WiFi.EndPoint.{i}.Stats.LastDataUplinkRate
71//Device.WiFi.EndPoint.{i}.Stats.SignalStrength
72//Device.WiFi.EndPoint.{i}.Stats.Retransmissions
73//----------------------------------------------------------------------------------------------------
74//Device.WiFi.EndPoint.{i}.Security
75//Device.WiFi.EndPoint.{i}.Security.ModesSupported
76//----------------------------------------------------------------------------------------------------
77//Device.WiFi.EndPoint.{i}.Profile
78//Device.WiFi.EndPoint.{i}.Profile.{i}.Enable
79//Device.WiFi.EndPoint.{i}.Profile.{i}.Status
80//Device.WiFi.EndPoint.{i}.Profile.{i}.Alias
81//Device.WiFi.EndPoint.{i}.Profile.{i}.SSID
82//Device.WiFi.EndPoint.{i}.Profile.{i}.Location
83//Device.WiFi.EndPoint.{i}.Profile.{i}.Priority
84//----------------------------------------------------------------------------------------------------
85//Device.WiFi.EndPoint.{i}.Profile.{i}.Security.ModeEnabled
86//Device.WiFi.EndPoint.{i}.Profile.{i}.Security.WEPKey
87//Device.WiFi.EndPoint.{i}.Profile.{i}.Security.PreSharedKey
88//Device.WiFi.EndPoint.{i}.Profile.{i}.Security.KeyPassphrase
89//----------------------------------------------------------------------------------------------------
90//Device.WiFi.EndPoint.{i}.WPS
91//Device.WiFi.EndPoint.{i}.WPS.Enable
92//Device.WiFi.EndPoint.{i}.WPS.ConfigMethodsSupported
93//Device.WiFi.EndPoint.{i}.WPS.ConfigMethodsEnabled
94
95//-----------------------------------------------------------------------------------------------------
96//AP connection APIs
97
98/*
99 * @struct _wifi_pairedSSIDInfo
100 * @brief Structure for SSID information
101 *
102 * This structure stores the paired SSID information
103 */
105{
106 CHAR ap_ssid[64]; /**< The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSID. SSID can be any string up to 32 characters in length, including 0 length */
107 CHAR ap_bssid[64]; /**< [MACAddress] The BSSID (Basic Service Set ID) used for the neighboring WiFi SSID {Valid values: empty string} */
108 CHAR ap_security[64]; /**< Security mode of AP. Possible values {"NONE", "WPA-NONE", "WPA-PSK", "WPA-EAP", "IEEE8021X", "FT-PSK", "FT-EAP", "FT-EAP-SHA384", "WPA-PSK-SHA256", "WPA-EAP-SHA256", "SAE", "FT-SAE", "WPA-EAP-SUITE-B", "WPA-EAP-SUITE-B-192", "OSEN", "FILS-SHA256", "FILS-SHA384", "FT-FILS-SHA256", "FT-FILS-SHA384", "OWE", "DPP"} */
109 CHAR ap_passphrase[128]; /**< Passphrase of AP, if applicable for the security mode. ASCII passphrase will be minimum 8 characters long and maximum 63 characters long. */
110 CHAR ap_wep_key[128]; /**< wep_key of AP incase of WEP security. An ASCII string enclosed in quotation marks to encode the WEP key. Without quotes this is a hex string of the actual key. */
112
113/**
114 * @struct _wifi_roamingCtrl_t
115 * @brief Structure for roaming control information
116 * @note The 802.11 kvr feature has to be supported and enabled by default. This data structure will be removed in next phase.
117 */
119{
120 BOOL roamingEnable; /**< Enables or disables the roaming control {0-disable, 1-enable} */
121 BOOL selfSteerOverride; /**< Starts self steer roaming if selfSteerOverride is enabled {0-disable, 1-enable} */
122 BOOL roam80211kvrEnable; /**< Sets roaming mode to AP steer if roam80211kvrEnable is enabled and selfSteerOverride is disabled {0-disable, 1-enable} */
123 INT preassnBestThreshold; /**< Pre-association best RSSI threshold. Default value -67. Range is [-100, 0] */
124 INT preassnBestDelta; /**< Pre-association best RSSI delta between 2.4GHz and 5GHz. Default value 3. Range is [0, 100] */
125 INT postAssnLevelDeltaConnected; /**< Post-association delta level if WiFi connected. Default value 12. Range is [0, 100] */
126 INT postAssnLevelDeltaDisconnected; /**< Post-association delta level if WiFi disconnected. Default value 8. Range is [0, 100] */
127 INT postAssnSelfSteerThreshold; /**< Post-association self steer threshold. Default value -75. Range is [-100, 0] */
128 INT postAssnSelfSteerTimeframe; /**< Post-association self steer timeframe. Default value 60. Range is [0, 36000] seconds */
129 INT postAssnBackOffTime; /**< Post-association backoff time for incrementing self steer time-frame during failure of roaming attempts. Default value 2 seconds. Range is [0, 3600] seconds */
130 //INT postAssnSelfSteerBeaconsMissedTime;
131 INT postAssnAPctrlThreshold; /**< Post-association AP steer control threshold. Default value -75. Range is [-100, 0] */
132 INT postAssnAPctrlTimeframe; /**< Post-association AP steer control time frame. Default value 60. Range is [0, 60] seconds */
133
135
136
137//1. WPS method
138
139/**
140 * @brief This API checks WPS(Wi-Fi Protected Setup) functionality is enabled for this access point.
141 *
142 * @param[in] ssidIndex The index of the SSID array.
143 * @param[out] output_bool Boolean value which indicates the wps enabled status.
144 *
145 * @return The status of the operation
146 * @retval RETURN_OK if successful
147 * @retval RETURN_ERR if any error is detected
148 *
149 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
150 */
151INT wifi_getCliWpsEnable(INT ssidIndex, BOOL *output_bool);
152
153/**
154 * @brief This API enables or disables WPS functionality for this access point.
155 *
156 * @param[in] ssidIndex The index of the SSID array.
157 * @param[in] enableValue Boolean value to enable or disable WPS.
158 *
159 * @return The status of the operation
160 * @retval RETURN_OK if successful
161 * @retval RETURN_ERR if any error is detected
162 *
163 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
164 */
165INT wifi_setCliWpsEnable(INT ssidIndex, BOOL enableValue);
166
167/**
168 * @brief This API is used to read the device PIN required for making a WPS connection.
169 *
170 * @param[in] ssidIndex The index of the SSID array.
171 * @param[out] output_ulong Output parameter which saves the Device PIN.
172 * This value is to be printed on the device.
173 *
174 * @return The status of the operation
175 * @retval RETURN_OK if successful
176 * @retval RETURN_ERR if any error is detected
177 *
178 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
179 */
180INT wifi_getCliWpsDevicePIN(INT ssidIndex, ULONG *output_ulong);
181
182/**
183 * @brief This API sets the WPS Device pin to the Wi-Fi hal.
184 *
185 * @param[in] ssidIndex The index of the SSID array.
186 * @param[in] pin The PIN code to set.
187 *
188 * @return The status of the operation
189 * @retval RETURN_OK if successful
190 * @retval RETURN_ERR if any error is detected
191 *
192 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
193 */
195
196/**
197 * @brief Gets WPS configuration methods supported by the device
198 *
199 * This function provides the comma-separated list of strings. For example:
200 * - "USBFlashDrive" - User uses a USB flash drive to transfer data between the new client device and
201 * the network's access point
202 * - "Ethernet" - If there is no WPS button, user can configure the wireless settings using ethernet on a wifi-extender
203 * - "ExternalNFCToken" - NFC Tag contains a password token to authenticate WiFi connection
204 * Uses external program to write * NDEF encapsulation data to the NFC tag using an external program
205 * - "IntegratedNFCToken" - The NFC Tag is integrated in the device
206 * - "NFCInterface" - User has to bring the client close to AP allowing a near field communication between the devices
207 * - "PushButton" - User has to push a button, either an actual or virtual one
208 * on both the access point and the new wireless * client device
209 * - "PIN" - User has to be read the PIN from either a sticker or display on the new wireless device
210 *
211 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
212 * @param[out] methods The WPS supported methods as a comma-separated string.Refer @ref Data-Model parameter for the complete set of supported methods {Ex: "PushButton,PIN"}
213 *
214 * @return The status of the operation
215 * @retval RETURN_OK if successful
216 * @retval RETURN_ERR if any error is detected
217 *
218 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
219 * @see @ref Data-Model Parameter: Device.WiFi.EndPoint.{i}.WPS.ConfigMethodsSupported
220 */
222
223/**
224 * @brief Gets WPS configuration methods enabled on the device
225 *
226 * This function provides the comma-separated list of strings.
227 * Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter.
228 *
229 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
230 * @param[out] output_string The current WPS methods as a comma-separated string.
231 * Refer @ref Data-Model parameter for the complete set of supported methods
232 * possible values {"USBFlashDrive", "Ethernet", "ExternalNFCToken", "IntegratedNFCToken", "NFCInterface", "PushButton", "PIN" }
233 *
234 * @return The status of the operation
235 * @retval RETURN_OK if successful
236 * @retval RETURN_ERR if any error is detected
237 *
238 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
239 * @see wifi_getCliWpsConfigMethodsSupported(), wifi_setCliWpsConfigMethodsEnabled()
240 * @see @ref Data-Model Parameter: Device.WiFi.EndPoint.{i}.WPS.ConfigMethodsEnabled
241 */
243
244/**
245 * @brief Sets the active WPS methods
246 *
247 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
248 * @param[in] methodString The methods to enable as a comma-separated string.
249 * Refer @ref Data-Model parameter for the complete set of supported methods
250 * possible values {"USBFlashDrive", "Ethernet", "ExternalNFCToken", "IntegratedNFCToken", "NFCInterface", "PushButton", "PIN" }
251 *
252 * @return The status of the operation
253 * @retval RETURN_OK if successful
254 * @retval RETURN_ERR if any error is detected
255 *
256 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
257 * @see wifi_getCliWpsConfigMethodsSupported(), wifi_getCliWpsConfigMethodsEnabled()
258 * @see @ref Data-Model Parameter: Device.WiFi.EndPoint.{i}.WPS.ConfigMethodsEnabled
259 */
261
262/**
263 * @brief This API is used to get the WPS config status, whether "configured" or "not configured"
264 *
265 * @param[in] ssidIndex The index of SSID array
266 * @param[out] output_string The output paramter which holds the wps config status.
267 *
268 * @return The status of the operation
269 * @retval RETURN_OK if successful
270 * @retval RETURN_ERR if any error is detected
271 *
272 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
273 */
274INT wifi_getCliWpsConfigurationState(INT ssidIndex, CHAR *output_string);
275
276/**
277 * @brief Sets the WPS PIN and uses it to pair with access point
278 *
279 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
280 * @param[in] EnrolleePin PIN code to connect to the access point. This PIN is either a four digit number or an eight digit number
281 *
282 * @return The status of the operation
283 * @retval RETURN_OK if successful
284 * @retval RETURN_ERR if any error is detected
285 *
286 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
287 * @pre wifi_connectEndpoint_callback_register() should be called before calling this API
288 * @see wifi_connectEndpoint_callback(), wifi_cancelWpsPairing()
289 * @see @ref Data-Model Parameter: Device.WiFi.EndPoint.{i}.WPS.PIN
290 */
291INT wifi_setCliWpsEnrolleePin(INT ssidIndex, CHAR *EnrolleePin);
292
293/**
294 * @brief Starts the WPS Push button pairing with access point
295 *
296 * @param[in] ssidIndex The index of SSID array variable is unused {Valid values: 1}
297 *
298 * @return The status of the operation
299 * @retval RETURN_OK if successful
300 * @retval RETURN_ERR if any error is detected
301 *
302 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
303 * @pre wifi_connectEndpoint_callback_register() should be called before calling this API
304 * @see wifi_connectEndpoint_callback(), wifi_cancelWpsPairing()
305 */
307
308/**
309 * @brief Stop the WPS process.
310 *
311 * @param[in] ssidIndex The index of SSID array.
312 *
313 * @return The status of the operation
314 * @retval RETURN_OK if successful
315 * @retval RETURN_ERR if any error is detected
316 *
317 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
318 */
320
321
322//2. Directly pairing method
323/**
324 * @brief Starts the process of connection between the client and an access point
325 *
326 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
327 * @param[in] AP_SSID The ssid to connect. SSID can be any string up to 32 characters in length, including 0 length
328 * @param[in] AP_security_mode The security mode to use
329 * @param[in] AP_security_WEPKey The wep key. An ASCII string enclosed in quotation marks to encode the WEP key. Without quotes this is a hex string of the actual key.
330 * @param[in] AP_security_PreSharedKey The pre shared key. ASCII pre shared key will be minimum 8 characters long and maximum 63 characters long
331 * @param[in] AP_security_KeyPassphrase The key passphrase. ASCII passphrase will be minimum 8 characters long and maximum 63 characters long
332 * @param[in] saveSSID Specifies whether or not to save the WiFi configuration on a successfull connect {0-false,1-true}
333 * @param[in] eapIdentity EAP identity name. Valid characters are {[a-z], [A-Z], [0-9], '-', '_', '.', ',', '@', '\\', '!', '#', '%', '=', ' '}
334 * @param[in] carootcert Absolute file path to CA root certificate
335 * @param[in] clientcert Absolute file path to client certificate
336 * @param[in] privatekey Absolute file path to private key
337 *
338 * @return The status of the operation
339 * @retval RETURN_OK if successful
340 * @retval RETURN_ERR if any error is detected
341 *
342 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
343 * @pre wifi_connectEndpoint_callback_register() should be called before calling this API
344 * @see wifiSecurityMode_t, wifi_disconnectEndpoint(), wifi_connectEndpoint_callback()
345 * @note On successfull connect, wifi_connectEndpoint_callback() will be called
346 */
347INT 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);
348
349/**
350 * @brief Starts the process of disconnection between the client and an access point
351 *
352 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
353 * @param[in] AP_SSID The ssid to disconnect
354 *
355 * @return The status of the operation
356 * @retval RETURN_OK if successful
357 * @retval RETURN_ERR if any error is detected
358 *
359 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
360 * @pre wifi_disconnectEndpoint_callback_register() should be called before calling this API
361 * @see wifi_connectEndpoint(), wifi_disconnectEndpoint_callback()
362 * @note On successfull disconnect, wifi_disconnectEndpoint_callback() will be called
363 */
364INT wifi_disconnectEndpoint(INT ssidIndex, CHAR *AP_SSID);
365
366/**
367 * @brief Clears the SSID information
368 *
369 * This function clears the SSID info which was saved as a result of using #wifi_connectEndpoint()
370 * and disconnects from existing WiFi connection.
371 *
372 * @param[in] ssidIndex The index of SSID array {Valid values: 1}
373 *
374 * @return The status of the operation
375 * @retval RETURN_OK if successful
376 * @retval RETURN_ERR if any error is detected
377 *
378 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
379 */
381
382/**
383 * @brief Receives status updates from HAL in case of a disconnection event
384 *
385 * This callback should be registered by caller to receive status updates from HAL in case of a disconnection event.
386 *
387 * @param[in] ssidIndex The index of SSID array
388 * @param[in] AP_SSID The ssid to disconnect
389 * @param[out] error An enum variable that indicates the Wi-Fi connection status @n
390 * Possible error values:
391 * - WIFI_HAL_ERROR_NOT_FOUND - WPS connection timeout, WPS overlap detects, SSID not found in last scan
392 * - WIFI_HAL_SUCCESS - Successfully disconnected from BSSID
393 * - WIFI_HAL_ERROR_SSID_CHANGED - SSID changed
394 *
395 * @return The status of the operation
396 * @retval RETURN_OK if successful
397 * @retval RETURN_ERR if any error is detected
398 *
399 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
400 * @pre wifi_disconnectEndpoint_callback_register() should be called before calling this API
401 * @see wifiStatusCode_t, wifi_cancelWpsPairing()
402 */
403typedef INT (*wifi_disconnectEndpoint_callback)(INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error);
404
405/**
406 * @brief Registers for disconnect callback
407 *
408 * @param[in] callback_proc the callback function to disconnect the client
409 *
410 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
411 * @see wifi_connectEndpoint_callback_register(), wifi_disconnectEndpoint_callback
412 */
414
415/**
416 * @brief Receives status updates from HAL in case of a connection event
417 *
418 * This callback will be invoked when client automatically connect to access point
419 *
420 * @param[in] ssidIndex The index of SSID array
421 * @param[in] AP_SSID The ssid to connect
422 * @param[out] error An enum variable that indicates the Wi-Fi connection status @n
423 * Possible error values:
424 * - WIFI_HAL_CONNECTING - WPS connection in progress, connect to specific SSID
425 * - WIFI_HAL_SUCCESS - Successfully connected to BSSID
426 * - WIFI_HAL_ERROR_CONNECTION_FAILED - SSID disabled
427 * - WIFI_HAL_ERROR_INVALID_CREDENTIALS - Wrong key, Password may not be falling within spec
428 * - WIFI_HAL_ERROR_AUTH_FAILED - Authentication failed
429 *
430 * @return The status of the operation
431 * @retval RETURN_OK if successful
432 * @retval RETURN_ERR if any error is detected
433 *
434 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
435 * @pre wifi_connectEndpoint_callback_register() should be called before calling this API
436 * @see wifiStatusCode_t, wifi_connectEndpoint(), wifi_setCliWpsEnrolleePin(), wifi_setCliWpsButtonPush()
437 */
438typedef INT (*wifi_connectEndpoint_callback)(INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error);
439
440/**
441 * @brief Registers for connect callback
442 *
443 * @param[in] callback_proc The callback function to connect the client to the access point
444 *
445 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
446 * @see wifi_disconnectEndpoint_callback_register(), wifi_connectEndpoint_callback
447 */
449
450/**
451 * @struct _wifi_telemetry_ops_t
452 *
453 * @brief Structure for telemetry callback functions
454 */
456{
457 void (*init)(char* name); /**< init telemetry callback function */
458 void (*event_s)(char* marker, char* value); /**< callback funtion to event a string telemetry marker */
459 void (*event_d)(char* marker, int value); /**< callback funtion to event an integer telemetry marker */
461
462/**
463 * @brief Registers for Telemetry callback
464 *
465 * @param[in] telemetry_ops Telemetry callback functions
466 *
467 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
468 * @see wifi_telemetry_ops_t, wifi_telemetry_ops_t.init(), wifi_telemetry_ops_t.event_s(), wifi_telemetry_ops_t.event_d()
469 * @note is depreciated and will be removed in coming releases.
470 */
472
473/**
474 * @brief Provides the last connected SSID information
475 *
476 * @param[out] pairedSSIDInfo Structure which holds the last connected SSID information
477 *
478 * @return The status of the operation
479 * @retval RETURN_OK if successful
480 * @retval RETURN_ERR if any error is detected
481 *
482 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
483 * @see wifi_pairedSSIDInfo_t, wifi_connectEndpoint()
484 */
486
487/**
488 * @brief Sets the roaming control parameters
489 *
490 * @param[in] ssidIndex The index of the SSID {Valid values: 1}
491 * @param[in] pRoamingCtrl_data Structure with roaming control parameters
492 *
493 * @return The status of the operation
494 * @retval RETURN_OK if successful
495 * @retval RETURN_ERR if any error is detected
496 *
497 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
498 * @see wifi_roamingCtrl_t, wifi_getRoamingControl()
499 */
500int wifi_setRoamingControl (int ssidIndex, wifi_roamingCtrl_t *pRoamingCtrl_data);
501
502/**
503 * @brief Gets the roaming control parameters
504 *
505 * @param[in] ssidIndex The index of the SSID {Valid values: 1}
506 * @param[out] pRoamingCtrl_data Structure with roaming control parameters
507 *
508 * @return The status of the operation
509 * @retval RETURN_OK if successful
510 * @retval RETURN_ERR if any error is detected
511 *
512 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
513 * @see wifi_roamingCtrl_t, wifi_setRoamingControl()
514 */
515int wifi_getRoamingControl(int ssidIndex, wifi_roamingCtrl_t *pRoamingCtrl_data);
516
517/**
518 * @brief this call gets the current wifi status
519 *
520 * @returns wifi_status_code
521 *
522 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
523 * @see _WiFiHalStatus_t
524 */
526
527/**
528 * @brief Cancels any in-progress WPS operation
529 *
530 * @return The status of the operation
531 * @retval RETURN_OK if successful
532 * @retval RETURN_ERR if any error is detected
533 *
534 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
535 * @see wifi_setCliWpsButtonPush(), wifi_setCliWpsEnrolleePin(), wifi_disconnectEndpoint_callback()
536 */
538/** @} */ // End of WIFI_CLIENT_HAL
539/** @} */ // End of RDKV_WIFI_HAL
540/** @} */ // End of RDKV_WIFI
541/** @} */ // End of HPK
542#else
543#error "! __WIFI_CLINET_HAL_H__"
544#endif
INT wifi_setCliWpsDevicePIN(INT ssidIndex, ULONG pin)
This API sets the WPS Device pin to the Wi-Fi hal.
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)
Starts the process of connection between the client and an access point.
INT(* wifi_disconnectEndpoint_callback)(INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error)
Receives status updates from HAL in case of a disconnection event.
Definition wifi_client_hal.h:403
INT wifi_cancelWpsPairing()
Cancels any in-progress WPS operation.
INT wifi_getCliWpsConfigMethodsSupported(INT ssidIndex, CHAR *methods)
Gets WPS configuration methods supported by the device.
WiFiHalStatus_t getwifiStatusCode()
this call gets the current wifi status
INT(* wifi_connectEndpoint_callback)(INT ssidIndex, CHAR *AP_SSID, wifiStatusCode_t *error)
Receives status updates from HAL in case of a connection event.
Definition wifi_client_hal.h:438
INT wifi_getCliWpsDevicePIN(INT ssidIndex, ULONG *output_ulong)
This API is used to read the device PIN required for making a WPS connection.
void wifi_disconnectEndpoint_callback_register(wifi_disconnectEndpoint_callback callback_proc)
Registers for disconnect callback.
struct _wifi_pairedSSIDInfo wifi_pairedSSIDInfo_t
INT wifi_getCliWpsConfigMethodsEnabled(INT ssidIndex, CHAR *output_string)
Gets WPS configuration methods enabled on the device.
struct _wifi_telemetry_ops_t wifi_telemetry_ops_t
void wifi_connectEndpoint_callback_register(wifi_connectEndpoint_callback callback_proc)
Registers for connect callback.
INT wifi_setCliWpsEnable(INT ssidIndex, BOOL enableValue)
This API enables or disables WPS functionality for this access point.
INT wifi_clearSSIDInfo(INT ssidIndex)
Clears the SSID information.
INT wifi_cancelCliWPS(INT ssidIndex)
Stop the WPS process.
INT wifi_getCliWpsConfigurationState(INT ssidIndex, CHAR *output_string)
This API is used to get the WPS config status, whether "configured" or "not configured".
INT wifi_disconnectEndpoint(INT ssidIndex, CHAR *AP_SSID)
Starts the process of disconnection between the client and an access point.
INT wifi_setCliWpsConfigMethodsEnabled(INT ssidIndex, CHAR *methodString)
Sets the active WPS methods.
INT wifi_lastConnected_Endpoint(wifi_pairedSSIDInfo_t *pairedSSIDInfo)
Provides the last connected SSID information.
INT wifi_setCliWpsEnrolleePin(INT ssidIndex, CHAR *EnrolleePin)
Sets the WPS PIN and uses it to pair with access point.
void wifi_telemetry_callback_register(wifi_telemetry_ops_t *telemetry_ops)
Registers for Telemetry callback.
struct _wifi_roamingCtrl_t wifi_roamingCtrl_t
int wifi_getRoamingControl(int ssidIndex, wifi_roamingCtrl_t *pRoamingCtrl_data)
Gets the roaming control parameters.
int wifi_setRoamingControl(int ssidIndex, wifi_roamingCtrl_t *pRoamingCtrl_data)
Sets the roaming control parameters.
INT wifi_setCliWpsButtonPush(INT ssidIndex)
Starts the WPS Push button pairing with access point.
INT wifi_getCliWpsEnable(INT ssidIndex, BOOL *output_bool)
This API checks WPS(Wi-Fi Protected Setup) functionality is enabled for this access point.
#define ULONG
Defines for the basic data types.
Definition wifi_common_hal.h:129
#define CHAR
Definition wifi_common_hal.h:137
enum _WiFiHalStatus_t WiFiHalStatus_t
wifi wpa supplicant status codes
wifiStatusCode_t
Enumerators for Wi-Fi connection status.
Definition wifi_common_hal.h:256
wifiSecurityMode_t
Wifi Security modes.
Definition wifi_common_hal.h:287
#define BOOL
Definition wifi_common_hal.h:133
#define INT
Definition wifi_common_hal.h:145
Definition wifi_client_hal.h:105
CHAR ap_wep_key[128]
Definition wifi_client_hal.h:110
CHAR ap_bssid[64]
Definition wifi_client_hal.h:107
CHAR ap_ssid[64]
Definition wifi_client_hal.h:106
CHAR ap_security[64]
Definition wifi_client_hal.h:108
CHAR ap_passphrase[128]
Definition wifi_client_hal.h:109
Structure for roaming control information.
Definition wifi_client_hal.h:119
INT preassnBestThreshold
Definition wifi_client_hal.h:123
INT postAssnLevelDeltaDisconnected
Definition wifi_client_hal.h:126
INT postAssnSelfSteerThreshold
Definition wifi_client_hal.h:127
BOOL selfSteerOverride
Definition wifi_client_hal.h:121
INT postAssnAPctrlTimeframe
Definition wifi_client_hal.h:132
INT postAssnSelfSteerTimeframe
Definition wifi_client_hal.h:128
INT postAssnAPctrlThreshold
Definition wifi_client_hal.h:131
INT postAssnBackOffTime
Definition wifi_client_hal.h:129
INT preassnBestDelta
Definition wifi_client_hal.h:124
INT postAssnLevelDeltaConnected
Definition wifi_client_hal.h:125
BOOL roam80211kvrEnable
Definition wifi_client_hal.h:122
BOOL roamingEnable
Definition wifi_client_hal.h:120
Structure for telemetry callback functions.
Definition wifi_client_hal.h:456
void(* event_d)(char *marker, int value)
Definition wifi_client_hal.h:459
void(* event_s)(char *marker, char *value)
Definition wifi_client_hal.h:458
void(* init)(char *name)
Definition wifi_client_hal.h:457