Skip to content

Linux: Fix: connectHandler after adv.Start#369

Merged
deadprogram merged 6 commits into
tinygo-org:devfrom
nckrss:linux-fix-adv-connecthandler
Jun 13, 2025
Merged

Linux: Fix: connectHandler after adv.Start#369
deadprogram merged 6 commits into
tinygo-org:devfrom
nckrss:linux-fix-adv-connecthandler

Conversation

@nckrss

@nckrss nckrss commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

In Linux the Adapter.connectHandler is never called after Advertisement.Start.

This fix preserves the existing interfaces and adds D-Bus signals to handle connect/disconnect events once the Peripheral is advertising.

  • Fix Linux Advertise.Start to call a connectHandler, if defined
  • Update inline documentation for Adapter.SetConnectHandler
  • Update README usage example

Potentially fixes #360 and #354.

In Linux the Adapter.connectHandler is never called after Advertisement.Start.

This fix preserves the existing interfaces and adds D-Bus signals to handle
connect/disconnect events once the Peripheral is advertising.

- Fix Linux Advertise.Start to call the connectHandler, if set
- Update inline documentation for Adapter.SetConnectHandler
- Update README usage example

Signed-off-by: Nick Ross <nick.ross@intel.com>
Comment thread README.md Outdated
Comment thread gap_linux.go Outdated
nckrss added 2 commits June 6, 2025 10:30
Comment thread README.md Outdated
Comment thread README.md Outdated
- Add alias update on adveristing
- Extend property handling for signals
- Correct README example

Signed-off-by: Nick Ross <nick.ross@intel.com>
Comment thread gap_linux.go Outdated
nckrss added 2 commits June 12, 2025 15:33
Signed-off-by: Nick Ross <nick.ross@intel.com>
Signed-off-by: Nick Ross <nick.ross@intel.com>
@deadprogram

Copy link
Copy Markdown
Member

Thanks for working on this @nckrss now squash/merging.

@deadprogram
deadprogram merged commit dc9fc3b into tinygo-org:dev Jun 13, 2025
4 checks passed
@nckrss
nckrss deleted the linux-fix-adv-connecthandler branch June 13, 2025 16:14
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