Skip to content

Expose BLE characteristic properties through DeviceCharacteristic #465

Description

@dhruv4023

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
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions