Function esp_idf_sys::esp_wifi_set_config
source ยท pub unsafe extern "C" fn esp_wifi_set_config(
interface: wifi_interface_t,
conf: *mut wifi_config_t,
) -> esp_err_t
Expand description
@brief Set the configuration of the STA, AP or NAN
@attention 1. This API can be called only when specified interface is enabled, otherwise, API fail @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. @attention 3. ESP devices are limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as the channel of the station. @attention 4. The configuration will be stored in NVS for station and soft-AP
@param interface interface @param conf station, soft-AP or NAN configuration
@return
- ESP_OK: succeed
- ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
- ESP_ERR_INVALID_ARG: invalid argument
- ESP_ERR_WIFI_IF: invalid interface
- ESP_ERR_WIFI_MODE: invalid mode
- ESP_ERR_WIFI_PASSWORD: invalid password
- ESP_ERR_WIFI_NVS: WiFi internal NVS error
- others: refer to the error code in esp_err.h