Skip to content

Regression in service discovery #511

@timokroeger

Description

@timokroeger

WebBluetooth API cannot connect to devices running trouble from main branch.
I have tested this with different windows machines running edge browser.

Connection failed: NetworkError: Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.

When I revert #446 the service discovery works again.

During debugging I also found that handle alignement logic is not required:

// Jump to next 16-aligned
self.table.handle = self.table.handle + (0x10 - (self.table.handle % 0x10));

Simply incrementing the handle works just aswell.
Is there a reason we do the 16-alignment? If not I’ll open a pull request for it.

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