← Back to BluetoothEmulation domain

BluetoothEmulation.simulateCharacteristicOperationResponse

Simulates the response from the characteristic with |characteristicId| for a characteristic operation of |type|. The |code| value follows the Error Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The |data| is expected to exist when simulating a successful read operation response.

Domain: BluetoothEmulation experimental

Parameters

NameTypeDescription
characteristicIdstring
typeCharacteristicOperationType
codeinteger
data (optional)string

Example Request

{
  "id": 1,
  "method": "BluetoothEmulation.simulateCharacteristicOperationResponse",
  "params": {
    "characteristicId": "characteristicId-value",
    "type": "type-value",
    "code": 1
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('BluetoothEmulation.simulateCharacteristicOperationResponse', {"characteristicId": "characteristicId-value", "type": "type-value", "code": 1});
console.log(result);