Please refer to the ACI document, after BlueNRG GUI is installed, it is located:
file:///C:/Program%20Files%20(x86)/STMicroelectronics/BlueNRG%20GUI%203.2.1/Docs/gui_aci_html/bluenrg_1_v2_x.html
In the description of ACI_GAP_UPDATE_ADV_DATA:
This command can be used to update the advertising data for a particular AD type. If the AD type specified does not exist, then it is added to the advertising data. If the overall advertising data length is more than 31 octets after the update, then the command is rejected and the old data is retained.
Alternately, you may choose to use (SIG standard) HCI instead of ST specific ACI: HCI_LE_SET_ADVERTISING_DATA.
The LE_Set_Advertising_Data command is used to set the data used in advertising packets that have a data field. Only the significant part of the Advertising_Data is transmitted in the advertising packets, as defined in [Vol 3] Part C, Section 11., (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.7)
This way you have 31-byte limit each time, to set the whole data.
The sequences for HCI calls for reference:
- HCI_LE_Set_Advertising_Parameters()
- HCI_LE_Set_Advertising_Data()
- HCI_LE_Set_Scan_Resp_Data()
- HCI_LE_Set_Advertise_Enable()