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

Setup credentials? #47

Closed
oscarvgg opened this issue May 19, 2014 · 2 comments
Closed

Setup credentials? #47

oscarvgg opened this issue May 19, 2014 · 2 comments

Comments

@oscarvgg
Copy link

Hi, I'm fairly new to bluetooth development. I'm trying to read the characteristics in a Raspberry Pi from my iphone with CoreBluetooth. The problem is, I want to protect some of those characteristics from being read without authentication. I noticed there is a "secure" parameter in the Characteristic constructor, but I don't know how to set the credentials to restrict the access to it.

Thanks in advance.

@sandeepmistry
Copy link
Collaborator

The secure mode does not use credentials, it's more of a "trusted" mode, since you get a prompt.

One option would be to have a authentication service/characteristic, so if a pin code isn't written after X seconds, your app disconnects the peripheral. I have a few BLE devices that use this technique. There is also a disconnect event, that can be used to reset auth state when a device disconnects.

@sandeepmistry
Copy link
Collaborator

Closing, question answered.

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