ESP32 BLE Mesh proper way to send async. messages to mobile application
Posted: Mon Jun 08, 2020 5:19 pm
Device: ESP32-WROOM-32E
IDF: v4.2
I have a mesh application that needs to be able to send asynchronous messages to a mobile application. My research shows that the Mesh Proxy Service can be utilized for this. I am struggling to determine how to appropriately access the Mesh Proxy Service via the ESP-IDF. I see there is a function, bt_mesh_proxy_send in proxy_server.c, prototype to follow.
I am unable to figure out how to use this properly or if this is even the correct approach to access the Mesh Proxy Service.
If this is the correct method, my questions are as follows,
IDF: v4.2
I have a mesh application that needs to be able to send asynchronous messages to a mobile application. My research shows that the Mesh Proxy Service can be utilized for this. I am struggling to determine how to appropriately access the Mesh Proxy Service via the ESP-IDF. I see there is a function, bt_mesh_proxy_send in proxy_server.c, prototype to follow.
- int bt_mesh_proxy_send(struct bt_mesh_conn *conn, u8_t type,
- struct net_buf_simple *msg)
If this is the correct method, my questions are as follows,
- Can this function be called at anytime by the application without causing issue?
- How do I determine the correct "conn" and use this at run-time?
- How can my application receive data from the phone via the Mesh Proxy Service?