LayrzBlePluginLinux class
Methods
-
checkCapabilities()
→ Future<BleCapabilities>
-
checkCapabilities checks if the device supports BLE.
override
-
connect({required String macAddress})
→ Future<bool?>
-
connect connects to a BLE device.
override
-
disconnect()
→ Future<bool>
-
disconnect disconnects from any connected BLE device.
override
-
discoverServices({Duration timeout = const Duration(seconds: 30), List<String>? serviceUuids})
→ Future<List<BleService>?>
-
discoverServices discovers the services of a BLE device.
override
-
log(String message)
→ void
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
readCharacteristic({required String serviceUuid, required String characteristicUuid, Duration timeout = const Duration(seconds: 30)})
→ Future<Uint8List?>
-
readCharacteristic reads the value of a BLE characteristic.
The return value is the raw bytes of the characteristic.
override
-
setMtu({required int newMtu})
→ Future<int?>
-
setMtu sets the MTU size for the BLE connection.
The MTU size is the maximum number of bytes that can be sent in a single packet, also, MTU means
Maximum Transmission Unit and it is the maximum size of a packet that can be sent in a single transmission.
override
-
startNotify({required String serviceUuid, required String characteristicUuid})
→ Future<bool?>
-
startNotify starts listening to notifications from a BLE characteristic.
To stop listening, use stopNotify method and to get the notifications, use onNotify stream.
override
-
startScan({String? macAddress, List<String>? servicesUuids})
→ Future<bool?>
-
startScan starts scanning for BLE devices.
override
-
stopNotify({required String serviceUuid, required String characteristicUuid})
→ Future<bool?>
-
stopNotify stops listening to notifications from a BLE characteristic.
override
-
stopScan()
→ Future<bool?>
-
stopScan stops scanning for BLE devices.
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
writeCharacteristic({required String serviceUuid, required String characteristicUuid, required Uint8List payload, Duration timeout = const Duration(seconds: 30), required bool withResponse})
→ Future<bool>
-
writeCharacteristic sends a payload to a BLE characteristic.
override