Publishing Messages in Mesh Network
Posted: Fri Apr 05, 2024 12:50 am
Hi guys,
I am attempting to modify the sensor-client/server model to create a mesh network of sensors that report to one client node. I am trying to use the esp_ble_mesh_model_publish method to publish a sensor's status to the client node once every few seconds. I am able to send messages using esp_ble_mesh_server_model_send_msg, but that will not work for me as my goal is to extend the range of the sparse network by propagating the message among servers until it reaches the client. Thus, I think I have to publish the message to a group address. I cannot figure out how to do this. For reference, I am using VSCode with ESP-IDF on Mac.
Here are my specific questions:
How and where do I create a publishing group?
How do I subscribe to this group on both the servers and the client?
How do I set the DST of the esp_ble_mesh_model_publish function and what should the parameters of that function be?
How do I handle the message on the client side?
As always, any help is greatly appreciated.
-rrwatt
I am attempting to modify the sensor-client/server model to create a mesh network of sensors that report to one client node. I am trying to use the esp_ble_mesh_model_publish method to publish a sensor's status to the client node once every few seconds. I am able to send messages using esp_ble_mesh_server_model_send_msg, but that will not work for me as my goal is to extend the range of the sparse network by propagating the message among servers until it reaches the client. Thus, I think I have to publish the message to a group address. I cannot figure out how to do this. For reference, I am using VSCode with ESP-IDF on Mac.
Here are my specific questions:
How and where do I create a publishing group?
How do I subscribe to this group on both the servers and the client?
How do I set the DST of the esp_ble_mesh_model_publish function and what should the parameters of that function be?
How do I handle the message on the client side?
As always, any help is greatly appreciated.
-rrwatt