Set transmission power - nrf5340 throughput example

Hi All,

I was evaluating the throughput of NRF5340 using the DK. I would like to set the transmission power  under 0 dBm of the peripheral device.

However, i was unable to modify the default transmission power using kconfig or apis. I have gone though other posts citing the same, but either they are out dated or not completely useful for me.

Any help would be much appreciated.

Details:

SDK Toolchain: v2.6.0

*** Booting Zephyr OS build v3.0.99-ncs1  ***
   Starting Bluetooth Throughput example
   I: SoftDevice Controller build revision:
   I: 33 78 2a 18 20 f5 61 61 |3x*. .aa
   I: a6 8b 77 60 62 83 39 2a |..w`b.9*
   I: 7c f1 14 e4             ||...


   : HW Platform: Nordic Semiconductor (0x0002)
   I: HW Variant: nRF52x (0x0002)
   I: Firmware: Standard Bluetooth controller (0x00) Version 51.10872 Build 1643454488

Thanks & best regards,

Vinu

Parents
  • Hi Vinu

    Which Kconfig parameters did you try?

    How to set the output power is described here. The critical aspect when using the nRF5340 is that you also need to set this for the network core, which is done by modifying the hci_rpmsg.conf file in the child_image subfolder of your project.  

    Best regards
    Torbjørn

  • Hi Torbjorn,

    I tried the settings  -

    CONFIG_BT_CTLR_ADVANCED_FEATURES=y
    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    CONFIG_BT_CTLR_TX_PWR_PLUS_2=y
    Let me try your steps and update you.
    regards,
    Vinu
  • Hi Vinu

    My bad, it seems hci_rpmsg has been renamed to hci_ipc, and I hadn't noticed this change. hci_ipc.conf is the correct file, as you pointed out. 

    I tested this myself based on the peripheral_uart sample, and I can see that when I change the output power in this file the RSSI will change, but I would recommend trying a much smaller value like CONFIG_BT_CTLR_TX_PWR_MINUS_20 to ensure that you can see the difference.

    Unless you are measuring in controlled settings using a spectrum analyzer a difference of only 3dB can quickly get lost in the noise. 

    VinuGopalakrishnan said:
    2. Can you tell me which is the recommended way of adjusting the TX power ( static or dynamic) ? Is using kconfig GUI the recommended method ?

    Personally I find it easiest just to change the .conf files directly in VSCode. Assuming the intellisense features are running properly the auto complete feature should help you find the right configuration. 

    Best regards
    Torbjørn

  • Thanks Torbjørn.

    Let me checkout that peripheral_uart example & get back to you.

    I was testing with nrf connect app and always the power levels remained at around -30 dBm to -45 dBm even at close proximity. I'll also checkout with a spectrum analyzer.

    So, HCI commands are not required for adjusting TX power, correct ?

    regards,

    Vinu

  • Hi Vinu

    VinuGopalakrishnan said:
    So, HCI commands are not required for adjusting TX power, correct ?

    If you just want a static power setting there is no need to send commands from the host to the controller, no. Then you can just set the output power in the controller firmware directly like I described earlier. 

    If you want to change the output power at runtime, or use different output power for different connections, advertisements etc, then it is a different story. In this case you would need to have the host instruct the controller which output power to use for each role, by sending custom HCI commands. If you are interested in this you can have a look at the HCI power control sample

    Best regards
    Torbjørn

  • Torbjørn,

    In the peripheral_uart example, I tried CONFIG_BT_CTLR_TX_PWR_MINUS_20=y with nrfConnect App. Did not see much of a difference in RSSI levels.

    Also see the warning log below. There was no hci_ipc.conf in peripheral_uart. Hope it is fine.

    Later we made the below changes in the throughput example and now we are seeing changes in TX power level.

    1. Added CONFIG_BT_CTLR_TX_PWR_MINUS_20=y in hci_ipc.conf

    2. Added CONFIG_BT_CTLR_TX_PWR_MINUS_20=y in prj.conf. ( Note: It worked without this change as well )

     

    regards,

    Vinu

  • Hi Vinu

    Essentially you need to create the child_image folder and the hci_ipc.conf file, if it doesn't exist already. 

    You should remove the CONFIG_BT_CTLR_TX_PWR_MINUS_20 config from prj.conf. Since the Bluetooth controller resides entirely in the network core the controller related configurations don't apply to the application core (prj.conf is for the application core only), and if you include it you will get a warning like you discovered. 

    Best regards
    Torbjørn

Reply
  • Hi Vinu

    Essentially you need to create the child_image folder and the hci_ipc.conf file, if it doesn't exist already. 

    You should remove the CONFIG_BT_CTLR_TX_PWR_MINUS_20 config from prj.conf. Since the Bluetooth controller resides entirely in the network core the controller related configurations don't apply to the application core (prj.conf is for the application core only), and if you include it you will get a warning like you discovered. 

    Best regards
    Torbjørn

Children
Related