Add info about discovering services
This commit is contained in:
@@ -138,6 +138,8 @@ UniversalBle.onConnectionChanged = (String deviceId, BleConnectionState state) {
|
||||
|
||||
### Discovering Services
|
||||
|
||||
After establishing a connection, you need to discover services. This method will discover all services and their characteristics.
|
||||
|
||||
```dart
|
||||
// Discover services of a specific device
|
||||
UniversalBle.discoverServices(deviceId);
|
||||
@@ -145,6 +147,8 @@ UniversalBle.discoverServices(deviceId);
|
||||
|
||||
### Reading & Writing data
|
||||
|
||||
You need to first [discover services](#discovering-services) before you are able to read and write to characteristics.
|
||||
|
||||
```dart
|
||||
// Read data from a characteristic
|
||||
UniversalBle.readValue(deviceId, serviceId, characteristicId);
|
||||
|
||||
Reference in New Issue
Block a user