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

Client implementation #30

Closed demon-xxi closed 9 years ago

demon-xxi commented 9 years ago

First of all, this is an awesome work guys! Thank you for sharing this library. As I see current code now targets gatt sever implementation and part of discovery only. Are there any plans to add methods to Peripheral and Characteristic classes to perform client operations like Read/Write and subscribe to notifications?

demon-xxi commented 9 years ago

Closing the issue as it is currently supported. Located not in Characteristic but in Peripheral interface.

    // ReadCharacteristic retrieves the value of a specified characteristic.
    ReadCharacteristic(c *Characteristic) ([]byte, error)

    // ReadDescriptor retrieves the value of a specified characteristic descriptor.
    ReadDescriptor(d *Descriptor) ([]byte, error)

    // WriteCharacteristic writes the value of a characteristic.
    WriteCharacteristic(c *Characteristic, b []byte, noRsp bool) error

    // WriteDescriptor writes the value of a characteristic descriptor.
    WriteDescriptor(d *Descriptor, b []byte) error

    // SetNotifyValue sets notifications or indications for the value of a specified characteristic.
    SetNotifyValue(c *Characteristic, f func(*Characteristic, []byte, error)) error