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.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.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.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.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.