Материал из Module developer
Device.Connect
to connect to the peripheral device
Syntax
IR.CreateDevice(IR.DEVICE_BLE_DEVICE).Connect()
| input | sample | description |
| ID | IR.DEVICE_BLE_DEVICE | type: Number the identifier of the BLE scanner |
| output |
| successful or not | type: Boolean successful |
Example:
var device = IR.CreateDevice(IR.DEVICE_BLE_DEVICE); device.Сonnect() ;
A device with the property Connectable = false cannot be connected. Also the device can break connection at any moment and not provide access for data reading and writing (to support the connection you are required to perform actions described in the device protocol from the manufacturer).
It activates the event: IR.EVENT_ONLINE
