Class: Toybox.BluetoothLowEnergy.Device
- Inherits:
-
Toybox.Lang.Object
Overview
Represents a Bluetooth Low Energy Device that has been paired with the system.
This class cannot be instantiated, access to paired system devices is done through the use of getPairedDevices() or by calling pairDevice() after receiving a ScanResult for a device
Instance Method Summary collapse
-
getName() as Lang.String or Null
Retrieves the Name of the sensor according to the device name that is available in the GAP Service.
-
getService(uuid as BluetoothLowEnergy.Uuid) as BluetoothLowEnergy.Service or Null
Retrieves the service with a specified UUID If access to a specific service is required, use this function to directly access the service based on a UUID.
-
getServices() as BluetoothLowEnergy.Iterator
Retrieves an Iterator over the services provided by the device.
-
isBonded() as Lang.Boolean
Gets the Bonded State of the Device.
-
isConnected() as Lang.Boolean
Gets the connected status of the device.
-
requestBond() as Void
Requests that a bond is formed with the Device If the device is not currently bonded this will initiate the bonding procedure.
Instance Method Details
getName() as Lang.String or Null
Retrieves the Name of the sensor according to the device name that is available in the GAP Service
getService(uuid as BluetoothLowEnergy.Uuid) as BluetoothLowEnergy.Service or Null
Retrieves the service with a specified UUID
If access to a specific service is required, use this function to directly access the service based on a UUID.
getServices() as BluetoothLowEnergy.Iterator
Retrieves an Iterator over the services provided by the device.
This will only provide Services that have been registered using registerProfile()
isBonded() as Lang.Boolean
Gets the Bonded State of the Device
isConnected() as Lang.Boolean
Gets the connected status of the device
requestBond() as Void
Requests that a bond is formed with the Device
If the device is not currently bonded this will initiate the bonding procedure.
Once the operation is completed, onEncryptionStatus() will be called on the registered BleDelegate with the status of the operation