micropython-lib/micropython/bluetooth/aioble-peripheral
Trent Piepho e5389eb26a aioble/peripheral.py: Place multiple UUIDs in single advertisement LTV.
When multiple UUIDs of the same size are advertised, they should all be
listed in a single LTV.  Supplement to the Bluetooth Core Specification,
Part A, §1.1.1:  "A packet or data block shall not contain more than one
instance for each Service UUID data size."

When aioble construct the advertisement data, it is creating a new data
block for each UUID that contains only that single UUID.  Rather than,
e.g., a single 16-bit UUID block with a list of multiple UUIDs.

Not only is this against the specification, it wastes two bytes of limited
advertisement space per UUID beyond the first for the repeated data block
length and type fields.

Fix this by grouping each UUID size together.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-05-24 21:42:33 +10:00
..
manifest.py aioble/peripheral.py: Place multiple UUIDs in single advertisement LTV. 2024-05-24 21:42:33 +10:00