Skip to main content

Module bluetooth_emulation

Module bluetooth_emulation 

Source
Expand description

This domain allows configuring virtual Bluetooth devices to test the web-bluetooth API.

Method names for the BluetoothEmulation domain, for use with CdpClient::call.

This domain is experimental and may change without notice.

Constantsยง

ADD_CHARACTERISTIC
Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId|.
ADD_DESCRIPTOR
Adds a descriptor with |descriptorUuid| to the characteristic respresented by |characteristicId|.
ADD_SERVICE
Adds a service with |serviceUuid| to the peripheral with |address|.
DISABLE
Disable the BluetoothEmulation domain.
ENABLE
Enable the BluetoothEmulation domain.
REMOVE_CHARACTERISTIC
Removes the characteristic respresented by |characteristicId| from the simulated central.
REMOVE_DESCRIPTOR
Removes the descriptor with |descriptorId| from the simulated central.
REMOVE_SERVICE
Removes the service respresented by |serviceId| from the simulated central.
SET_SIMULATED_CENTRAL_STATE
Set the state of the simulated central.
SIMULATE_ADVERTISEMENT
Simulates an advertisement packet described in |entry| being received by the central.
SIMULATE_CHARACTERISTIC_OPERATION_RESPONSE
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.
SIMULATE_DESCRIPTOR_OPERATION_RESPONSE
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.
SIMULATE_GATT_DISCONNECTION
Simulates a GATT disconnection from the peripheral with |address|.
SIMULATE_GATT_OPERATION_RESPONSE
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.
SIMULATE_PRECONNECTED_PERIPHERAL
Simulates a peripheral with |address|, |name| and |knownServiceUuids| that has already been connected to the system.