Page 1 of 1

使用ESP-Mesh-Lite中no_router例程中,怎么显示父节点的mac?

Posted: Sat Jan 11, 2025 3:22 am
by fdy_0429
你好,我现在在使用no_router例程,需要在root节点处显示网内所有节点的mac以及他们的父节点的mac。我没有找到对应的api或功能实现。我现在的串口显示代码是这样的:

Code: Select all

printf("%ld: %d, "MACSTR", %s\r\n" , 
loop + 1, node->node->level, 
MAC2STR(node->node->mac_addr), 
inet_ntoa(ip_struct));

Re: 使用ESP-Mesh-Lite中no_router例程中,怎么显示父节点的mac?

Posted: Mon Jan 13, 2025 2:25 am
by ESP_TianSW
esp_wifi_sta_get_ap_info API 可以获取父节点的 mac,目前的示例中,设备仅会将自身 mac 和 ip 报给根节点,如果需要上报父节点 mac,需要更改 components/mesh_lite/src/esp_mesh_lite.c