Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ensuring ble stack ready to readme #305

Merged
merged 1 commit into from
Jul 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ _ble.statusStream.listen((status) {

Use ` _ble.status` to get the current status of the host device.

See [BleStatus](https://github.com/PhilipsHue/flutter_reactive_ble/blob/master/lib/src/model/ble_status.dart) for
more info about the meaning of the different statuses.

### Establishing connection

To interact with a device you first need to establish a connection:
Expand Down Expand Up @@ -216,7 +219,13 @@ In case you are using ProGuard add the following snippet to your `proguard-rules
-keep class com.signify.hue.** { *; }
```

This will prevent issues like [#131](https://github.com/PhilipsHue/flutter_reactive_ble/issues/131) .
This will prevent issues like [#131](https://github.com/PhilipsHue/flutter_reactive_ble/issues/131).

#### Why doesn't the BLE stack directly connect to my peripheral

Before you are able to execute BLE operations the BLE-stack of the device makes sure everything is setup correctly and then reports ready for operation. For some devices this takes a bit longer than for others. When starting the app make sure that the BLE-stack is properly initialized before you execute BLE operations. The safest way to do this is by listening to the `statusStream` and wait for `BleStatus.ready`.

This will prevent issues like [#147](https://github.com/PhilipsHue/flutter_reactive_ble/issues/147).

#### Unofficial example apps

Expand Down