Skip to content Skip to sidebar Skip to footer

Ble Advertise Data Size Limit

On My Addroid app I'm trying to add some extra data when I try to start ble advertising, and as I've read, advertise data must be <= 31 bytes. That's how I do it: var testData =

Solution 1:

Three flag bytes are automatically added first.

A service data packet contains first one byte that tells how long it is, followed by a one byte packet identifier that says that here comes a service data packet. Then you have the payload of the service uuid (16 bytes) followed by your UTF-8-encoded string of 10 bytes.

That sums up to 31 bytes. If you add a 'k' you get 32 bytes and hence the data becomes too long.

Post a Comment for "Ble Advertise Data Size Limit"