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

How to update advertised TX power?

Using the 15.3 SDK and the 6.1 software device I am successfully changing the transmit power as needed.  When not connected and advertising I would like to update the advertised TX power initialized with:

init.srdata.p_tx_power_level

I have read multiple, multiple posts to DevZone regarding updating the advertising information but so many are out of date or links are broken.  Given advertising the transmit power must be a rather routine situation I'm assuming there is some simple way to do the update.  If there is not a simple way could you provide a complete SDK 15.3, SD 6.1 compatible method example please?  I'm sure others would appreciate a recent example.

Any help would be appreciated as we are doing a pre-production run in China in about two weeks and I would like to have this addressed.  I'm not willing to update to SDK 16.0 because of how close to pre-production date.

Sincerely,

Michael M.

Parents
  • I think you misunderstood.  As I stated, "How to update ADVERTISED TX power?"  I understand setting the transmit power will change the transmit power for advertisements but what it doesn't change is the content of the advertisement which in my case includes a custom service UUID and TX Power.

    I can rephrase this: how do I update the advertisement information contained in the advertisement packet to indicate properly the actual transmit power being used to transmit the advertisement??

  • Ah, sorry about that, I totally misread your question.

    The default transmit power is always set to 0dBm which can also be the default value you include in your advertising packet.

    The application has to manually change the advertising power whenever needed and when the application does it, it can actually change the advertising parameters when it chagnes the TX power. For example a pseudocode could be

    void lost_connection()
    {
        // attempt to increase the adv tx power to regain connection
        sd_ble_gap_tx_power_set
    
        // readjust the adv packet to reflect the above chagne    
        sd_ble_gap_adv_set_configure // look for the examples in ble_app_hrs:main.c
    }

  • I assume that you already have used sd_ble_gap_adv_set_configure to initally transmit a UUID+TX_POWER. I thought that you just wanted to know exactly when to update it. encoding your UUID+TX_Power is something you must have already done in your advertising_init function

Reply Children
No Data
Related