Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for Connection/Disconnection handler for a peripheral device #70

Open
SVdvr opened this issue Feb 20, 2023 · 1 comment
Open

Comments

@SVdvr
Copy link

SVdvr commented Feb 20, 2023

Hello,

I used the package https://github.com/go-ble/ble to develop a peripheral BLE device on an RPI, and I'd like to use your package to add pairing/bonding and secure connection to my project.

However, I can't find on your package options like OptConnectHandler() and OptDisconnectHandler(), that triggers functions each time a Central device connects/disconnects. They are available on the other package (https://pkg.go.dev/github.com/go-ble/ble#OptConnectHandler).

Do you plan to implement it, or maybe did you already replace it with something else ?

Thank you !

@estutzenberger
Copy link
Contributor

Hey @SVdvr,

Thanks for the question.

We are actively working towards some support for Bluetooth v5.4 features. At the moment, I don't think we will be able to add this to the option interface. I'm not sure of the history in https://github.com/go-ble/ble regarding these options, but my suspicion is that our fork was made before these options were merged. It's possible we removed them, though I'm unsure why we would have removed them.

We would be happy to accept a PR if you want to find the places where those are invoked in the other repository and add them in to this one.

The security implementation may not be fully suited to a peripheral implementation as we primarily use the central side. I would be happy to help look over a PR which included those updates as well.

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

No branches or pull requests

2 participants