2022-02-07 01:05 AM
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 :
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
2022-03-10 09:03 AM
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