How to increase BLE TX POWER on nrf5340 in SDK v2.5.3?

We have a custom board with nrf5340 and we use SDK v2.5.3 for software development.

Our BLE signal strength seems too weak with the default TX Power setting.

So we would like to try different TX POWER settings but we can't figure out how to do this.

Questions:
1. Can it be set with a CONFIG parameter in the prf.config file?

2. Can it be dynamically changed in code? If yes:
 - which include file?
 - which API (function) must be used to read and write the TX Power value?
 - is there any good example code that demonstrates how to do this?

Would appreciate some advice/guidance (example code?).

Thanks!

Gerard

Parents
  • Hello,

    Please take a look at the HCI_power_control sample from the SDK. This sample demonstrates peripheral advertising with varying Tx power, which I hope will be helpful for your use case. You can find it here.

    I’m also attaching an old Devzone thread that discusses an issue with a similar implementation. This may serve as a useful reference for your project.

    Kind regards,
    Abhijith

  • Thanks for your fast response Menon.

    I was aware of the HCI_power_control example but from what I see there, it only changes the TX POWER for a particular BLE connection (so first a central needs to connect to the peripheral & then the peripheral can change its TX POWER level).

    Our nrf5340 based board is configured as a peripheral. What we need is to ALWAYS improve the BLE signal strength - especially during advertising (when there is NO BLE connection yet). So it needs to be done after BLE is initialized, just before advertising starts. 

    I looked at the old Devzone thread you referenced & tried the code BUT although it builds OK, I do not see any difference in BLE signal strength when I run

    ------
    set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV, 0, 8);
    just before 
    err = bt_le_adv_start(BT_LE_ADV_CONN_1ST30SECS, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
    ------
    Are you sure that "set_tx_power(..) will work on the nrf5340? Some of the other (old) threads I have seen on devzone seem to indicate that this will NOT work on the nrf5340. Can you confirm that it should work?
    Thanks!
    Gerard
  • Hello,

    GerardB said:
    set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV, 0, 8);

    From the shared code snippet, I can see that you are trying to set a Tx power of +8 dBm for the nRF5340, which is not supported. The transmission power range for the nRF5340 is from -40 dBm to +3 dBm, as specified in the product documentation. For higher Tx power, you may need to consider using FEMs (Front-End Modules).

    Please refer to this old Devzone thread where my colleague shares a sample for setting the Tx power in advertising mode. Note that this sample is only applicable to the nRF52 series (setting +8dbm) and is provided as a reference for implementation.

    Kind regards,

    Abhijith

Reply Children
No Data
Related