Problems building Direction_finding_central sample

Hi, I recently installed the last version of the SDK v2.5.2 and when I try to build the sample direction_finding_central  I am getting the following error

I am running this command to build

west build -b nrf52833dk_nrf52833 -- -DCONF_FILE=prj.conf

the other sample, direction_finding_peripheral builds without problems, and other samples also.

Is there a special configuration for building this sample?

I will need the AoA mode only, however as I understand there is no need to use the overlay for this.

On VsCode I get this warning



I think this may be related since the callback cte_report_cb in the conn.h has a condition that only enables if the CONFIG_BT_DF_CONNECTION_CTE_RX=y

Any help would be greatly appreciated.
Parents
  • Is this by any chance trying to use the SoftDevice Controller? This doesn't support reception of CTE. If you need to receive CTE and you want to qualify the product then you should use nRF Connect SDK 2.1.0 as that is the only one with a valid QDID for the receiver side, and you must use the Zephyr controller.

  • I am using the Zephyr controller as far as I know. I tried building the sample using the toolchain and SDK v2.1.0 but run into the same issue.

    What I need is to receive I/Q samples using AoA mode. Is there maybe a better sample to get this?

    C:\ncs\zephyr\samples\bluetooth\direction_finding_central>west build -b nrf52833dk_nrf52833 -- -DCONF_FILE=prj.conf
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/zephyr/samples/bluetooth/direction_finding_central
    -- Using NCS Toolchain 2.1.0 for building. (C:/ncs/toolchains/v2.1.0/cmake)
    -- Found Python3: C:/ncs/toolchains/v2.1.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: C:/ncs/zephyr/.cache
    -- Zephyr version: 3.1.99 (C:/ncs/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Found host-tools: zephyr 0.14.1 (C:/ncs/toolchains/v2.1.0/opt/zephyr-sdk)
    -- Found dtc: C:/ncs/toolchains/v2.1.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/ncs/toolchains/v2.1.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/ncs/zephyr/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/dts.cmake
    
    warning: BT_DF (defined at C:/ncs/zephyr/subsys/bluetooth/host/Kconfig:636,
    subsys/bluetooth\host/Kconfig:636) was assigned the value 'y' but got the value 'n'. Check these
    unsatisfied dependencies: (((!BT_CTLR || BT_CTLR_DF_SUPPORT) && BT_HCI_HOST && BT_RPC_STACK) ||
    ((!BT_CTLR || BT_CTLR_DF_SUPPORT) && BT_HCI_HOST && BT_HCI && BT)) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_DF and/or look up BT_DF in the
    menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
    and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
    
    
    warning: BT_DF_CONNECTION_CTE_RX (defined at C:/ncs/zephyr/subsys/bluetooth/host/Kconfig:661,
    subsys/bluetooth\host/Kconfig:661) was assigned the value 'y' but got the value 'n'. Check these
    unsatisfied dependencies: (((!BT_CTLR || BT_CTLR_DF_CTE_RX_SUPPORT) && BT_DF && BT_HCI_HOST &&
    BT_RPC_STACK) || ((!BT_CTLR || BT_CTLR_DF_CTE_RX_SUPPORT) && BT_DF && BT_HCI_HOST && BT_HCI && BT))
    (=nParsing C:/ncs/zephyr/samples/bluetooth/direction_finding_central/Kconfig
    Loaded configuration 'C:/ncs/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'C:/ncs/zephyr/samples/bluetooth/direction_finding_central/prj.conf'
    Configuration saved to 'C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/include/generated/autoconf.h'
    ). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_DF_CONNECTION_CTE_RX and/or
    look up BT_DF_CONNECTION_CTE_RX in the menuconfig/guiconfig interface. The Application Development
    Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
    might be helpful too.
    
    
    warning: BT_DF_CONNECTION_CTE_REQ (defined at C:/ncs/zephyr/subsys/bluetooth/host/Kconfig:675,
    subsys/bluetooth\host/Kconfig:675) was assigned the value 'y' but got the value 'n'. Check these
    unsatisfied dependencies: ((BT_DF_CONNECTION_CTE_RX && BT_DF && BT_HCI_HOST && BT_RPC_STACK) ||
    (BT_DF_CONNECTION_CTE_RX && BT_DF && BT_HCI_HOST && BT_HCI && BT)) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_DF_CONNECTION_CTE_REQ and/or look up
    BT_DF_CONNECTION_CTE_REQ in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring done (17.3s)
    -- Generating done (0.3s)
    -- Build files have been written to: C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build
    ←[92m-- west build: building application
    [1/220] Generating include/generated/version.h
    -- Zephyr version: 3.1.99 (C:/ncs/zephyr), build: v3.1.99-ncs1
    [51/220] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    C:\ncs\toolchains\v2.1.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52833_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/nrf/drivers/mpsl/clock_control -IC:/ncs/zephyr/include/zephyr -IC:/ncs/zephyr/include -IC:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/include/generated -IC:/ncs/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/zephyr/subsys/bluetooth -IC:/ncs/nrf/include -IC:/ncs/nrf/lib/multithreading_lock/. -IC:/ncs/nrf/subsys/bluetooth/controller/. -IC:/ncs/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/modules/hal/nordic/nrfx -IC:/ncs/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/modules/hal/nordic/nrfx/mdk -IC:/ncs/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/modules/debug/segger/SEGGER -IC:/ncs/modules/debug/segger/Config -IC:/ncs/zephyr/modules/segger/. -IC:/ncs/modules/crypto/tinycrypt/lib/include -IC:/ncs/nrfxlib/mpsl/include -IC:/ncs/nrfxlib/mpsl/include/protocol -IC:/ncs/nrfxlib/softdevice_controller/include -isystem C:/ncs/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Os -imacros C:/ncs/zephyr/samples/bluetooth/direction_finding_central/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/ncs/zephyr/samples/bluetooth/direction_finding_central=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:/ncs/zephyr/samples/bluetooth/direction_finding_central/src/main.c
    C:/ncs/zephyr/samples/bluetooth/direction_finding_central/src/main.c:283:3: error: 'const struct bt_conn_cb' has no member named 'cte_report_cb'
      283 |  .cte_report_cb = cte_recv_cb,
          |   ^~~~~~~~~~~~~
    C:/ncs/zephyr/samples/bluetooth/direction_finding_central/src/main.c:283:19: 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]
      283 |  .cte_report_cb = cte_recv_cb,
          |                   ^~~~~~~~~~~
    C:/ncs/zephyr/samples/bluetooth/direction_finding_central/src/main.c:283:19: note: (near initialization for 'bt_conn_cb_conn_callbacks.le_param_req')
    [64/220] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\ncs\zephyr\samples\bluetooth\direction_finding_central\build'
    

  • Oh, and I see here that the OP built this using the command line and not using the default building action in the VSC Extension, and also made a mistake in the build command that prevents this auto-discovery of the board specific KConfig files. Did you build it in this way as well?

    It is supposed to be: "west build -b nrf52833dk_nrf52833 -- -DCONF_FILE=prj.conf", when you specify "-DCONF_FILE=<file>" you must provide all the KConfig files. The other simple option is to simply build using "west build -b nrf52833dk_nrf52833".

    Regards,

    Elfving

  • Hi,

    Yes, there is certainly a boards folder in my project. And I find the CONFIG_BT_LL_SW_SPLIT=y in nrf52833dk_nrf52833.conf. 

    When I was studying the Nordic BLE course, my understanding was that board.conf takes precedence over prj.conf. Therefore, I don't understand why this setting doesn't seem to be taking effect.

    You are great! I think this is important, but why would such a problem occur? 

    Anything helpful will be appreciated.

    Yours,

    Zihao

  • Hi,

    No, I built it using the default building action in VSCode. Because it seems that Nordic strongly encourages everyone to use the VSC Extension. Also, I'm really new to this, so I think the learning curve of using the command line might be higher, so I didn't use the command line...

    Yours,

    Zihao

  • Hi,

    Today I ran this sample successfully! Here's the thing: the nrf52833dk_nrf52833.conf in the board seems to be correct, but I don't know why it didn't work as expected. So, I copied all the code from nrf52833dk_nrf52833.conf into prj.conf. Subsequently, both the build and flash processes went smoothly, and CTE seemed fine too. Finally, I can start my project development.

    At the same time, I'd like to ask, will this solution have any other adverse effects?

    Thank you so much for your help, Elfving! you really helped me a lot! You are awesome!!

    Yours,

    Zihao

  • None at all, so this is something you can definitely do. Though I still find it strange how these files weren't dragged in automatically when you tried to build the project.

    The one file that remains now is the dts overlay file for the board. You can have a look at the device tree drop down menu to see if it is there. If it isn't, you can try pressing "create overlay file" and creating one with the same contents.

     

    Regards,

    Elfving

Reply
  • None at all, so this is something you can definitely do. Though I still find it strange how these files weren't dragged in automatically when you tried to build the project.

    The one file that remains now is the dts overlay file for the board. You can have a look at the device tree drop down menu to see if it is there. If it isn't, you can try pressing "create overlay file" and creating one with the same contents.

     

    Regards,

    Elfving

Children
Related