Skip to content

Characteristic Reading

Dariusz Seweryn edited this page Feb 2, 2018 · 3 revisions

To read a characteristic one must call one of functions:

characteristic.read(transactionId: ?TransactionId): Promise<Characteristic>

or

device.readCharacteristicForService(
  serviceUUID: UUID,
  characteristicUUID: UUID,
  transactionId: ?TransactionId
): Promise<Characteristic>

or

bleManager.readCharacteristicForDevice(
  deviceIdentifier: DeviceId,
  serviceUUID: UUID,
  characteristicUUID: UUID,
  transactionId: ?TransactionId
): Promise<Characteristic>
  • transactionId: TransactionId—optional TransactionId which can be used in bleManager.cancelTransaction() function.
  • serviceUUID: UUID—the UUID of service that contains the characteristic to read
  • characteristicUUID: UUID—the UUID of characteristic to read

The promise is resolved when the value of the characteristic is successfully read