Provisioning Scheme Introduction

[中文]

Note

This document is automatically translated using AI. Please excuse any detailed errors. The official English version is still in progress.

Attention

The provisioning scheme in this document refers to the scheme for configuring and connecting ESP devices to Wi-Fi in different ways. Other schemes such as BLE-MESH provisioning are not included in this document.

Scheme Overview

During the code development phase, Wi-Fi information (SSID and PASSWORD) is often written directly into the program, which cannot be changed at any time to connect to the desired Wi-Fi, which is obviously impractical. Therefore, we have developed and launched a series of provisioning schemes:

  • SoftAP Provisioning

  • Blufi Provisioning

  • Smartconfig Provisioning

  • WEB Provisioning

Taking the common application scenario of provisioning smart sockets as an example, as follows.

Provisioning Scenario

Allow users to configure Wi-Fi information to ESP devices through mobile phones. Different provisions have their own advantages and disadvantages, and the next section elaborates on the details of these provisioning schemes.

Common Provisioning Application Scenarios

1. Blufi Provisioning (Requires ESP chip to support BLE)

The ESP device will broadcast BLE, and the nearby mobile phone will ask the user whether to connect to the ESP device via BLE after receiving the broadcast. If the connection is selected, the mobile phone can send the Wi-Fi information that the ESP device needs to connect to the ESP device. In this process, the user does not need to switch Wi-Fi networks, but needs to turn on the mobile phone’s Bluetooth. The user experience is relatively better than SoftAP provisioning. However, it is necessary to add Bluetooth-related code on the device side, which will increase the size of the firmware and occupy a certain memory before the provisioning is completed.

Software Code & APP Reference Links:

2. Smartconfig Provisioning

This method does not require the establishment of any communication link. The mobile phone sends UDP broadcast packets of different lengths to represent Wi-Fi information. The ESP device listens to all data frames within the signal coverage range in promiscuous mode and obtains Wi-Fi information through a certain algorithm. The disadvantage is that the success rate of provisioning is greatly affected by the environment.

Software Code & APP Reference Links:

3. SoftAP Provision

The ESP device will establish a Wi-Fi hotspot, and after the user connects their phone to this hotspot, they send the Wi-Fi information that the ESP device needs to connect to. This provisioning mode requires the user to manually connect to the hotspot network of the ESP device, which makes the provisioning process complicated, but this method generally has a higher success rate than Smartconfig provisioning.

Software Code & APP Reference Links:

Reference Materials

The brief summary of the provisioning scheme materials is as follows:

Attention

If you need more references like provision APP, please get the corresponding information in Common Provisioning Application Scenarios.