A BLE advertisement can send out 31 bytes at max. Inside an advertisement, there might be several ADs.
I'm wondering whether it is valid to make an advertisement contains just one Manufacturer Specific Data AD, and whether this kind of AD can fill up all the 31 bytes(1 byte of length field, 1 byte of type field(0xff), 2 bytes of CIC and 27 bytes of custom data).
Is the Bluetooth Core Specification or any other specification specify this?
From the spec- Supplement to the Bluetooth Core Specification Version 4 Part A 1.4:
1.4.1 Description
The Manufacturer Specific data type is used for manufacturer specific data. The first two data octets shall contain a company identifier code from the Assigned Numbers - Company Identifiers document. The interpretation of any other octets within the data shall be defined by the manufacturer specified by the company identifier.
1.4.2 Format Data Type <>
Description: Size: 2 or more octets The first 2 octets contain the Company Identifier Code followed by additional manufacturer specific data
Table 1.4: Manufacturer Specific Data Type
So there is no limit except the advertising packet length itself, which is 31 bytes per advertising data and another 31 bytes for scan response.
There is the requirement for the 3 bytes at the beginning of advertising data that have the Flags ad type (required for any non-zero length advertising, see Core V4.0 Volume 3 Part C 11.1.3), reducing your advertising data length by 3.
Then there is the manufacturing ad type flags and length that get added to your manufacturing data, minus another 2 bytes. This leaves you with:
for manufacturing data itself (although two of those bytes should be used for specifying the Company Identifier Code) which would bring it to:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With