← Back to BluetoothEmulation domain

BluetoothEmulation.addDescriptor

Adds a descriptor with |descriptorUuid| to the characteristic respresented by |characteristicId|.

Domain: BluetoothEmulation experimental

Parameters

NameTypeDescription
characteristicIdstring
descriptorUuidstring

Returns

NameTypeDescription
descriptorIdstringAn identifier that uniquely represents this descriptor.

Example Request

{
  "id": 1,
  "method": "BluetoothEmulation.addDescriptor",
  "params": {
    "characteristicId": "characteristicId-value",
    "descriptorUuid": "descriptorUuid-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "descriptorId": "descriptorId-value"
  }
}

Usage in Node.js

const result = await send('BluetoothEmulation.addDescriptor', {"characteristicId": "characteristicId-value", "descriptorUuid": "descriptorUuid-value"});
console.log(result);
// {"descriptorId": "descriptorId-value"}