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

Strobe BLE tx power level

Hi all, 

I'm trying to write code for a BLE Ibeacon that changes its transmit power level after every completed advertising interval. I would like to strobe between three power levels, -4, -12, and -20dB. I've been looking around for a while on how to do this or if its even possible and haven't quite found anything on it. Anybody have experience with something like this? Where should I be looking to know when a full BLE signal has been transmitted? 

Thanks in advance

  • Hi.

    Which SDK are you using?

    If you look at for example SDK 15.2, you can set the TX power by calling sd_ble_gap_tx_power_set().

    f you are advertising, you can take a look at the examples\ble_peripheral\ble_app_proximity example.

    Here, you can see how the API is used:

    sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, TX_POWER_LEVEL);

    The first input is BLE_GAP_TX_POWER_ROLE_ADV, which is one of three options from BLE_GAP_TX_POWER_ROLES, as you can read here:

    /**@brief GAP TX Power roles.
     */
    enum BLE_GAP_TX_POWER_ROLES
    {
      BLE_GAP_TX_POWER_ROLE_ADV       = 1,           /**< Advertiser role. */
      BLE_GAP_TX_POWER_ROLE_SCAN_INIT = 2,           /**< Scanner and initiator role. */
      BLE_GAP_TX_POWER_ROLE_CONN      = 3,           /**< Connection role. */
    };

    The second input is the advertising handle,  m_advertising.adv_handle. If you are scanning you should give NULL as input, and if you are connected, you should give the connection handle as input.

    The third input is the actual TX power value, and the supported values are -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +3dBm and +4dBm.

    Where should I be looking to know when a full BLE signal has been transmitted? 

     Can you please explain more what you mean?

    Best regards,

    Andreas

Related