Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

micropython/aioble: Place multiple UUIDs in single advertisement LTV. #787

Merged
merged 1 commit into from
May 24, 2024

Commits on May 24, 2024

  1. 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>
    xyzzy42 authored and dpgeorge committed May 24, 2024
    Configuration menu
    Copy the full SHA
    e5389eb View commit details
    Browse the repository at this point in the history