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

Pairing #5

Closed
zdennis opened this issue Dec 16, 2013 · 6 comments
Closed

Pairing #5

zdennis opened this issue Dec 16, 2013 · 6 comments

Comments

@zdennis
Copy link

zdennis commented Dec 16, 2013

Is it possible to force pairing with bleno (and to subsequently pair successfully)?

And... awesome project. Used it today to test out a firmware change for some hardware and it saved me a ton of time and frustration.

@sandeepmistry
Copy link
Collaborator

Sweet, thanks!

Which OS are you running bleno on? At this time secure reads/writes for characteristics are not supported. To add support for OS X is not too bad, however Linux is more work, but it would be nice if both are supported at the same time.

@zdennis
Copy link
Author

zdennis commented Dec 17, 2013

I'm running bleno on a RaspberryPi. I had to manually install node 0.10.23, but after that everything else installed fairly easily.

If there are any docs for secure reads/writes on OSX and/or Linux that you know of I'd love to be pointed in a direction. But if not no worries, I can always work on my google-fu. Thanks again @sandeepmistry for bleno!

@zdennis zdennis closed this as completed Dec 17, 2013
@sandeepmistry
Copy link
Collaborator

I'll take another look at this on Linux on the weekend.

For OS X, you would need to add the appropriate masks:

    CBAttributePermissionsReadEncryptionRequired    = 0x04,
    CBAttributePermissionsWriteEncryptionRequired   = 0x08

to the permission here.

Linux is a bit trickier since bleno has a built in ATT/GATT stack, you'd have to track down how BlueZ sets the socket security level (here's a good place to start).

@sandeepmistry sandeepmistry reopened this Dec 17, 2013
@sandeepmistry
Copy link
Collaborator

@zdennis I've added initial secure support in these commits: a94018d...19c9106. You'll have to try out the version from master until I publish a new version to npm.

Linux appears to be working well, however OS X has some issues at the OS/blued level (I couldn't get secure read/write/notify going via Objective-C + CoreBluetooth, but the same code works on iOS).

@zdennis
Copy link
Author

zdennis commented Jan 2, 2014

Thanks @sandeepmistry ! I've been away on holiday, but am back now. I will check this out.

With regard to getting secure read/write/notify with ObjectiveC. Are you talking about having the peripheral be on OSX or with regard to having an OSX central be able to successfully pair/bond with a linux-based peripheral that had secure set on read/write/notify?

@sandeepmistry
Copy link
Collaborator

Things are working on Linux as both a central (via noble) and a peripheral (via bleno).

On OS X the central has no issues with secure read/write/notify with security of medium. However, I couldn't get OS X 10.9 to work with security in peripheral mode. If you be great if you could try that out.

rzr pushed a commit to CrossStream/bleno that referenced this issue Oct 3, 2020
rzr added a commit to CrossStream/bleno that referenced this issue Oct 3, 2020
…isconn_complete_events

Fixes noble#5: ignore unrelated disconn_complete events
rzr pushed a commit to CrossStream/bleno that referenced this issue Nov 4, 2020
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