Function esp_idf_sys::esp_wifi_set_scan_parameters

source ยท
pub unsafe extern "C" fn esp_wifi_set_scan_parameters(
    config: *const wifi_scan_default_params_t,
) -> esp_err_t
Expand description

@brief Set default parameters used for scanning by station.

@attention The values set using this API are also used for scans used while connecting.

@attention The values of maximum active scan time and passive scan time per channel are limited to 1500 milliseconds.

@attention The home_chan_dwell_time needs to be a minimum of 30ms and a maximum of 150ms.

@attention Set any of the parameters to 0 to indicate using the default parameters - scan_time.active.min : 0ms, scan_time.active.max : 120ms home_chan_dwell_time : 30ms scan_time.passive : 360ms

@attention Default values can be retrieved using the macro WIFI_SCAN_PARAMS_DEFAULT_CONFIG()

@attention Set the config parameter to NULL to reset previously set scan parameters to their default values.

@param config default configuration settings for all scans by stations

@return

  • ESP_OK: succeed
  • ESP_FAIL: failed as station mode has not been started yet
  • ESP_ERR_INVALID_ARG: values provided do not satisfy the requirements
  • ESP_ERR_NOT_SUPPORTED: This API is not supported in AP mode yet
  • ESP_ERR_INVALID_STATE: a scan/connect is in progress right now, cannot change scan parameters
  • others: refer to error code in esp_err.h