Page 1 of 1

Using send_msg Function in esp_ble_mesh

Posted: Sun Mar 31, 2024 9:31 pm
by rrwatt
Hi guys,

I am relatively new to esp-idf. I have a network of esp32 based devices, and I would like them to be able to talk to each other (i.e. send messages via flooding). I believe that this must be easily possible with the framework used in the examples, but I cannot seem to make sense of the code. I see the "esp_ble_mesh_client_model_send_msg" function coming up as a way to transmit messages in the network. How do I use this to send my own custom messages between nodes if possible? Any help is greatly appreciated. Thanks

-rrwatt

Re: Using send_msg Function in esp_ble_mesh

Posted: Tue Apr 02, 2024 5:03 am
by chegewara
https://docs.espressif.com/projects/esp ... s-of-nodes

Usually you want to send message to unicast or group address.

Re: Using send_msg Function in esp_ble_mesh

Posted: Thu Apr 04, 2024 6:26 pm
by rrwatt
Thanks for your reply. I want to constantly (every few seconds) send sensor data from each server node to the client node. Should I use esp_ble_model_publish with the device_role as a node or esp_ble_server_model_send_msg? Also, how does the message opcode param work?

-rrwatt