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

sd_ble_gap_tx_power_set not working

Hello! I'm using nRF5_SDK_15.0.0_a53641a to programm my Nordic NRF52832 with Segger Embedded Studio.

I'm trying to increase the BLE Tx power to 4dBm. At the moment I've tried the following:

1. CHANGING THE TX POWER AFTER INIT SEQUENCE RIGHT BEFORE THE MAIN LOOP

[... init stuff ...]

err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_SCAN_INIT, BLE_CONN_HANDLE_INVALID, -20); APP_ERROR_CHECK(err_code); 
for (;;) {

}

RESULT: Absolute no change in advertising RSSI signal value

2. CHANGING THE TX POWER WHEN INITIALIZING ADVDATA

static void advertising_init(void) {

[...]
uint8_t power_level = 4; 
init.advdata.p_tx_power_level = &power_level;
[...]
}

RESULT: Absolute no change in advertising RSSI signal value

3. CHANGING THE TX POWER AFTER CONNECTING TO BLE DEVICE

case BLE_GAP_EVT_CONNECTED:

 

[...]
err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, m_conn_handle, 4);

APP_ERROR_CHECK(err_code);


RESULT: Absolute no change in RSSI Signal value after connection

Am I missing something here???

Parents
  • I find that if I call like this (S140):

      err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV , m_advertising.adv_handle, -40);

    It affected my advertising power as a peripheral, as I would expect.

    My question is if this power setting is automatically carried over to connection, or I have to explicitly set again (assuming I want the same)?

Reply
  • I find that if I call like this (S140):

      err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV , m_advertising.adv_handle, -40);

    It affected my advertising power as a peripheral, as I would expect.

    My question is if this power setting is automatically carried over to connection, or I have to explicitly set again (assuming I want the same)?

Children
No Data
Related