Problem
DeviceCharacteristic currently does not expose the properties of the underlying BLE characteristic.
On Darwin, CoreBluetooth provides CBCharacteristic.properties, which contains information about the operations supported by a characteristic, such as:
- Read
- Write
- Write Without Response
- Notify
- Indicate
Applications communicating with BLE peripherals may need this information to select the appropriate operation. For example, a peripheral may support Write Without Response but not Write.
Proposed solution
Expose the characteristic properties through DeviceCharacteristic, allowing callers to inspect the supported operations.
For Darwin, this could initially be exposed through:
func (c DeviceCharacteristic) Properties() cbgo.CharacteristicProperties
This would allow callers to check properties such as:
properties := characteristic.Properties()
if properties&cbgo.CharacteristicPropertyWriteWithoutResponse != 0 {
// Write without response
}
Problem
DeviceCharacteristiccurrently does not expose the properties of the underlying BLE characteristic.On Darwin, CoreBluetooth provides
CBCharacteristic.properties, which contains information about the operations supported by a characteristic, such as:Applications communicating with BLE peripherals may need this information to select the appropriate operation. For example, a peripheral may support
Write Without Responsebut notWrite.Proposed solution
Expose the characteristic properties through
DeviceCharacteristic, allowing callers to inspect the supported operations.For Darwin, this could initially be exposed through:
This would allow callers to check properties such as: