This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changing TX Power and PHY in NCS Example at Runtime

Hello,

I am using NCS v1.6.0 with the nRF52833 DK and would like to modify the TX power (e.g. from 0 to +4 dBm) and PHY (e.g. from 1Mbps to Coded PHY) in the peripheral_uart example with runtime function calls (not Kconfig). I am looking for something similar to the sd_ble_gap_tx_power_set and sd_ble_gap_phy_update function calls that we had with nRF5 SDK.

Can you please provide a modified version of the example that illustrates this? Are these function calls different if I use the Zephyr Controller vs. the SoftDevice Controller? If so, please provide an example showing each of them. 

Regards,

Akash Patel

Parents Reply
  • Hi Hung,

    Have you tried the throughput example in \nrf\samples\bluetooth\throughput ? 
    In the example you can find the API to request PHY update or data length update. 

    Thanks, looks like the function to focus on is bt_conn_le_phy_update being set by the shell command here. 

    For TX Power you can call 
    bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL, buf, &rsp);

    Please have a look here: github.com/.../hci_pwr_ctrl

    I have looked at this example before but from my understanding, this is only relevant if I am using the Zephyr controller. Is that correct? Also how is that API compatible with the Throughput Example? Can you show where and how it would be implemented in that example?

    Please also answer this:

    Are these function calls different if I use the Zephyr Controller vs. the SoftDevice Controller?

    Regards,

    Akash

Children
Related