set tx power level in nrf52810

Hello,

i am using nrf52810 and with my custom board and i want to know the tx power level of that and is it possible to change the range please let me know where to get and how to configure it??.

thank tou.

Parents Reply Children
  • Hello again,

    No need to apologize, it is no problem at all!

    It looks like the SoftDevice is rejecting the advertising handle you have passed it. Could you verify that the advertising handle is the correct one?

    Best regards,
    Karl

  • Hello,

    Actually i have used the advertising handle directly so i don't have much idea on that. In my code i declared it as first ,

    static uint8_t m_adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; 

    then i have added the code snippet 

    int8_t tx_power_level = -40;
    err_code=sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,tx_power_level);
    printf("%d\r\n",err_code);
    APP_ERROR_CHECK(err_code);

    since if any issue please let me know, i am eagerly waiting for your reply.

    thank you.

  • It seems to me that you are using the advertising library, and you thus do not have advertising handles like this directly.
    You should not have to create a separate m_adv_handle variable that will not be used anywhere - this is likely why the SoftDevice rejects it, because it is not set anywhere.
    Please try to pass m_advertising.adv_handle as the advertising handle parameter and see if it resolves your issue.

    Best regards,
    Karl

  • m_advertising.adv_handle

    Yes, without any errors my code is working now but when i kept tx power value=0 dbm in nrf mobile app it shows -48 to -50 dbm . and if i set -20dbm then it shows -68dbm to -70 dbm .i have doubt that all softdevices have 0 dbm as a default tx power value so then i can i calculate it for meters like how dbm is equal to 1 meter.??

    thank you.

  • I am happy to hear that it functions as expected now!

    sagarnayakm said:
    i can i calculate it for meters like how dbm is equal to 1 meter.??

    The Received Signal Strength Indicator (RSSI) is dependent on a lot of external factors, not just the TXPOWER, and thus it can not be used as an accurate distance measurement. It is also therefore not possible to calculate it based on the distance, since the value will fluctuate based on things like line-of-sight, RF noise, multipath, obstacles in the environment, etc.

    Best regards,
    Karl

Related