The official demo of AoA/AoD shows an error about cte_report_cb

I got an error while building the direction finding demo In nRF Connect:

../src/main.c:254:10: error: 'const struct bt_conn_cb' has no member named 'cte_report_cb'
254 | .cte_report_cb = cte_recv_cb,
| ^~~~~~~~~~~~~
../src/main.c:254:26: warning: initialization of '_Bool (*)(struct bt_conn *, struct bt_le_conn_param *)' from incompatible pointer type 'void (*)(struct bt_conn *, const struct bt_df_conn_iq_samples_report *)' [-Wincompatible-pointer-types]
254 | .cte_report_cb = cte_recv_cb,
| ^~~~~~~~~~~
../src/main.c:254:26: note: (near initialization for 'bt_conn_cb_conn_callbacks.le_param_req')
[27/118] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/hci_core.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'd:\AoAAoD\direction_finding_central\build'

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

In VSCode:

I found two similar problems in Nordic DevZone, but it doesn't seem to be solved:

Direction_finding_central test

Problems building Direction_finding_central sample

Other than that, I didn't find any helpful posts using Google.


I am a beginner in BLE and just finished the basic Bluetooth course in Nordic a few days ago. So, I don't think I had any problems with my environment, In that I was able to run all the demos In Bluetooth Low Energy Fundamentals.


I directly built the demo named direction finding central without any modification, because I did not see any information in the document that necessary to be changed to build successfully. Note that I just built it, it doesn't involve flash, so I don't think it's hardware related.


In contrast, the associated demo called direction finding peripheral was build successfully without any modification.


My operating system is Windows 10.
My nRF Connect SDK is v2.5.1.in VSCode.
My Zephyr version: 3.4.99

I don't know if this is an official Sample Bug, because I'm just getting started with embedded development. Is there any information that can help me?

