connectable
Makes the device connectable, but not connected at the moment of initialization.
This method should be used to mock a peripheral seen for the first time, that is one which wasn't scanned, bonded or connected before.
No services will be cached on the client side.
Parameters
The name of the peripheral, available from Device Name characteristic.
The appearance of the peripheral, available from Appearance characteristic. See Bluetooth Assigned Numbers: link, 2.6 Appearance Values.
The min and max connection interval, in 1.25 ms units. Valid range is from 6 (7.5ms) to 3200 (4000ms). Default is 25-40 (30-50 ms).
Slave latency. Valid range is from 0 to 499. Default is 0.
Supervision timeout in 10 ms units. Valid range is from 10 (0.1s) to 3200 (32s). Default is 400 (4 s).
The maximum supported ATT MTU (Maximum Transfer Unit). This value must be in range 23..517.
The maximum supported L2CAP MTU (Maximum Transfer Unit used on L2CAP Layer using Data Length Extension (DLE)). This value must be in range 27..251.
Whether the device supports PHY LE 2M.
Whether the device supports PHY LE Coded.
The event handler that will be called for every event emulating a real peripheral.
The services available after service discovery.
Makes the device connectable, but not connected at the moment of initialization.
This method should be used to mock a peripheral that was connected before, so some services may be cached on the client side. It is also possible to mock a situation in which the cached services are invalid and will return an error when accessed, in which case they need to be invalidated (i.e. using Service Changed characteristic) and discovered again.
Parameters
The name of the peripheral, available from Device Name characteristic.
The appearance of the peripheral, available from Appearance characteristic. See Bluetooth Assigned Numbers: link, 2.6 Appearance Values.
The min and max connection interval, in 1.25 ms units. Valid range is from 6 (7.5ms) to 3200 (4000ms). Default is 25-40 (30-50 ms).
Slave latency. Valid range is from 0 to 499. Default is 0.
Supervision timeout in 10 ms units. Valid range is from 10 (0.1s) to 3200 (32s). Default is 400 (4 s).
The maximum supported ATT MTU (Maximum Transfer Unit). This value must be in range 23..517.
The maximum supported L2CAP MTU (Maximum Transfer Unit used on L2CAP Layer using Data Length Extension (DLE)). This value must be in range 27..251.
Whether the device supports PHY LE 2M.
Whether the device supports PHY LE Coded.
Whether the peripheral is bonded.
The event handler that will be called for every event emulating a real peripheral.
The services available after service discovery. If null (default), they are set to be equal to cachedServices.
The services that are cached and will be returned immediately on service discovery without the discovery. They may differ from the actual services. On some platforms a client may invalidate cache and trigger full service discovery.