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

    I have contacted the DF developers now, and will see if they have some input on this, as I can't think of what it would be either then. On my end I'm able to build it for both NCS 2.5.1 and 2.6.0 with the Zephyr versions 3.4.99 and 3.5.99, so I don't see why it would be a Zephyr configuration issue either...

    I'll let you know when I hear from them. Thank you for being patient and thorough on your end!

    Best regards,

    Simon

  • Hi Simon

    Thanks for your reply. But I now think this issue is not related to the version. I have also built this project on my end with the same version as yours(include NCS and Zephyr), but still encountered this issue.

    I think I can make this problem clearer. I didn't notice the warning before:

    warning: BT_DF_CONNECTION_CTE_RX (defined at C:/ncs/v2.5.1/zephyr/subsys/bluetooth/host/Kconfig:847,
    subsys/bluetooth\host/Kconfig:847) 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))
    (=n). See docs.zephyrproject.org/.../kconfig.html 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/v2.5.1/zephyr/subsys/bluetooth/host/Kconfig:861, subsys/bluetooth\host/Kconfig:861) 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
    docs.zephyrproject.org/.../kconfig.html 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.

    I am a beginner in BLE. When I studied the Nordic BLE course, my understanding was:
    If I set 

    CONFIG_BT_DF_CONNECTION_CTE_RX=y
    CONFIG_BT_DF_CONNECTION_CTE_REQ=y

    in prj.conf,

    but didn't set any options in nrf52833dk_nrf52833.conf, then the final settings will be y. Actually, the official sample settings are same as mine(Because I just want to build and flash them without any modification.).

    However, in build it's 'n ' instead of  'y'.

    The same question is occurred in the direction finding connectionless rx sample on my end.

    It's like:

    CONFIG_BT_DF_CONNECTIONLESS_CTE_RX=y In build:n

    Also, I just tried to build the official sample without any modification.

    In Zephyr, the BLE direction finding code is wrapped in:

    #if defined(CONFIG_BT_DF_CONNECTIONLESS_CTE_RX)
    ......
    #endif

    So these code is not recognized when compiling.

    Then the error occureed:

    D:/AoAoD2/direction_finding_connectionless_rx/src/main.c:249: undefined reference to `bt_df_per_adv_sync_cte_rx_enable'
    D:/AoAAoD/direction_finding_central/src/main.c:254:10: error:  'const struct bt_conn_cb' has no member named 'cte_report_cb'

    VSCode tells me about Missing dependencies which led to this error:

    CONFIG_BT_DF_CONNECTIONLESS_CTE_RX was assigned the value y, but got the value n. Missing 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)
    Support for receive of CTE in connectionless mode
    
    Type: bool
    
    Value: n
    
    Enable support for reception and sampling of Constant Tone Extension in connectionless mode.
    
    Enable support for reception and sampling of Constant Tone Extension in connectionless mode.

    I have tried to add them in prj.conf like:

    CONFIG_BT_HCI=y
    CONFIG_BT_CTLR=y
    CONFIG_BT_CTLR_DF_CTE_RX_SUPPORT=y
    CONFIG_BT_HCI_HOST=y
    CONFIG_BT_RPC_STACK=y

    Then it show me that:

    CONFIG_BT_CTLR_DF_CTE_RX_SUPPORT was assigned the value y, but got the value n. Missing dependencies:
    BT_HCI
    
    Symbol CONFIG_BT_HCI_HOST cannot be set (has no prompt)

    So now I'm confused and don't know how to solve the missing dependencies problem.

    Any useful information would be appreciated, thanks!

    Yours,

    Zihao

Reply
  • Hi Simon

    Thanks for your reply. But I now think this issue is not related to the version. I have also built this project on my end with the same version as yours(include NCS and Zephyr), but still encountered this issue.

    I think I can make this problem clearer. I didn't notice the warning before:

    warning: BT_DF_CONNECTION_CTE_RX (defined at C:/ncs/v2.5.1/zephyr/subsys/bluetooth/host/Kconfig:847,
    subsys/bluetooth\host/Kconfig:847) 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))
    (=n). See docs.zephyrproject.org/.../kconfig.html 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/v2.5.1/zephyr/subsys/bluetooth/host/Kconfig:861, subsys/bluetooth\host/Kconfig:861) 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
    docs.zephyrproject.org/.../kconfig.html 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.

    I am a beginner in BLE. When I studied the Nordic BLE course, my understanding was:
    If I set 

    CONFIG_BT_DF_CONNECTION_CTE_RX=y
    CONFIG_BT_DF_CONNECTION_CTE_REQ=y

    in prj.conf,

    but didn't set any options in nrf52833dk_nrf52833.conf, then the final settings will be y. Actually, the official sample settings are same as mine(Because I just want to build and flash them without any modification.).

    However, in build it's 'n ' instead of  'y'.

    The same question is occurred in the direction finding connectionless rx sample on my end.

    It's like:

    CONFIG_BT_DF_CONNECTIONLESS_CTE_RX=y In build:n

    Also, I just tried to build the official sample without any modification.

    In Zephyr, the BLE direction finding code is wrapped in:

    #if defined(CONFIG_BT_DF_CONNECTIONLESS_CTE_RX)
    ......
    #endif

    So these code is not recognized when compiling.

    Then the error occureed:

    D:/AoAoD2/direction_finding_connectionless_rx/src/main.c:249: undefined reference to `bt_df_per_adv_sync_cte_rx_enable'
    D:/AoAAoD/direction_finding_central/src/main.c:254:10: error:  'const struct bt_conn_cb' has no member named 'cte_report_cb'

    VSCode tells me about Missing dependencies which led to this error:

    CONFIG_BT_DF_CONNECTIONLESS_CTE_RX was assigned the value y, but got the value n. Missing 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)
    Support for receive of CTE in connectionless mode
    
    Type: bool
    
    Value: n
    
    Enable support for reception and sampling of Constant Tone Extension in connectionless mode.
    
    Enable support for reception and sampling of Constant Tone Extension in connectionless mode.

    I have tried to add them in prj.conf like:

    CONFIG_BT_HCI=y
    CONFIG_BT_CTLR=y
    CONFIG_BT_CTLR_DF_CTE_RX_SUPPORT=y
    CONFIG_BT_HCI_HOST=y
    CONFIG_BT_RPC_STACK=y

    Then it show me that:

    CONFIG_BT_CTLR_DF_CTE_RX_SUPPORT was assigned the value y, but got the value n. Missing dependencies:
    BT_HCI
    
    Symbol CONFIG_BT_HCI_HOST cannot be set (has no prompt)

    So now I'm confused and don't know how to solve the missing dependencies problem.

    Any useful information would be appreciated, thanks!

    Yours,

    Zihao

Children
  • One more thing to add.
    I just added one line of direction.c and hci_core.h in Zephyr, and the build is successful.

    #define CONFIG_BT_DF_CONNECTIONLESS_CTE_RX

    But the connection-based sample is too complex for me to solve with a solution like this. Besides, I don't know if this has any additional effects on my program.

  • Hi,

    When I modified direction.c and hci_core.h, although rx was able to build successfully, it would cause problems in tx.
    So I add the code when building rx side and remove them when building tx side. It's not a very convenient solution, but at least I can start working on connectionless sample now.
    Thanks again, but I'm still looking for a follow-up on this issue.

    Yours,

    Zihao

Related