Chrome DevTools Protocol

Methods

BluetoothEmulation.addCharacteristic

Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId|.

parameters
serviceId
string
characteristicUuid
string
properties
CharacteristicProperties
Return Object
characteristicId
string

An identifier that uniquely represents this characteristic.

BluetoothEmulation.addDescriptor

Adds a descriptor with |descriptorUuid| to the characteristic respresented by |characteristicId|.

parameters
characteristicId
string
descriptorUuid
string
Return Object
descriptorId
string

An identifier that uniquely represents this descriptor.

BluetoothEmulation.addService

Adds a service with |serviceUuid| to the peripheral with |address|.

parameters
address
string
serviceUuid
string
Return Object
serviceId
string

An identifier that uniquely represents this service.

BluetoothEmulation.disable

Disable the BluetoothEmulation domain.

BluetoothEmulation.enable

Enable the BluetoothEmulation domain.

parameters
state
CentralState

State of the simulated central.

leSupported
boolean

If the simulated central supports low-energy.

BluetoothEmulation.removeCharacteristic

Removes the characteristic respresented by |characteristicId| from the simulated central.

parameters
characteristicId
string

BluetoothEmulation.removeDescriptor

Removes the descriptor with |descriptorId| from the simulated central.

parameters
descriptorId
string

BluetoothEmulation.removeService

Removes the service respresented by |serviceId| from the simulated central.

parameters
serviceId
string

BluetoothEmulation.setSimulatedCentralState

Set the state of the simulated central.

parameters
state
CentralState

State of the simulated central.

BluetoothEmulation.simulateAdvertisement

Simulates an advertisement packet described in |entry| being received by the central.

parameters
entry
ScanEntry

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.

parameters
characteristicId
string
type
CharacteristicOperationType
code
integer
data
string

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.

parameters
descriptorId
string
type
DescriptorOperationType
code
integer
data
string

BluetoothEmulation.simulateGATTDisconnection

Simulates a GATT disconnection from the peripheral with |address|.

parameters
address
string

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.

parameters
address
string
type
GATTOperationType
code
integer

BluetoothEmulation.simulatePreconnectedPeripheral

Simulates a peripheral with |address|, |name| and |knownServiceUuids| that has already been connected to the system.

parameters
address
string
name
string
manufacturerData
array[ ManufacturerData ]
knownServiceUuids
array[ string ]

Events

BluetoothEmulation.characteristicOperationReceived

Event for when a characteristic operation of |type| to the characteristic respresented by |characteristicId| happened. |data| and |writeType| is expected to exist when |type| is write.

parameters
characteristicId
string
type
CharacteristicOperationType
data
string
writeType
CharacteristicWriteType

BluetoothEmulation.descriptorOperationReceived

Event for when a descriptor operation of |type| to the descriptor respresented by |descriptorId| happened. |data| is expected to exist when |type| is write.

parameters
descriptorId
string
type
CharacteristicOperationType
data
string

BluetoothEmulation.gattOperationReceived

Event for when a GATT operation of |type| to the peripheral with |address| happened.

parameters
address
string
type
GATTOperationType

Types

BluetoothEmulation.CentralState

Indicates the various states of Central.

Allowed Values: absent, powered-off, powered-on

Type: string

BluetoothEmulation.CharacteristicOperationType

Indicates the various types of characteristic operation.

Allowed Values: read, write, subscribe-to-notifications, unsubscribe-from-notifications

Type: string

BluetoothEmulation.CharacteristicProperties

Describes the properties of a characteristic. This follows Bluetooth Core Specification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties.

Type: object

properties
broadcast
boolean
read
boolean
writeWithoutResponse
boolean
write
boolean
notify
boolean
indicate
boolean
authenticatedSignedWrites
boolean
extendedProperties
boolean

BluetoothEmulation.CharacteristicWriteType

Indicates the various types of characteristic write.

Allowed Values: write-default-deprecated, write-with-response, write-without-response

Type: string

BluetoothEmulation.DescriptorOperationType

Indicates the various types of descriptor operation.

Allowed Values: read, write

Type: string

BluetoothEmulation.GATTOperationType

Indicates the various types of GATT event.

Allowed Values: connection, discovery

Type: string

BluetoothEmulation.ManufacturerData

Stores the manufacturer data

Type: object

properties
key
integer
data
string

Manufacturer-specific data (Encoded as a base64 string when passed over JSON)

BluetoothEmulation.ScanEntry

Stores the advertisement packet information that is sent by a Bluetooth device.

Type: object

properties
deviceAddress
string
rssi
integer
scanRecord
ScanRecord

BluetoothEmulation.ScanRecord

Stores the byte data of the advertisement packet sent by a Bluetooth device.

Type: object

properties
name
string
uuids
array[ string ]
appearance
integer

Stores the external appearance description of the device.

txPower
integer

Stores the transmission power of a broadcasting device.

manufacturerData
array[ ManufacturerData ]

Key is the company identifier and the value is an array of bytes of manufacturer specific data.