TX power reduction with bap_broadcast_source

Hello, 

I'm trying to reduce the range of transmission of the nRF5340 SoC for an Auracast Broadcast. I would like it to be detectable only from a distance of 1 or 2 meters.

I've tried to force the TX_PWR to -20 dB in the configuration menu (west build -t menuconfig), but every time I try to build the project, there are configuring errors :

CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/ncs/v2.8.0/nrf/cmake/modules/kconfig.cmake:29 (include)
C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
-- Configuring incomplete, errors occurred!
C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
CMakeLists.txt:4 (find_package)

Has anyone encountered this issue and resolved it?

  • Hi Axelle,

    Can you provide more details and screenshots for your steps 3, 4 and 5?

    Do you see any change when using pristine build?

    Best regards,
    Dejan

  • Hi Dejans,

    For step 3 I simply put the command in the termnial,

    PS D:\nRF5340_AudioDK\Exploration_linux\bap_broadcast_source_test> west build -t menuconfig                                                                                                   
    -- west build: running target menuconfig
    [0/1] Re-running CMake...
    Loading Zephyr module(s) (Zephyr base (cached)): sysbuild_default
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340_audio_dk, qualifiers: nrf5340/cpuapp
    Parsing d:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/Kconfig.sysbuild
    Loaded configuration 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/zephyr/.config'
    No change to configuration in 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/zephyr/.config'
    No change to Kconfig header in 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/_sysbuild/autoconf.h'
    -- 
       ***********************************************
       * Running CMake for bap_broadcast_source_test *
       ***********************************************
    
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test
    -- CMake version: 3.21.0
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.8.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340_audio_dk, qualifiers: nrf5340/cpuapp
    -- Found host-tools: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.8.0/zephyr/boards/nordic/nrf5340_audio_dk/nrf5340_audio_dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/include/generated/zephyr/devicetree_generated.h    
    -- Including generated dts.cmake file: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/dts.cmake
    
    warning: Experimental symbol USB_DEVICE_AUDIO is enabled.
    
    Parsing D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/Kconfig
    Loaded configuration 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/.config'
    Merged configuration 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/.config.sysbuild'
    No change to configuration in 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/.config'
    No change to Kconfig header in 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/include/generated/zephyr/autoconf.h'
    CMake Warning at C:/ncs/v2.8.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
      CONFIG_USB_DEVICE_VID has default value 0x2FE3.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    CMake Warning at C:/ncs/v2.8.0/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
      CONFIG_USB_DEVICE_PID has default value 0x100.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    -- libmetal version: 1.6.0 (D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test)
    -- Build type:  MinSizeRel
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- open-amp version: 1.6.1 (C:/ncs/v2.8.0/modules/lib/open-amp/open-amp)
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- C_FLAGS :  -Wall -Wextra
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test
    -- 
       *****************************
       * Running CMake for hci_ipc *
       *****************************
    
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/ncs/v2.8.0/zephyr/samples/bluetooth/hci_ipc
    -- CMake version: 3.21.0
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.8.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340_audio_dk, qualifiers: nrf5340/cpunet
    -- Snippet(s): bt-ll-sw-split
    -- Found host-tools: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.8.0/zephyr/boards/nordic/nrf5340_audio_dk/nrf5340_audio_dk_nrf5340_cpunet.dts
    -- Found devicetree overlay: C:/ncs/v2.8.0/zephyr/snippets/bt-ll-sw-split/bt-ll-sw-split.overlay
    -- Generated zephyr.dts: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/dts.cmake
    
    warning: Experimental symbol BT_LL_SW_SPLIT is enabled.
    
    
    warning: Experimental symbol BT_CTLR_ADV_ISO is enabled.
    
    
    warning: Experimental symbol BT_CTLR_SET_HOST_FEATURE is enabled.
    
    
    warning: Experimental symbol USB_DEVICE_AUDIO is enabled.
    
    Parsing C:/ncs/v2.8.0/zephyr/Kconfig
    Loaded configuration 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/.config'
    Merged configuration 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/.config.sysbuild'
    No change to configuration in 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/.config'
    No change to Kconfig header in 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/include/generated/zephyr/autoconf.h'
    CMake Warning at C:/ncs/v2.8.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
      CONFIG_USB_DEVICE_VID has default value 0x2FE3.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    CMake Warning at C:/ncs/v2.8.0/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
      CONFIG_USB_DEVICE_PID has default value 0x100.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    -- libmetal version: 1.6.0 (C:/ncs/v2.8.0/zephyr/samples/bluetooth/hci_ipc)
    -- Host:    Windows/AMD64
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- open-amp version: 1.6.1 (C:/ncs/v2.8.0/modules/lib/open-amp/open-amp)
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- C_FLAGS :  -Wall -Wextra
    CMake Warning at C:/ncs/v2.8.0/zephyr/CMakeLists.txt:952 (message):
      No SOURCES given to Zephyr library: drivers__usb__device
    
      Excluding target from build.
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build
    [0/1] cmd.exe /C "cd /D D:\nRF5340_AudioDK\Exploration_linux\bap_broadcast_source_test\build\bap_broadcast_source_test && C:\ncs\toolchains\2d382dcd92\opt\bin\ninja.exe menuconfig"
    [0/1] CMakeFiles\menuconfig-5f29641.bat 8a290f6e5e7eb3a2
    Loaded configuration 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/bap_broadcast_source_test/zephyr/.config'
    No changes to save (for 'D:/nRF5340_AudioDK/Exploration_linux/bap_broadcast_source_test/build/hci_ipc/zephyr/.config')
    PS D:\nRF5340_AudioDK\Exploration_linux\bap_broadcast_source_test>

    then I arrive on the configuration menu:

    I got in Subsystems and OS Services : 

    Then Bluetooth : 

    Then I go down to Bluetooth controller which I enable : 

    Then for step 4 I go to Tx Power and change the value : 

    For step 5, I save the file in the hci_ipc image : 

    Best regards,

    Axelle

  • Hi Axelle,

    I suspect that the problem might be in the step 5. How have you modified the path and saved the configuration to hci_ipc image?

    Best regards,
    Dejan

  • Hello Dejans, 

    The automatic save configuration is for the .config file in the build/bap_broadcast_source/zephyr folder.

    In previous answers, you told me about saving the configuration for the hci_ipc image : 

    The power change should be done for the image called hci_ipc. The change you make is applied to .config file for hci_ipc image

    Therefore, I assumed these changes while saving where necessary ?

    Best regards,

    Axelle

  • Hi Axelle,

    Have you ensured that you do not do pristine build but used only regular build instead?

    Best regards,
    Dejan

Related