Scanning#

Functions#

sl_status_t
sl_wifi_start_scan(sl_wifi_interface_t interface, const sl_wifi_ssid_t *optional_ssid, const sl_wifi_scan_configuration_t *configuration)

Initiates a Wi-Fi scan operation on the specified interface, supporting advanced and background scan types.

sl_status_t
sl_wifi_stop_scan(sl_wifi_interface_t interface)

Stops an ongoing Wi-Fi scan operation on the specified interface, including background scanning.

sl_status_t
sl_wifi_set_advanced_scan_configuration(const sl_wifi_advanced_scan_configuration_t *configuration)

Configures advanced scan settings for a Wi-Fi interface and enables instant scan capability.

sl_status_t
sl_wifi_get_advanced_scan_configuration(sl_wifi_advanced_scan_configuration_t *configuration)

Retrieves the current advanced scan configuration parameters from the Wi-Fi interface.

sl_status_t
sl_wifi_wait_for_scan_results(sl_wifi_scan_result_t **scan_result_array, uint32_t max_scan_result_count)

Wait for current scan to complete and store the results in the provided array.

Function Documentation#

sl_wifi_start_scan#

sl_status_t sl_wifi_start_scan (sl_wifi_interface_t interface, const sl_wifi_ssid_t * optional_ssid, const sl_wifi_scan_configuration_t * configuration)

Initiates a Wi-Fi scan operation on the specified interface, supporting advanced and background scan types.

Parameters
[in]interface

Wi-Fi interface as identified by sl_wifi_interface_t

[in]optional_ssid

Optional SSID of type sl_wifi_ssid_t can be used to scan for a particular Wi-Fi network

[in]configuration

sl_wifi_scan_configuration_t

  • Pre-conditions:

Returns

Note

  • For 911x, advanced scan results are not populated to user. Default Active Channel time is 100 milliseconds. If the user needs to modify the time, sl_wifi_set_advanced_scan_configuration can be called. If the scan_type is not ADV_SCAN, then the time is for foreground scan. Otherwise, it is used for background scanning. If the user needs to enable Passive Scanning, user should set the scan_type to SL_WIFI_SCAN_TYPE_PASSIVE. If the user needs to enable Low Power (LP) mode in Passive Scan, user needs to enable lp_mode in sl_wifi_scan_configuration_t. Default Passive Scan Channel time is 400 milliseconds. If the user needs to modify the time, sl_si91x_set_timeout can be called.


Definition at line 444 of file components/protocol/wifi/inc/sl_wifi.h

sl_wifi_stop_scan#

sl_status_t sl_wifi_stop_scan (sl_wifi_interface_t interface)

Stops an ongoing Wi-Fi scan operation on the specified interface, including background scanning.

Parameters
[in]interface

Wi-Fi interface as identified by sl_wifi_interface_t

  • Pre-conditions: This API is applicable only for client interface. sl_wifi_init should be called before this API.

Returns

Note

  • For 911x, sl_wifi_stop_scan is ONLY supported for advanced scan.


Definition at line 461 of file components/protocol/wifi/inc/sl_wifi.h

sl_wifi_set_advanced_scan_configuration#

sl_status_t sl_wifi_set_advanced_scan_configuration (const sl_wifi_advanced_scan_configuration_t * configuration)

Configures advanced scan settings for a Wi-Fi interface and enables instant scan capability.

Parameters
[in]configuration

Set advanced scan configuration as identified by sl_wifi_advanced_scan_configuration_t

sl_wifi_advanced_scan_configuration_t object that will contain the advanced scan configuration.

  • Pre-conditions:

Returns


Definition at line 476 of file components/protocol/wifi/inc/sl_wifi.h

sl_wifi_get_advanced_scan_configuration#

sl_status_t sl_wifi_get_advanced_scan_configuration (sl_wifi_advanced_scan_configuration_t * configuration)

Retrieves the current advanced scan configuration parameters from the Wi-Fi interface.

Parameters
[out]configuration

sl_wifi_advanced_scan_configuration_t object that will contain the current advanced scan configuration.

This function should be used after successful Wi-Fi connection.

  • Pre-conditions:

Returns


Definition at line 491 of file components/protocol/wifi/inc/sl_wifi.h

sl_wifi_wait_for_scan_results#

sl_status_t sl_wifi_wait_for_scan_results (sl_wifi_scan_result_t ** scan_result_array, uint32_t max_scan_result_count)

Wait for current scan to complete and store the results in the provided array.

Parameters
[in]scan_result_array

Array of sl_wifi_scan_result_t objects to store the scan results.

[in]max_scan_result_count

The maximum number of scan result objects that can fit in the scan result array.

  • Pre-conditions:

    • This function also returns when the scan result array is full.

  • Pre-conditions:

    • Once the scan result array is full, any further scan results will be lost.

Returns

Note

  • This API is not supported in the current release.


Definition at line 511 of file components/protocol/wifi/inc/sl_wifi.h