Using SmartConfig on ESP32 in the Arduino environment

 

project summary

This tutorial will explain how to use the ESP-Touch protocol for ESP32 based IoT projects/devices.

With ESP-Touch you will no longer need to hardcode your Wi-Fi credentials as you can easily change it at any time.

We will use the Espressif app name as  EspTouch: SmartConfig for ESP8266, ESP32 .

By using this app, we can easily configure our ESP32 device with new Wi-Fi credentials.

About ESP-Touch protocol and SmartConfig technology

The ESP-Touch protocol uses SmartConfig technology. 

SmartConfigTM is a technology developed by TI to connect new Wi-Fi-based IoT devices to Wi-Fi networks. 

It uses a mobile app to broadcast network credentials from a smartphone or tablet to unprovisioned Wi-Fi devices.

The main advantage of using ESP-Touch is that there is no need to create an Access Point (AP) with a known SSID or password in the ESP32.

Therefore, the ESP-Touch protocol provides a seamless way to configure Wi-Fi devices connected to the router. For a headless system, it is very user friendly. Just a few clicks on your smartphone.

 The IoT device is not initially connected to the network, and the ESPTOUCH application cannot send any information directly to the device. With the help of the ESP-TOUCH communication protocol, devices with Wi-Fi access capabilities such as smart phones can send a series of UDP data packets to the Wi-Fi access point (AP), encoding the SSID and password into each UDP data packet. IoT devices can then access the UDP packets, fetch and parse out the required information. According to  the ESP-Touch user guide , the packet structure is as follows. 

 The protocol itself is lightweight compared to Wi-Fi Manager because Wi-Fi Manager

 The protocol itself is lightweight compared to Wi-Fi Manager, which needs to store the web page code in device memory.

Guess you like

Origin blog.csdn.net/niupipiniupipi/article/details/126629517