← Back to BluetoothEmulation domain
BluetoothEmulation.addCharacteristic
Adds a characteristic with |characteristicUuid| and |properties| to the
service represented by |serviceId|.
Domain: BluetoothEmulation
experimental
Parameters
| Name | Type | Description |
serviceId | string | |
characteristicUuid | string | |
properties | CharacteristicProperties | |
Returns
| Name | Type | Description |
characteristicId | string | An 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"}