ESP32 Mesh Mlink protocol
Posted: Wed Sep 11, 2019 3:13 pm
Hi
Refer to the doc https://docs.espressif.com/projects/esp ... mlink.html
How to get the following result and receive broadcast while the light is turn on/off?
2. Receiving Broadcast UDP Packets
When scanning for devices, the app broadcasts UDP packets and obtains the information about the root node from its reply.
Request:
"Are You Espressif IOT Smart Device?"
Response:
"ESP32 Mesh 112233445566 http 80"
3.5. Device Status Notification
When the status of the ESP-MDF device (on/off), network connection (connected or disconnected), and route table change, the root node will send broadcast UDP packets to notify the app to obtain the latest status of the device.
UDP Broadcast:
mac=112233445566 flag=1234 type=***
mac is the MAC address of the device whose status has changed;
flag is a random integer value used to distinguish among notifications at different times;
type is the type of change, including:
status indicates that the device status has changed;
https indicates that the information of the device connection in the network has changed, and the updated information is required through https communication protocol;
http indicates that the information of the device connection in the network has changed, and the updated information is required through http communication protocol;
sniffer indicates that a new networked device has been sniffered.
Refer to the doc https://docs.espressif.com/projects/esp ... mlink.html
How to get the following result and receive broadcast while the light is turn on/off?
2. Receiving Broadcast UDP Packets
When scanning for devices, the app broadcasts UDP packets and obtains the information about the root node from its reply.
Request:
"Are You Espressif IOT Smart Device?"
Response:
"ESP32 Mesh 112233445566 http 80"
3.5. Device Status Notification
When the status of the ESP-MDF device (on/off), network connection (connected or disconnected), and route table change, the root node will send broadcast UDP packets to notify the app to obtain the latest status of the device.
UDP Broadcast:
mac=112233445566 flag=1234 type=***
mac is the MAC address of the device whose status has changed;
flag is a random integer value used to distinguish among notifications at different times;
type is the type of change, including:
status indicates that the device status has changed;
https indicates that the information of the device connection in the network has changed, and the updated information is required through https communication protocol;
http indicates that the information of the device connection in the network has changed, and the updated information is required through http communication protocol;
sniffer indicates that a new networked device has been sniffered.