← Back to BluetoothEmulation domain

BluetoothEmulation.addCharacteristic

Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId|.

Domain: BluetoothEmulation experimental

Parameters

NameTypeDescription
serviceIdstring
characteristicUuidstring
propertiesCharacteristicProperties

Returns

NameTypeDescription
characteristicIdstringAn identifier that uniquely represents this characteristic.

Example Request

{
  "id": 1,
  "method": "BluetoothEmulation.addCharacteristic",
  "params": {
    "serviceId": "serviceId-value",
    "characteristicUuid": "characteristicUuid-value",
    "properties": "properties-value"
  }
}

Example Response

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

Usage in Node.js

const result = await send('BluetoothEmulation.addCharacteristic', {"serviceId": "serviceId-value", "characteristicUuid": "characteristicUuid-value", "properties": "properties-value"});
console.log(result);
// {"characteristicId": "characteristicId-value"}