cancel
Showing results for 
Search instead for 
Did you mean: 

TX_POWER field in advertising data

CPaul.3
Associate

Hello,

I'm currently working with a STM32WB55 and I am here because I would like to set up the advertising data with the following ad types :

  • AD_TYPE_SHORTENED_LOCAL_NAME
  • AD_TYPE_128_BIT_SERV_UUID_CMPLT_LIST

But it seems that I have not enough space. According to the doc, when we call the aci_gap_set_discoverable() function, 6 extra bytes are automatically added by the stack to the frame (ad flags, and TX_POWER).

My question : Is there a way to remove the TX_POWER field inside the advertising frame ?

I tried to use the aci_gap_delete_ad_type() function, but I got the following returned error : 0x1F (probably "AD_TYPE not found")

Thank you in advance for your support

1 REPLY 1
Remy ISSALYS
ST Employee

Hello,

Yes, you can remove the TX_POWER field inside the advertising frame by using aci_gap_delete_ad_type() function, like this:

 /* Remove the TX power level advertisement (this is done to decrease the packet size). */

 ret = aci_gap_delete_ad_type(AD_TYPE_TX_POWER_LEVEL);

 if (ret != BLE_STATUS_SUCCESS)

 {

  return ret;

 }

Add these lines after the call to aci_gap_set_discoverable function. You can look BLE_Beacon project which allow to remove the TX power level advertisement.

Best Regards