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
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
–
SoftAP Provisioning app on Play
– Source code on GitHub: esp-idf-provisioning-android.
• iOS:
–
BLE Provisioning app on app
–
SoftAP Provisioning app on app
– Source code on GitHub: esp-idf-provisioning-ios.
• Linux/MacOS/Windows :
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
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()
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
};
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
and
Wi-Fi Provisioning
Store.
Store.
store.
Store.
tools/esp_prov
(a python based command line tool for provisioning)
Protocol Communication (protocomm)
is called to configure and initialize the provisioning manager and thus
=
{
=
WIFI_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BTDM
678
Submit Document Feedback
for API guides and code snippets on example usage.
sessions. The set of
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers