Espressif ESP32-S2 Programming Manual page 137

Table of Contents

Advertisement

Chapter 2. API Reference
FTM_STATUS_CONF_REJECTED
Peer rejected FTM configuration in FTM Request
FTM_STATUS_NO_RESPONSE
Peer did not respond to FTM Requests
FTM_STATUS_FAIL
Unknown error during FTM exchange
SmartConfig
TM
The SmartConfig
is a provisioning technology developed by TI to connect a new Wi-Fi device to a Wi-Fi network.
It uses a mobile app to broadcast the network credentials from a smartphone, or a tablet, to an un-provisioned Wi-Fi
device.
The advantage of this technology is that the device does not need to directly know SSID or password of an Access
Point (AP). This information is provided using the smartphone. This is particularly important to headless device and
systems, due to their lack of a user interface.
If you are looking for other options to provision your ESP32-S2 devices, check
Application Example
Connect ESP32-S2 to target AP using SmartConfig: wifi/smart_config.
API Reference
Header File
components/esp_wifi/include/esp_smartconfig.h
Functions
const char *esp_smartconfig_get_version(void)
Get the version of SmartConfig.
Return
• SmartConfig version const char.
esp_err_t
esp_smartconfig_start(const
Start SmartConfig, config ESP device to connect AP. You need to broadcast information by phone APP. Device
sniffer special packets from the air that containing SSID and password of target AP.
Attention 1. This API can be called in station or softAP-station mode.
Attention 2. Can not call esp_smartconfig_start twice before it finish, please call esp_smartconfig_stop first.
Return
• ESP_OK: succeed
• others: fail
Parameters
• config: pointer to smartconfig start configure structure
esp_err_t
esp_smartconfig_stop(void)
Stop SmartConfig, free the buffer taken by esp_smartconfig_start.
Attention Whether connect to AP succeed or not, this API should be called to free memory taken by smart-
config_start.
Return
• ESP_OK: succeed
• others: fail
esp_err_t
esp_esptouch_set_timeout(uint8_t time_s)
Set timeout of SmartConfig process.
Attention Timing starts from SC_STATUS_FIND_CHANNEL status. SmartConfig will restart if timeout.
Espressif Systems
smartconfig_start_config_t
126
Submit Document Feedback
Provisioning
API.
*config)
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF