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

add Getter/Setter of the service, characteristic, and descriptor. #42

Merged
merged 1 commit into from Aug 19, 2015
Merged

add Getter/Setter of the service, characteristic, and descriptor. #42

merged 1 commit into from Aug 19, 2015

Conversation

shirou
Copy link
Contributor

@shirou shirou commented Jun 16, 2015

From previous issue, I found noble uses two tiny C programs to read/write HCI and L2CAP, and works on Intel Edison(kernel 3.10).
So that, I created noblechild which provides almost same interface to paypal/gatt via noble's C programs.
Currently, noblechild can read/write attributes. But I have to make some changes to paypal/gatt.

This PR includes some setter/getter functions to use unexported variables in Server, Characteristic, and Descriptor. No other functions are changes.
Would you please merge this PR?

Thank you!

@roylee17
Copy link
Contributor

Sorry for the late response.

In the go gatt stack, we manage at the connections at L2CAP level, and we would like exclusive control.
This could be achieved only with the HCI USER CHANNEL, which was introduced since linux v3.14. Without it, user may feel some inconsistent issue due to both kernel and our stack try to manage the connections.

For minor changes that could help us get along with older kernels are fine. But changing API to expose more implementation might not worth it in my opinion.

Thanks,
Roy

@shirou
Copy link
Contributor Author

shirou commented Jun 22, 2015

Thank you for the response.

I understand and agree about you are not support without HCI USER CHANNEL kernel. So I don't include my proxy itself into this PR. I think my proxy should be independent. This PR only includes the missing piece to get interoperability with your great stack. I try to not change your code, but I couldn't. I think this PR has only minimal changes and it does not expose so much.

I know my approach is not usual and ugly. Even so, I want to support kernel 3.10 people like Intel Edison.

I would appreciate if you would think again.

Thank you,
Shirou

@roylee17
Copy link
Contributor

Though the intention was linux-specific, but the changes in this PR are pretty platform-independent.

It somewhat promotes (exposes) implementation to the API. But I think those handles are commonly presented in other BLE stack's API as well.

Thanks!

roylee17 added a commit that referenced this pull request Aug 19, 2015
add Getter/Setter of the service, characteristic, and descriptor.
@roylee17 roylee17 merged commit b9fc93c into paypal:master Aug 19, 2015
@shirou
Copy link
Contributor Author

shirou commented Aug 20, 2015

Thank you!!

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.

None yet

2 participants