Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate.
- Described the feature in detail and justified the reason for the request.
- Provided specific use cases and examples.
Feature description
The current ESP-MESH-LITE API provides a flat list of all nodes in the mesh via esp_mesh_lite_get_nodes_list()
, but it does not expose the parent-child relationships required to reconstruct the mesh's tree topology.
This makes it impossible for an application to determine the immediate next-hop neighbor for a packet destined for another node within the mesh.
We request a mechanism to get this next-hop information. This could be implemented in one of two ways:
-
A new API function that directly returns the next hop for a given final destination, for example:
esp_err_t esp_mesh_lite_get_next_hop(const uint8_t* final_dest_mac, uint8_t* next_hop_mac);
-
Enhancing the existing node info struct to include the parent's MAC address, which would allow an application to build the topology itself and determine the path.
Use cases
The primary use case for this feature is to enable advanced, topology-aware applications that need to apply per-neighbor logic before a packet is transmitted. This includes:
- Active Queue Management (AQM): Implementing schedulers that calculate traffic budget based on the next hop to not overload single nodes
- Link Cost Estimation: Allowing an application to monitor the health and performance of individual mesh links by associating TX/RX statistics with a specific parent or child.
- Advanced Diagnostics: Building tools that can accurately visualize the real-time topology of the mesh, including parent-child relationships, for easier debugging and analysis.
Alternatives
We considered enabling promiscuous mode: An application could enable promiscuous Wi-Fi mode to capture all raw 802.11 frames and extract the necessary metadata. This is an overly complex and resource-intensive solution that would require re-implementing significant parts of the network stack just to get this one piece of information.
Additional context
No response