espressif / esp-mesh-lite

A lite version Wi-Fi Mesh, each node can access the network over the IP layer.
136 stars 22 forks source link

Get topology of network (AEGHB-199) #7

Open redfast00 opened 1 year ago

redfast00 commented 1 year ago

For debugging purposes, I'd like to visualize the topology of the network, in order to be able to draw a tree like below (but with MAC-addresses for every node): image

Is there an API I can use to retrieve this information?

xcguang commented 1 year ago

We‘re going to do this in the future, if you are interested in this, it's welcome to push a PR. you can get children's MAC in each node, and report the list to the root node, then you can get all nodes topology in the mesh-network.

redfast00 commented 1 year ago

Alright, I opened a draft PR in https://github.com/espressif/esp-mesh-lite/pull/8 (the code is not ready yet, but this shows the approach I'm going to take).