How to set BLE TX Power in prj.conf for nrf5340

I want to set the TX power in the bluetooth/peripheral_uart example.
I looked through the other posts with similar questions but can't find a working solution.
I don't want to set it dynamically with HCI commands. Instead I would like to just set in in the prj.conf file.

According to this documentation I have to use the following commands to increase the TX power for a nrf5340 chip.

CONFIG_BT_CTLR=y
CONFIG_BT_CTLR_TX_PWR_PLUS_3=y

Apparently I also need to switch from the Nordic Softdevice Controller (SDC) to the Zephyr BT Controller according to this link. After doing that, I still only get warnings and I can't finish a pristine build.

Loading Zephyr default modules (Zephyr base).
-- Application: E:/ncs/projects/essentim/bt_peripheral_uart
-- CMake version: 3.20.5
-- Found Python3: E:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Zephyr version: 3.3.99 (E:/ncs/v2.4.1/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp_ns
-- Found host-tools: zephyr 0.16.0 (E:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (E:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found Dtc: E:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: E:/ncs/v2.4.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_ns.dts


warning: Experimental symbol BT_LL_SW_SPLIT is enabled.


warning: ENTROPY_NRF5_RNG (defined at drivers/entropy/Kconfig.nrf5:14) has direct dependencies !ENTROPY_NRF_FORCE_ALT && DT_HAS_NORDIC_NRF_RNG_ENABLED && ENTROPY_GENERATOR with value n, but is currently being y-selected by the following symbols:
 - BT_LLL_VENDOR_NORDIC (defined at subsys/bluetooth\controller\Kconfig.ll_sw_split:8), with value y, direct dependencies SOC_COMPATIBLE_NRF && !n && !n && BT_LL_SW_SPLIT && BT_CTLR && BT_HCI && BT (value: y), and select condition SOC_COMPATIBLE_NRF && !n && !n && BT_LL_SW_SPLIT && BT_CTLR && BT_HCI && BT (value: y)

error: Aborting due to Kconfig warnings

CMake Error at E:/ncs/v2.4.1/zephyr/cmake/modules/kconfig.cmake:339 (message):
  command failed with return code: 1

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1:

I'm a bit lost as other commands like "CONFIG_BT_CTLR_TX_PWR_ANTENNA =8" or "CONFIG_BT_CTLR_TX_PWR_PLUS_8" also don't work.

The only other thing that I could try would be to use the net core of the chip as hinted at at this link:

However, that would be a lot of work and I was wondering if it's possible to only use the app core in some way.

I would be very appreciative for some help!

  • Hello Matthias,

    tsaim said:
    That's correct!

    Great, I am glad to hear that! :)

    tsaim said:
    I think my problem was, that I had everything running just on the app core to keep it as simple as possible. I didn't know that usually bluetooth is handled on the netcore Slight smile So now I'll try to seperate it.

    Aha, I see!
    The Bluetooth host will be on the application core, and then the Bluetooth Controller will be on the netcore. You can read more about this split here.

    tsaim said:
    thanks for the reply!
    tsaim said:
    Thanks for the explanation and help!

    It is no problem at all! :) 
    Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

Related