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

Tramsmit power for advertising packet in 'ble_app_template'

Dear Sir,

I  am using SDK15. Softdevice s 132, and nrf52832.

I was working with code 'ble_app_template'.

I was trying to find out the transmit power set for the advertising packets.

When I printed the following value I got the value as zero. Is it in dBm. Is this the correct value ?Is this the default value?

1) 'p_ble_evt->evt.gap_evt.params.adv_report.tx_power'

I gave the print statement inside "ble_evt_handler()"  function

I tried printing the following value also  iside the function ble_advertising_start().

2) p_advertising->adv_params.properties.include_tx_power.

This also gives a value zero. Is this also showing correctly?Is this the default value?

Please guide me in finding out the actual transmit power for the advertising packets?

I came to know that the function "sd_ble_gap_tx_power_set"  has to be used to alter the transmit power for advertising packets..

How to use it and where to be used  if it has to work properly?

And which variable should I check to know the transmit power set for the advertising packets?

Please help me in resolving the issue.

Thanking you in advance.

with regards,

Geetha

Parents
  • When I printed the following value I got the value as zero. Is it in dBm. Is this the correct value ?Is this the default value?

     Yes, this is the default value in dBm.

    This also gives a value zero. Is this also showing correctly?Is this the default value?

    Yes, this is also the default value. 

    How to use it and where to be used  if it has to work properly?

     This devzone case could be useful. I tested using the ble_app_blinky example from the ble_peripheral folder from nrf5 SDK v15.2.0. Underneath the conn_params_init() function in main(), I added this line:

    sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,4);

    I changed the last argument from -16 dBm to 4 dBm & compared results using nRF Connect for Mobile. When scanning for devices, the RSSI of the nRF Blinky device clearly became less negative (i.e. went from -58 to -38 dBm), indicating that the signal strength while advertising increased when the output power increased.

  • Dear Sir,

    Thank you very much for your reply. I am very much happy that I could see some changes in the rssi value after changing the values..

    But still have some doubts.. Please help me to resolve the same..

    So it will not display the exact value which we are setting , Is it right?

    Since we set the power as -16dBm , I was expecting the rssi value displayed on nRFConnect App also to be -16dBm.

    It  will not come as it is?Am I correct?

    Why is it like that?

    Can you clarify the same?

    thank you very much in advance.

    with regards,

    Geetha

Reply
  • Dear Sir,

    Thank you very much for your reply. I am very much happy that I could see some changes in the rssi value after changing the values..

    But still have some doubts.. Please help me to resolve the same..

    So it will not display the exact value which we are setting , Is it right?

    Since we set the power as -16dBm , I was expecting the rssi value displayed on nRFConnect App also to be -16dBm.

    It  will not come as it is?Am I correct?

    Why is it like that?

    Can you clarify the same?

    thank you very much in advance.

    with regards,

    Geetha

Children
Related