ESP32-C6 and Wifi Neighbor Awareness Networking

esp32c6_user
Posts: 3
Joined: Thu Oct 12, 2023 3:40 pm

ESP32-C6 and Wifi Neighbor Awareness Networking

Postby esp32c6_user » Thu Oct 12, 2023 4:15 pm

Hello,

I am the proud owner of several ESP32-C6-DevKitC-1 boards for two weeks.
I am now trying to compile the Wifi Neighbor Awareness Networking (NAN) examples.
Unfortunately, I get the following error message:

Code: Select all

[931/933] Linking CXX executable nan_publisher.elf
FAILED: nan_publisher.elf 
...
/home/esp_user/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: esp-idf/main/libmain.a(publisher_main.c.obj): in function `nan_ndp_indication_event_handler':
/home/esp_user/esp/nan_publisher/main/publisher_main.c:60: undefined reference to `esp_wifi_nan_datapath_resp'
/home/esp_user/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: esp-idf/main/libmain.a(publisher_main.c.obj): in function `wifi_nan_publish':
/home/esp_user/esp/nan_publisher/main/publisher_main.c:80: undefined reference to `esp_netif_create_default_wifi_nan'
/home/esp_user/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /home/esp_user/esp/nan_publisher/main/publisher_main.c:82: undefined reference to `esp_wifi_nan_start'
/home/esp_user/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /home/esp_user/esp/nan_publisher/main/publisher_main.c:93: undefined reference to `esp_wifi_nan_publish_service'
/home/esp_user/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /home/esp_user/esp/nan_publisher/main/publisher_main.c:116: undefined reference to `esp_wifi_nan_send_message'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/esp_user/esp/nan_publisher/build/log/idf_py_stderr_output_23488 and /home/esp_user/esp/nan_publisher/build/log/idf_py_stdout_output_23488
Here are my steps:

Code: Select all

$ cd ~/esp/
$ cp -R esp-idf/examples/wifi/wifi_aware/nan_publisher .
$ . $HOME/esp/esp-idf/export.sh
$ cd  nan_publisher
$ idf.py set-target esp32c6
$ idf.py build
Does the board even support Wifi NAN? If so, how can I fix the bug here so that I can compile the sample project?

Thank you for your support in advance

Best regards,

esp32c6_user

Sprite
Espressif staff
Espressif staff
Posts: 10596
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby Sprite » Fri Oct 13, 2023 1:59 am

Just checking: are your submodules up to date? You can make sure by running 'git submodule update --init --recursive' in the esp-idf directory.

esp32c6_user
Posts: 3
Joined: Thu Oct 12, 2023 3:40 pm

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby esp32c6_user » Fri Oct 13, 2023 7:40 am

Just checking: are your submodules up to date? You can make sure by running 'git submodule update --init --recursive' in the esp-idf directory.
I run your command in the esp-idf-directory and it is still the latest version. I have tried with the latest stable branch (v5.1.1) and also with the master branch (8fc8f3f47997aadba21facabc66004c1d22de181) (i have two seperate folders with latest stable branch and master branch to don't mix up anything)

Sprite
Espressif staff
Espressif staff
Posts: 10596
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby Sprite » Fri Oct 13, 2023 8:49 am

Yep, I can reproduce this. For some reason, it seems that in the current master only the ESP32 and ESP32-S2 properly can compile NAN applications. I have no idea why this would be (and if this is an error or something that needs more development), I've poked the dev responsible.

Sprite
Espressif staff
Espressif staff
Posts: 10596
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby Sprite » Sat Oct 14, 2023 3:27 am

Okay, it seems that NAN at this point is only supported for these two chips, and the developer who made the applications didn't really handle cases where you try to compile this on unsupported chips gracefully. Support for the C6 is planned, although I don't have a timeline on that.

esp32c6_user
Posts: 3
Joined: Thu Oct 12, 2023 3:40 pm

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby esp32c6_user » Sat Oct 14, 2023 8:40 am

Okay, it seems that NAN at this point is only supported for these two chips, and the developer who made the applications didn't really handle cases where you try to compile this on unsupported chips gracefully. Support for the C6 is planned, although I don't have a timeline on that.
Okay thank you very much for your support and efforts. Would it be possible to add a notice in the ESP32c6 documentation? When i bought these boards i have checked if they support WiFi NAN and i don't find a notice that is only limited for these both chips.

Here the documentation where i have looked:
https://docs.espressif.com/projects/esp ... p_nan.html

erengel
Posts: 1
Joined: Mon Dec 25, 2023 3:34 pm

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby erengel » Mon Dec 25, 2023 3:36 pm

I am nterested in useing WiFi-Aware with esp32-S3. Is this something that may happen soon?

aaronpace
Posts: 1
Joined: Thu May 14, 2026 1:57 pm

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby aaronpace » Thu May 14, 2026 1:59 pm

I am still encountering these 'undefined reference' errors for the ESP32-C6 in v6.0.1. I have opened GitHub Issue #18618 with the full build logs.

This is currently a blocker for a high-volume commercial production rollout. Has anyone from the Espressif team confirmed if the C6 binary blobs for NAN are available in a development branch yet?

nachiket_kukade
Espressif staff
Espressif staff
Posts: 2
Joined: Mon May 20, 2019 7:12 am

Re: ESP32-C6 and Wifi Neighbor Awareness Networking

Postby nachiket_kukade » Thu May 21, 2026 9:05 am

Responded on GH - https://github.com/espressif/esp-idf/issues/18618.
Wi-Fi Aware (NAN) is currently supported on ESP32, ESP32S2, ESP32C5 and ESP32C61.
Best way to know if a Target is supported is to check the README.md or Chip specific API-Guide - https://docs.espressif.com/projects/esp ... waretm-nan. We do not prompt a warning for unsupported targets at compile time.

Who is online

Users browsing this forum: PerplexityBot, Qwantbot and 9 guests