Chapter 2. API Reference
Security Schemes
At present unified provisioning supports two security schemes: 1. Security0 - No security (No encryption) 2. Secu-
rity1 - Curve25519 based key exchange, shared key derivation and AES256-CTR mode encryption of the data. It
supports two modes :
a. Authorized - Proof of Possession (PoP) string used to authorize session and derive shared key
b. No Auth (Null PoP) - Shared key derived through key exchange only
Security1 scheme details are shown in the below sequence diagram
Sample Code
Please refer to Protocol Communication and Wi-Fi Provisioning for API guides and code snippets on example usage.
Application implementation can be found as an example under provisioning.
Provisioning Tools
Provisioning applications are available for various platforms, along with source code:
• Android:
– BLE Provisioning app on Play Store.
– SoftAP Provisioning app on Play Store.
– Source code on GitHub: esp-idf-provisioning-android.
• iOS:
– BLE Provisioning app on app store.
– SoftAP Provisioning app on app Store.
– Source code on GitHub: esp-idf-provisioning-ios.
• Linux/MacOS/Windows : tools/esp_prov (a python based command line tool for provisioning)
The phone applications offer simple UI and thus more user centric, while the command line application is useful as
a debugging tool for developers.
2.4.3 Wi-Fi Provisioning
Overview
This component provides APIs that control Wi-Fi provisioning service for receiving and configuring Wi-Fi cre-
dentials over SoftAP or BLE transport via secure Protocol Communication (protocomm) sessions. The set of
wifi_prov_mgr_ APIs help in quickly implementing a provisioning service having necessary features with min-
imal amount of code and sufficient flexibility.
Initialization wifi_prov_mgr_init() is called to configure and initialize the provisioning manager and thus
this must be called prior to invoking any other wifi_prov_mgr_ APIs. Note that the manager relies on other com-
ponents of IDF, namely NVS, TCP/IP, Event Loop and Wi-Fi (and optionally mDNS), hence these must be initialized
beforehand. The manager can be de-initialized at any moment by making a call to wifi_prov_mgr_deinit().
wifi_prov_mgr_config_t config = {
.scheme = wifi_prov_scheme_ble,
.scheme_event_handler = WIFI_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BTDM
};
ESP_ERROR_CHECK( wifi_prov_mgr_init(config) );
The configuration structure wifi_prov_mgr_config_t has a few fields to specify the behavior desired of the
manager :
Espressif Systems 678
Submit Document Feedback
Release v4.4