Skip to content

Linux: Fix unsubscribe from characteristic notifications not working#393

Merged
deadprogram merged 1 commit into
tinygo-org:devfrom
aventari:mergeback
Nov 11, 2025
Merged

Linux: Fix unsubscribe from characteristic notifications not working#393
deadprogram merged 1 commit into
tinygo-org:devfrom
aventari:mergeback

Conversation

@aventari

@aventari aventari commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Fix for issue #366

Updated gattc_linux.go to properly unsubscribe from notifications using dbus call "org.bluez.GattCharacteristic1.StopNotify" which is the companion call to "org.bluez.GattCharacteristic1.StartNotify" that is being called when subscribing.

Tested working on Pi4

smoke-tests passed:

~/smoke/bluetooth $ make smoketest-linux
# Test on Linux.
GOOS=linux go build -o /tmp/go-build-discard ./examples/advertisement
GOOS=linux go build -o /tmp/go-build-discard ./examples/connparams
GOOS=linux go build -o /tmp/go-build-discard ./examples/heartrate
GOOS=linux go build -o /tmp/go-build-discard ./examples/heartrate-monitor
GOOS=linux go build -o /tmp/go-build-discard ./examples/nusserver
go: downloading golang.org/x/crypto v0.12.0
go: downloading golang.org/x/term v0.11.0
go: downloading golang.org/x/sys v0.11.0
GOOS=linux go build -o /tmp/go-build-discard ./examples/scanner
GOOS=linux go build -o /tmp/go-build-discard ./examples/discover
~/smoke/bluetooth $

@deadprogram

Copy link
Copy Markdown
Member

Looks good thanks for working on this @aventari now merging!

@deadprogram
deadprogram merged commit 31bcba3 into tinygo-org:dev Nov 11, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants