Scan Delegator functionality in audio headset application

The scan delegator functionality has been implemented in Zephyr and the samples\bluetooth\broadcast_audio_sink application uses it. A broadcast Assistant than therefore scan for broadcast sources on behalf on the scan delegator there.

I am using the nrf5340 audio development kits.

I am now trying to integrate this Scan Delegator functionality into the nrf\applications\nrf5340_audio headset application. I am using the latest nrf version 2.4.0. The APIs for the Scan Delegator are there, but it is not possible for me to build this due to the Kconfig warnings as below. Any help with this would be much appreciated. Thanks in advance. 

Invoking build step
Net core uses precompiled hex
Run: west build C:\ble-audio\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ble-audio\applications\nrf5340_audio\build\dev_headset\build_debug
ninja: no work to do.
Run: west build C:\ble-audio\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ble-audio\applications\nrf5340_audio\build\dev_gateway\build_debug
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: C:/ble-audio/applications/nrf5340_audio
-- CMake version: 3.20.5
-- Cache files will be written to: C:/ncs/v2.3.0/zephyr/.cache
-- Zephyr version: 3.3.99 (C:/ncs/v2.3.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.15.2 (C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.2 (C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found BOARD.dts: C:/ncs/v2.3.0/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/ble-audio/applications/nrf5340_audio/app.overlay
-- Generated zephyr.dts: C:/ble-audio/applications/nrf5340_audio/build/dev_gateway/build_debug/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/ble-audio/applications/nrf5340_audio/build/dev_gateway/build_debug/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/ble-audio/applications/nrf5340_audio/build/dev_gateway/build_debug/zephyr/dts.cmake

warning: BT_PER_ADV_SYNC_MAX (defined at C:/ncs/v2.3.0/zephyr/subsys/bluetooth/Kconfig.adv:73,
subsys/bluetooth\Kconfig.adv:73) was assigned the value '4' but got the value ''. Check these
unsatisfied dependencies: ((BT_PER_ADV_SYNC && BT_EXT_ADV && BT_RPC_STACK) || (BT_PER_ADV_SYNC &&
BT_EXT_ADV && BT_HCI && BT)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_PER_ADV_SYNC_MAX and/or look up
BT_PER_ADV_SYNC_MAX 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_BAP_BROADCAST_SNK_COUNT (defined at
C:/ncs/v2.3.0/zephyr/subsys/bluetooth/host\../audio\Kconfig.bap:183,
subsys/bluetooth\host\../audio\Kconfig.bap:183) was assigned the value '4' but got the value ''.
Check these unsatisfied dependencies: ((BT_BAP_BROADCAST_SINK && BT_AUDIO && BT_HCI_HOST &&
BT_RPC_STACK) || (BT_BAP_BROADCAST_SINK && BT_AUDIO && BT_HCI_HOST && BT_HParsing C:/ble-audio/applications/nrf5340_audio/Kconfig
Loaded configuration 'C:/ncs/v2.3.0/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
Merged configuration 'C:/ble-audio/applications/nrf5340_audio/prj.conf'
Merged configuration 'C:/ble-audio/applications/nrf5340_audio/build/dev_gateway/build_debug/zephyr/misc/generated/extra_kconfig_options.conf'
CI && BT)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_BAP_BROADCAST_SNK_COUNT and/or look up
BT_BAP_BROADCAST_SNK_COUNT 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: USB_CDC_ACM (defined at subsys/usb/device/class/Kconfig.cdc:6) was assigned the value 'y'
but got the value 'n'. Check these unsatisfied dependencies: DT_HAS_ZEPHYR_CDC_ACM_UART_ENABLED
(=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_USB_CDC_ACM and/or look up
USB_CDC_ACM 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: Experimental symbol NRF5340_AUDIO is enabled.


warning: Experimental symbol BT_LL_ACS_NRF53 is enabled.


warning: Experimental symbol BT_ISO_BROADCASTER is enabled.


warning: Experimental symbol BT_AUDIO is enabled.


warning: Experimental symbol BT_BAP_BROADCAST_SOURCE is enabled.


warning: BT_PER_ADV_SYNC_TRANSFER_RECEIVER (defined at subsys/bluetooth/Kconfig:164) has direct dependencies BT_PER_ADV_SYNC && (!BT_CTLR || BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT) && BT_CONN && BT_HCI && BT with value n, but is currently being y-selected by the following symbols:
 - SCAN_OFFLOAD (defined at C:/ble-audio/applications/nrf5340_audio/Kconfig:97), with value y, direct dependencies y (value: y), and select condition !BT_CTLR || BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT (value: y)

error: Aborting due to Kconfig warnings

CMake Error at C:/ncs/v2.3.0/zephyr/cmake/modules/kconfig.cmake:339 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/ncs/v2.3.0/nrf/cmake/modules/kconfig.cmake:29 (include)
  C:/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
  C:/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
  CMakeLists.txt:46 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/v2.3.0/opt/bin/python.exe '-BC:\ble-audio\applications\nrf5340_audio\build\dev_gateway\build_debug' -GNinja '-SC:\ble-audio\applications\nrf5340_audio'
Traceback (most recent call last):
  File "buildprog.py", line 404, in <module>
    __main()
  File "buildprog.py", line 387, in __main
    __build_module(build_cfg, options)
  File "buildprog.py", line 150, in __build_module
    raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 1

Parents Reply Children
  • Hello again, when building the application can you please add the following CMake argument: 

    -DCONFIG_AUDIO_DEV=1

    Either add this to Build Configuration in the VS code extension, or add to end of west build as -- -DCONFIG_AUDIO_DEV=1
    Let me know how that works for you
  • Hello  CONFIG_AUDIO_DEV is already set to 1 in this case as this application should only be run on a headset device. The problem still persists. 

  • It's ok. Problem solved. After some digging, BT_PER_ADV_SYNC_TRANSFER_RECEIVER shouldn't be directly assigned a value in this case. Thanks for your help. 

  •  , our developers are quite interested in the solution you are working on, and they ask if you can make a PR with this scan delegator code? They inform me that they are intending to implement scan delegator for our BIS headsets as well, just haven't gotten around to it yet. If you have something that works, we might take that, polish it a bit and merge it into main. The benefit for the you is that we would maintain it from there on out.


    mul said:
    Problem solved. After some digging, BT_PER_ADV_SYNC_TRANSFER_RECEIVER shouldn't be directly assigned a value in this case.

    Is your application working as intended at this point?

    Kind regards,
    Øyvind

  • Hello. I am also interested in getting the Scan Delegator role to work on the ADK when building the app as a Broadcast Sink and have started looking at how to integrate the Zephyr Broadcast Audio Sink example with the ADK code just like  did. But, before I do... Is this now supposed to be working on NCS v2.6.0? I have Broadcast Sink working fine and see BT_BAP_SCAN_DELEGATOR=y by default in the Kconfig.defaults file. I expected BT_BAP_SCAN_DELEGATOR=y to enable advertising to make the Broadcast Sink / Scan Delegator available for a Broadcast Assistant to connect to it, but I do not see it advertising.

    Is the Scan Delegator role just not yet fully implemented in the SDK? I took a quick look at the v2.6.1 changelog but don't see any updates related to this. So, I haven't upgraded to it yet.

    Thanks,
    Chris

Related