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

How do you set Tx power for all power roles

I would like to set the tx power for all roles such that the nRF52840 (s140) never transmits anything above my specified level. This includes advertisements, past connections, future connections, etc.

I have the following code to accomplish this:

sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, BLE_CONN_HANDLE_INVALID, transmitPower);
sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_SCAN_INIT, BLE_CONN_HANDLE_INVALID, transmitPower);
sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, BLE_CONN_HANDLE_INVALID, transmitPower);

Does this cover everything? I don't want to have to set this for each connection/advertisement handle.

Parents Reply Children
No Data
Related