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

Dynamically changing of Power level

Hello,

 

I am using nRF52840, SDK_16.0.0, SoftDevice S140 V7.0.1 and Segger for flashing the image. I am using ‘ble_app_blinky’.

 

I want to send packet with different Tx power levels over serial interface. I am using sd_ble_gap_tx_power_set() to change Tx power.

 

1) During advertisement packet, if there is a serial command to change Tx power level, will it take immediately by calling sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV).

2) Also once device is connected, it there is a serial command to change Tx power level, will it take immediately by calling sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN) or do I need to reset.

 

Thanks & Regards

Vishnu Beema

Parents
  • Hi Vishnu

    1. It should be possible to call sd_ble_gap_tx_power_set() in a connection and update it without disconnecting, but we don't have any examples doing so I'm afraid, so you'll have to implement that yourself. You can see a suggestion from my colleague here.

    2. If you want to change the TX power while in a connection you should just have to use BLE_GAP_TX_POWER_ROLE_CONN as that is the parameter updating the TX power when you're in a connection.

    Best regards,

    Simon

Reply
  • Hi Vishnu

    1. It should be possible to call sd_ble_gap_tx_power_set() in a connection and update it without disconnecting, but we don't have any examples doing so I'm afraid, so you'll have to implement that yourself. You can see a suggestion from my colleague here.

    2. If you want to change the TX power while in a connection you should just have to use BLE_GAP_TX_POWER_ROLE_CONN as that is the parameter updating the TX power when you're in a connection.

    Best regards,

    Simon

Children
No Data
Related