← Back to BluetoothEmulation domain
BluetoothEmulation.addService
Adds a service with |serviceUuid| to the peripheral with |address|.
Domain: BluetoothEmulation
experimental
Parameters
| Name | Type | Description |
address | string | |
serviceUuid | string | |
Returns
| Name | Type | Description |
serviceId | string | An identifier that uniquely represents this service. |
Example Request
{
"id": 1,
"method": "BluetoothEmulation.addService",
"params": {
"address": "address-value",
"serviceUuid": "serviceUuid-value"
}
}
Example Response
{
"id": 1,
"result": {
"serviceId": "serviceId-value"
}
}
Usage in Node.js
const result = await send('BluetoothEmulation.addService', {"address": "address-value", "serviceUuid": "serviceUuid-value"});
console.log(result);
// {"serviceId": "serviceId-value"}