ESP32 - undefined reference to `esp_mesh_is_scan_allowed'

Ok, let’s rewind to the beginning of the discussion.

  • The reason why the dist/tools/esptool/install.sh script doesn’t support macOS is quite simple, I’m not able to test it for macOS. But obviously, you have already installed the right tool chain version manually in

    /Users/me/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/
    
  • The ESP-IDF is used as a package in RIOT, that is, it is automatically cloned directly from GitHub during compilation and patched as soon as it is needed. So there is no need to install it. Once you have tried an application you will find it in ${RIOTBASE}/build/pkg/esp32_sdk. If you execute the find command for idf.py, you will find it there. Please note, the whole tool infrastructure using the idf.py command is not supported in RIOT.

  • Yes, both RIOT docker images have already installed the xtensa-esp32-elf/esp-2021r2-8.4.0 toolchain.

  • Function esp_mesh_is_scan_allowed is defined in ${IDF_PATH}/components/esp_wifi/lib/esp32/libmesh.a that is linked with RIOT applications if either any esp_wifi* module or the esp_now module is used as netdev.

  • Function esp_wifi_scan_get_ap_records in turn is used in RIOT’s ESP-NOW netdev driver (${RIOTBASE}/cpu/esp_common/esp-now/esp_now_netdev.c) to scan for other peers. But, we had never compilation or linking problems with it.

Finally, the question is why you get this linking error.

1 Like