Hi,
I couldn't find anything related to esp32 mesh functionality based on ESP-IDF with MQTT. Can someone please confirm that it is either under development and there is a probable release date associated with it or is it already there?
Thanks
ESP32 Mesh functionality on MQTT
Re: ESP32 Mesh functionality on MQTT
I'm not sure that I fully understand the question, but I'll take a stab at it.
https://docs.espressif.com/projects/esp ... sh_proto_t
If you look at the v3.1 ESP-IDF documentation, there is a function for the esp mesh API to send data between nodes using esp_mesh_send(const mesh_addr_t *to, const mesh_data_t *data, int flag, const mesh_opt_topt[], int opt_count).
The mesh_data_t type is defined as an struct that has a member of type mesh_proto_t which holds the protocol of the data. It's defined as an enum and can be encoded as MQTT, JSON, HTTP, or Binary. So you can definitely send data in the MQTT protocol among nodes in the mesh network with the intention of posting the data to your MQTT broker once the data reaches the Access Point.
If you're asking if you can use the MQTT publish/subscribe protocol for nodes to communicate among each other within your mesh network, then no, the mesh API doesn't give you that ability. But you probably wouldn't want to do that anyway, because all your nodes are connected to each other in the mesh network anyway. You can have the root receiving all the data that it is subscribed to then passing it to the relevant node(s) in the mesh, then posting any data they give back to the MQTT broker. At least that is my understanding of it anyway.
https://docs.espressif.com/projects/esp ... sh_proto_t
If you look at the v3.1 ESP-IDF documentation, there is a function for the esp mesh API to send data between nodes using esp_mesh_send(const mesh_addr_t *to, const mesh_data_t *data, int flag, const mesh_opt_topt[], int opt_count).
The mesh_data_t type is defined as an struct that has a member of type mesh_proto_t which holds the protocol of the data. It's defined as an enum and can be encoded as MQTT, JSON, HTTP, or Binary. So you can definitely send data in the MQTT protocol among nodes in the mesh network with the intention of posting the data to your MQTT broker once the data reaches the Access Point.
If you're asking if you can use the MQTT publish/subscribe protocol for nodes to communicate among each other within your mesh network, then no, the mesh API doesn't give you that ability. But you probably wouldn't want to do that anyway, because all your nodes are connected to each other in the mesh network anyway. You can have the root receiving all the data that it is subscribed to then passing it to the relevant node(s) in the mesh, then posting any data they give back to the MQTT broker. At least that is my understanding of it anyway.
Who is online
Users browsing this forum: No registered users and 113 guests