paypal / gatt

Gatt is a Go package for building Bluetooth Low Energy peripherals
BSD 3-Clause "New" or "Revised" License
1.13k stars 284 forks source link

Added Indications Support for Linux implementation #31

Closed demon-xxi closed 9 years ago

demon-xxi commented 9 years ago

Please review my changes and consider merging into your repo.

Added new method Peripheral.SetIndicateValue to subscribe for gatt indications similar to notifications. For Indications though we need to send acknowledgment which is done by

p.l2c.Write([]byte{attOpHandleCnf})

Current pr contains only linux implementation. Darwin version needs more investigation as seems less documented and uses some hard-coded values instead of constants.

roylee17 commented 9 years ago

Looks good to me for the linux implementation. To make it an API available for users, you might want to:

Thanks a lot.

Roy

demon-xxi commented 9 years ago

Good catch Roy, I will do updates today.

demon-xxi commented 9 years ago

I've added method to interface and a placeholder for darwin. Also crated issue #32 to address that and the note in readme.md file. Will definitely get back to tat one when have some spare time. Seems easy to do but need to test carefully.

roylee17 commented 9 years ago

Merged, thanks!