← Back to BluetoothEmulation domain

BluetoothEmulation.simulateGATTOperationResponse

Simulates the response code from the peripheral with |address| for a GATT operation of |type|. The |code| value follows the HCI Error Codes from Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.

Domain: BluetoothEmulation experimental

Parameters

NameTypeDescription
addressstring
typeGATTOperationType
codeinteger

Example Request

{
  "id": 1,
  "method": "BluetoothEmulation.simulateGATTOperationResponse",
  "params": {
    "address": "address-value",
    "type": "type-value",
    "code": 1
  }
}

Example Response

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

Usage in Node.js

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