Parents Reply Children
  • Hi Simon,

    Firstly, thank you for your patient response, and I apologize for the continued disturbance.

    I added CONFIG_BT_LL_SW_SPLIT=y to prj.conf, and then prj.conf stopped showing errors or warnings, whether it was in connection samples or connectionless samples. This allowed me to successfully build the official samples without modifying any SDK files.

    However, after flashing to my nRF52833DK, I still encountered issues with the official samples, both in connection and connectionless samples. During runtime, all these issues seem to be related to CTE configuration, resulting in err - 134.

    connection center log:

    [DEVICE]: 78:11:DC:C2:89:2F (public), AD evt type 0, AD data len 24, RSSI -90
    [AD]: 1 data_len 1
    [AD]: 22 data_len 19
    [DEVICE]: E5:2F:FC:5A:F2:67 (random), AD evt type 0, AD data len 8, RSSI -90
    [AD]: 1 data_len 1
    [AD]: 39 data_len 3
    Connected: E5:2F:FC:5A:F2:67 (random)
    Enable receiving of CTE...
    [00:00:27.216,369] <wrn> bt_df: bt_df_set_conn_cte_rx_enable: Receiving Constant Tone Extensions is not supported
    failed (err -134)
    Disconnected: E5:2F:FC:5A:F2:67 (random) (reason 0x3e)
    Scanning successfully started
    [DEVICE]: 32:68:CB:2F:B7:CC (random), AD evt type 3, AD data len 31, RSSI -68
    [DEVICE]: 2B:ED:54:17:9C:5B (random), AD evt type 3, AD data len 31, RSSI -74
    [DEVICE]: 7C:27:BC:D1:9D:2E (public), AD evt type 3, AD data len 19, RSSI -76
    [DEVICE]: 78:11:DC:C2:89:2F (public), AD evt type 0, AD data len 24, RSSI -90
    [AD]: 1 data_len 1
    [AD]: 22 data_len 19
    [DEVICE]: 78:11:DC:C2:89:2F (public), AD evt type 4, AD data len 28, RSSI -89
    [DEVICE]: 59:D4:15:36:74:8F (random), AD evt type 0, AD data len 31, RSSI -86

    For the direction finding connectionless tx,  it also reported failed (err -134) After copying a fresh one of the official sample and trying in different NCS environments, I still encountered the same error, while the connection tx seems to be working fine.

    Of course, currently our team leans more towards using the connectionless sample. The logs for connectionless tx and rx are as follows: (Note that both logs are from the official sample without any modifications, except for adding CONFIG_BT_LL_SW_SPLIT=y in the prj.conf of the connectionless rx sample.)

    --------------------------------------------------------------------

    connectionless tx building log:
    Building direction_finding_connectionless_tx_2
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir d:/AoAoD3/direction_finding_connectionless_tx_2/build d:/AoAoD3/direction_finding_connectionless_tx_2 --pristine --board nrf52833dk_nrf52833 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=d:/AoAoD3/direction_finding_connectionless_tx_2/prj.conf -DEXTRA_CONF_FILE=overlay-aoa.conf -DBOARD_ROOT=d:/aoaod3/direction_finding_connectionless_tx_2"

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/AoAoD3/direction_finding_connectionless_tx_2
    -- CMake version: 3.21.0
    -- Found Python3: D:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.5.1/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52833dk_nrf52833
    -- Found host-tools: zephyr 0.16.5 (D:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (D:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: D:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.5.1/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: D:/AoAoD3/direction_finding_connectionless_tx_2/boards/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: D:/AoAoD3/direction_finding_connectionless_tx_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: D:/AoAoD3/direction_finding_connectionless_tx_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: D:/AoAoD3/direction_finding_connectionless_tx_2/build/zephyr/dts.cmake

    warning: Experimental symbol BT_DF is enabled.

    Parsing C:/ncs/v2.5.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.5.1/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'd:/AoAoD3/direction_finding_connectionless_tx_2/prj.conf'
    Merged configuration 'D:/AoAoD3/direction_finding_connectionless_tx_2/overlay-aoa.conf'
    Configuration saved to 'D:/AoAoD3/direction_finding_connectionless_tx_2/build/zephyr/.config'
    Kconfig header saved to 'D:/AoAoD3/direction_finding_connectionless_tx_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: D:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/AoAoD3/direction_finding_connectionless_tx_2/build
    -- west build: building application
    [2/172] Generating include/generated/version.h
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.1/zephyr), build: v3.4.99-ncs1-1
    [172/172] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 102944 B 512 KB 19.64%
    RAM: 19872 B 128 KB 15.16%
    IDT_LIST: 0 GB 2 KB 0.00%
    * Terminal will be reused by tasks, press any key to close it.


    connectionless rx building log:
    Building direction_finding_connectionless_rx
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir d:/AoAoD3/direction_finding_connectionless_rx/build d:/AoAoD3/direction_finding_connectionless_rx --pristine --board nrf52833dk_nrf52833 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=d:/aoaod3/direction_finding_connectionless_tx_2;d:/aoaod3/direction_finding_connectionless_rx;d:/aoaod3/direction_finding_connectionless_tx_1;d:/aoaod3/direction_finding_central;d:/aoaod3/direction_finding_peripheral;d:/aoaod3/direction_finding_connectionless_tx -DCACHED_CONF_FILE=d:/AoAoD3/direction_finding_connectionless_rx/prj.conf -DDTC_OVERLAY_FILE=d:/AoAoD3/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.overlay"

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/AoAoD3/direction_finding_connectionless_rx
    -- CMake version: 3.21.0
    -- Found Python3: D:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.5.1/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52833dk_nrf52833
    -- Found host-tools: zephyr 0.16.5 (D:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (D:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: D:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.5.1/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: d:/AoAoD3/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: D:/AoAoD3/direction_finding_connectionless_rx/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: D:/AoAoD3/direction_finding_connectionless_rx/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: D:/AoAoD3/direction_finding_connectionless_rx/build/zephyr/dts.cmake

    warning: Experimental symbol BT_DF is enabled.


    warning: Experimental symbol BT_LL_SW_SPLIT is enabled.

    Parsing C:/ncs/v2.5.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.5.1/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'd:/AoAoD3/direction_finding_connectionless_rx/prj.conf'
    Configuration saved to 'D:/AoAoD3/direction_finding_connectionless_rx/build/zephyr/.config'
    Kconfig header saved to 'D:/AoAoD3/direction_finding_connectionless_rx/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: D:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/AoAoD3/direction_finding_connectionless_rx/build
    -- west build: building application
    [2/193] Generating include/generated/version.h
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.1/zephyr), build: v3.4.99-ncs1-1
    [193/193] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 78352 B 512 KB 14.94%
    RAM: 21448 B 128 KB 16.36%
    IDT_LIST: 0 GB 2 KB 0.00%
    * Terminal will be reused by tasks, press any key to close it.

    --------------------------------------------------------------------------

    (I'm sorry, I'm not sure why, but I couldn't successfully use "insert code" to insert my log, so I just pasted it here directly...)

    There are several cases on DevZone regarding err-134, but the latest one is from two years ago which is too old, and I haven't found any helpful solutions. I've checked the build logs for both, but at my level of knowledge, I haven't identified any significant issues.

    Is there anything unusual in the logs that you can see?

    About AoD:

    Yes indeed, AoD requires the beacon to have an antenna array. However, when we run AoD, the center becomes the beacon, and vice versa. This is indeed a bit niche since we do not do localization. Thank you for your concern!

    Yours,

    Zihao

Related