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?

Parents
  • Hi,

    Which board do you use?

    Do you use bap_broadcast_source sample in NCS v2.8.0?

    Can you show your build command?

    Best regards,
    Dejan

  • Hi, 

    I am working with pan_1783_evb and yes I use  bap_broadcast_source sample in NCS v2.8.0.

    My build command is the following : west build -b pan1783_evb/nrf5340/cpuapp

    Best regards,

    Axelle

  • 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

Reply Children
  • Hello Dejans, 

    Yes I have, I use the nRF Connect extension on VScode (nRF Connect SDK and Toolchain) to build the project.

    Best regards,

    Axelle

  • Hi Axelle,

    Have you done re-build (not pristine) after saving required setting to .config?

    Best regards,
    Dejan

  • Hello Dejans,

    Yes I have and I just did it again to check another time but I'm still left with an error. 

    I do think my issue comes from this part : 

    You need to ensure that you are starting menuconfig for particular image you want, in your case for hci_ipc.

    Can you show me the detailed steps you do to make it work so I can try to replicate it ?

    Best regards,

    Axelle

  • Hi Axelle,

    Axelle said:
    Can you show me the detailed steps you do to make it work so I can try to replicate it ?

    I can try to do that, but can you first try to start menuconfig by running "west build -t menuconfig" from the hci_ipc directory which is inside the build folder? Does this make any difference in your case?

    Best regards,
    Dejan

  • Hi Dejans, 

    It gives me another error linked to where the project is installed on my device. 

    PS D:\nRF5340_AudioDK\Exploration_linux\bap_broadcast_source\build\hci_ipc> west build -t menuconfig
    Traceback (most recent call last):
      File "<frozen runpy>", line 198, in _run_module_as_main
      File "<frozen runpy>", line 88, in _run_code
      File "C:\ncs\toolchains\b620d30767\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\west\app\main.py", line 1085, in main
        app.run(argv or sys.argv[1:])
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\west\app\main.py", line 244, in run
        self.run_command(argv, early_args)
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\west\app\main.py", line 505, in run_command
        self.run_extension(args.command, argv)
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\west\app\main.py", line 654, in run_extension
        self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\west\commands.py", line 194, in run
        self.do_run(args, unknown)
      File "C:\ncs\v2.8.0\zephyr\scripts\west_commands\build.py", line 236, in do_run
        self._sanity_check()
      File "C:\ncs\v2.8.0\zephyr\scripts\west_commands\build.py", line 490, in _sanity_check
        self._sanity_check_source_dir()
      File "C:\ncs\v2.8.0\zephyr\scripts\west_commands\build.py", line 472, in _sanity_check_source_dir
        srcrel = os.path.relpath(self.source_dir)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen ntpath>", line 783, in relpath
    ValueError: path is on mount 'C:', start on mount 'D:'
    PS D:\nRF5340_AudioDK\Exploration_linux\bap_broadcast_source\build\hci_ipc> 

    I can only run this command from the D:\nRF5340_AudioDK\Exploration_linux\bap_broadcast_source\ directory.

    Best regards,

    Axelle

Related