Skip to content

Enumerating service UUIDs from a ScanResult #363

@mook

Description

@mook

Hi! I was wondering if there was a way to enumerate the service UUIDs given a ScanResult; or if there was not, if opening a pull request to add something like a (a *AdvertisementPayload) ServiceUUIDs() []UUID or so might be useful. I realize that for a rawAdvertisementPayload this would mean actually constructing the UUIDs to return them, but I assume copying the logic of HasServiceUUID would be good enough?

For now I can work around it because I'm using the bluez backend (where it's advertisementFields) and I can reflect my way to the data, but that seems… not great.

For context, I'm essentially pretending to be an ESPHome bluetooth proxy, hence wanting to be able to enumerate the service UUIDs so I can send it downstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions