- BLE device discovery
- Connection BLE
- BLE status
- Connection BLE state
- Discover services
- Enable notification a characteristic
- Enable indication a characteristic
- Read a characteristic
- Write a characteristic
-keep class com.hodoan.ble_sdk.** { *; }
<key>NSBluetoothAlwaysUsageDescription</key>
<string>using BLE</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>using BLE</string>
BleSdk.instance.startScan(services: ['1808'])
BleSdk.instance.stopScan()
BleSdk.instance.connect(deviceId: '...')
BleSdk.instance.connect(deviceId: '...')
BleSdk.instance.discoverServices()
BleSdk.instance.setNotification(Characteristic(
characteristicId: '...',
serviceId: '...',
properties: [],
))
BleSdk.instance.setIndication(Characteristic(
characteristicId: '...',
serviceId: '...',
properties: [],
))
BleSdk.instance.readCharacteristic(Characteristic(
characteristicId: '...',
serviceId: '...',
properties: [],
))
BleSdk.instance.readCharacteristic(CharacteristicValue(
characteristic: ...,
data: [],
))
BleSdk.instance.disconnect()
BleSdk.instance.logResult.listen((_){})
BleSdk.instance.characteristicResult.listen((_){})
BleSdk.instance.stateBluetoothResult.listen((_){})
BleSdk.instance.stateConnectResult.listen((_){})