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'
    

  • Hi again and sorry about the wait,

    Zihao said:

    4) Actually, I modified the nRF52833DK board files before. I don't think it really matters because I just changed the gpio numbers for buttons like:

    That change shouldn't make a difference. I tested it myself too, just in case. Though it is interesting that only the '33DK is showing this issue. Maybe there is something else that has been changed in that file that we aren't aware of. Could you try replacing it with this from my installation and see if it helps?

    8233.nrf52833dk_nrf52833.zip

    Regards,

    Elfving

  • Thank you for your reply. I apologize for the wait.

    Thank you for providing the zip file, but it seems that it also didn't work...[sad]

    I added CONFIG_BT_LL_SW_SPLIT=y to prj.conf, which is not set in the official samples. After that, both connection samples and connectionless samples were successfully built and flashed to nRF53833DK!

    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.

    There doesn't seem to be any abnormalities during the build process. I found some similar cases in DevZone, but they are too old and the solutions mentioned are not useful to me: 

     direction_finding_connectionless_tx Error: Update CTE params...failed (err -134) 

     Update CTE params...failed (err -134) in 'direction_finding_connectionless_tx' 

    I tried building both official connection and connectionless samples without any modifications, except for adding CONFIG_BT_LL_SW_SPLIT=y in the prj.conf of the connection rx and connectionless rx samples. And I tried them on ncs v2.5.1/v2.5.2/v2.6.0 but all of them resulting in err - 134.

    Can you provide any assistance? Thank you!

    Yours,

    Zihao

  • That is odd. 

    You do definitely need CONFIG_BT_LL_SW_SPLIT to be enabled, though that should be enabled in the "nrf52833dk_nrf52833.conf" file, that should be in a "board" directory and dragged into the project when building it automatically. Could you check if you even have this boards folder in your project?

     

    Regards,

    Elfving

  • 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

Reply
  • 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

Children
No Data
Related