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

  • 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

    You should not need all those configuration parameters anymore, the system has been simplified in later updates. 

    Just let me know once you have been able to test this. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    The file inside child_image dir is hci_ipc.conf and not hci_rpmsg.conf in my case. 

    Anyway i modified both kconfig and hci_ipc.conf manually with

    CONFIG_BT_CTLR_TX_PWR_PLUS_3=y , but not much difference in RSSI levels.
    1. Should i use hci commands like -  set_tx_power(uint8_t handle_type, uint16_t handle, int8_t tx_pwr_lvl) and manually set the TX power level? 

    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 ?

    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

Related