← Back to BluetoothEmulation domain

BluetoothEmulation.simulateDescriptorOperationResponse

Simulates the response from the descriptor with |descriptorId| for a descriptor 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
descriptorIdstring
typeDescriptorOperationType
codeinteger
data (optional)string

Example Request

{
  "id": 1,
  "method": "BluetoothEmulation.simulateDescriptorOperationResponse",
  "params": {
    "descriptorId": "descriptorId-value",
    "type": "type-value",
    "code": 1
  }
}

Example Response

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

Usage in Node.js

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