Skip to content

Commit 459a1d8

Browse files
james-lawrencedeadprogram
authored andcommitted
fixes bluez 0.55 service registration.
muka/go-bluetooth does some magic so you can use short UUIDs and it'll auto expand them to the full 128 bit uuid. setting these flags disables that behavior. related issues: - allows updating muka library to resolve #35 - fixes the regression the upgrade caused #46 - commit causing the regression in upstream muka/go-bluetooth@1c4c1c8
1 parent ab40fc7 commit 459a1d8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gatts_linux.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ func (a *Adapter) AddService(s *Service) error {
2424
return err
2525
}
2626

27+
// disable magic uuid generation because we send through a fully formed UUID.
28+
// muka/go-bluetooth does some magic so you can use short UUIDs and it'll auto
29+
// expand them to the full 128 bit uuid.
30+
// setting these flags disables that behavior.
31+
app.Options.UUIDSuffix = ""
32+
app.Options.UUID = ""
33+
2734
bluezService, err := app.NewService(s.UUID.String())
2835
if err != nil {
2936
return err

0 commit comments

Comments
 (0)