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

Initial value for _requiredSecurity member of GattCharacteristic class breaks existing code #39

Closed
kellyjp opened this issue May 10, 2015 · 1 comment

Comments

@kellyjp
Copy link

kellyjp commented May 10, 2015

The constructor for GattCharacteristic implicitly initialises the value of the _requiredSecurity member to Gap::SECURITY_MODE_NO_ACCESS (0). Read requests for any characteristic will therefore fail unless there is a call to the requireSecurity method to change it to something more permissive.

As a consequence all existing code that supports reads of a characteristic value will now return an error to the client whenever the client attempts to read the characteristic value.

This breakage could be fixed by explicitly setting the value of the _requiredSecurity member to Gap::SECURITY_MODE_ENCRYPTION_OPEN_LINK in the constructor for GattCharacteristic. If more restrictive access is desired, new code that is aware of the new security features of the API can request this with a call to the requireSecurity method.

@rgrover
Copy link
Contributor

rgrover commented May 11, 2015

Thanks for this excellent root-cause analysis. This will be fixed very shortly.

jacobrosenthal pushed a commit to jacobrosenthal/ble that referenced this issue Dec 24, 2017
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