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.
The PHYs (TX and RX) used by the connection the peripheral is initially connected with, or null if the peripheral is not 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 phone has the bond information of the peripheral.
Whether the peripheral has the bond information of the phone.
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.
The bond state of the peripheral, as seen by the phone.
Current connection parameters.
The encryption of the link with the phone.
The peripheral identifier.
Whether the peripheral is connected.
Whether the peripheral has the bond information of the phone.
The preferred connection interval range.
The preferred slave latency.
The preferred supervision timeout.
The set of supported PHYs.
The peripheral type.
Functions
Simulates the central removing the bond information associated with the peripheral.
Simulates bonding of the phone and the peripheral.
Simulates the situation when the device is scanned and advertisement data is received.
Simulates the situation when another application on the device tries to connect 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 the peripheral forgetting the bond information, for example after a factory reset.
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.