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

How to config nrf5340 tx power?

 Hello,

I want to modify the default transmit power of the nrf5340 peripheral_uart project.

board:nrf5340 dk

ncs:v1.5.0

example:v1.5.0\nrf\samples\bluetooth\peripheral_uart

I found this project v1.5.0\zephyr\samples\bluetooth\hci_pwr_ctrl

Then I transplanted the set_tx_power function to my project.

But the power remains unchanged.

Can you help me point out the correct way,I just want to modify the power.

Thank you.

Parents Reply
  • With NCS v1.5.0, the Read Tx Power is failing (as well as the Write Tx Power) when using the nRF5340.

    Here's the error message that I get for the read case (which the comment above says is supported):

    Read tx power failed (err -5, reason 0x00).
    [02:30:52.295,684] <wrn> bt_hci_core: opcode 0xfc0f pool id 8 pool 0x20000d70 != &hci_cmd_pool 0x20000d44
    [02:30:52.295,715] <wrn> bt_hci_core: opcode 0xfc0f status 0x01

    Update:  My bad.  The Read Tx Power does indeed work when using the SoftDevice.  My mistake above was that I needed to add

    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

    to the hci_rpmsg.conf file for the network core.

    The Set Tx Power works only for 0 dBm.
Children
Related