ArduinoBLE - bleCharacteristic.hasDescriptor()

Check if a characteristic has a particular descriptor.

Syntax

bleCharacteristic.hasDescriptor(uuid)
bleCharacteristic.hasDescriptor(uuid, index)

Parameters

  • index: index of descriptor
  • uuid: uuid (as a String)

Returns

  • true, if the characteristic has a matching descriptor,
  • otherwise false.

Example


  if (characteristic.hasDescriptor("2901")) {
    Serial.println("characteristic has description descriptor");
  }