PeripheralSpec
A specification of a peripheral that can be simulated.
Use PeripheralSpec.simulatePeripheral to create a new peripheral specification.
Parameters
The peripheral identifier.
The address type of the peripheral.
The initial proximity of the peripheral.
Whether the peripheral is initially connected.
Whether the peripheral has been scanned before and its address type is cached. It is not possible to connect to an unknown device without scanning.
Whether the peripheral is bonded.
List of advertisement configurations.
The event handler that will be called for every event emulating a real peripheral.
The services available after service discovery.
The services cached on the client side.
Whether the cached services are valid.
Types
Properties
The address type of the peripheral.
The appearance of the peripheral, exposed with Appearance characteristic. See Bluetooth Assigned Numbers: link, 2.6 Appearance Values.
Current connection parameters.
The peripheral identifier.
Whether the peripheral is connected.
The maximum L2CAP MTU (Maximum Transfer Unit used on L2CAP Layer using Data Length Extension (DLE)).
The preferred connection interval range.
The preferred slave latency.
The preferred supervision timeout.
The set of supported PHYs.
The peripheral type.
Functions
Simulates the situation when the device is scanned and advertisement data is received.
Simulates the situation when another application on the device tries to connects to the device.
Simulates a connection parameters update request from the peripheral.
Simulates a situation when the peripheral is gracefully disconnecting from the device.
Simulates a change of the peripheral identifier (Device Address).
Simulates an MTU request from the peripheral.
Simulates a change in the proximity of the peripheral.
Simulates peripheral reset.
Simulates a change in the services offered by the peripheral.
Simulates a characteristic value update on the peripheral.