bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

Device.DiscoverServices should allow for multiple service definitions with the same UUID

Open ScottDuckworth opened this issue 1 year ago • 0 comments

Per the GATT reference, part G, section 3.1:

A device or higher level specification may have multiple service definitions and may have multiple service definitions with the same service UUID.

However, this is not supported by this library, at least not for the implementations of Device.DiscoverServices found in gattc_linux.go, gattc_darwin.go, and gattc_hci.go. Each of these implementations store the services in a map keyed by UUID, which prevents multiple definitions with the same UUID.

It looks like the implementation in gattc_windows.go might work in this case, though I haven't tested it.

ScottDuckworth avatar Jul 13 '24 07:07 ScottDuckworth