Comments (2)
@andrewknockin I wouldn't call your code correct (I wouldn't expect the result you're describing anyway, but let's eliminate issues one by one).
Your sendString(ยท)
function is asynchronous, but you're not waiting for its call to complete, before making another:
void sendInitialCommands() async {
print("====sendInitialCommands");
sendString('y');
sendString('x');
sendString('h');
print("=======================");
}
should be
Future<void> sendInitialCommands() async {
print("====sendInitialCommands");
await sendString('y');
await sendString('x');
await sendString('h');
print("=======================");
}
I suggest you to check whether the corrected code works for you, before we look into the other possible causes of the issue.
from flutter_reactive_ble.
Thank you very much @werediver. Adding the await solves the problem.
from flutter_reactive_ble.
Related Issues (20)
- Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo={NSLocalizedDescription=The connection has timed out unexpectedly.} HOT 5
- Deinitialize in onDetachedFromEngine on Android, foreground service problem
- Question: Higher version of RxAndroidBle 1.11.1 safe to use? HOT 1
- Android 12+ writeCharacteristic error can't discover service / service_discovery_failure / HOT 1
- Find out if the BLE connection is encrypted HOT 1
- Conflict Between MyApplication and Flutter_reactive_blue about protobuf HOT 1
- Help filtering search results by a specific service HOT 1
- iOS will not connect to peripheral that removed the bond information. HOT 2
- iOS - no data on subscription just before disconnect from device
- CBATTErrorDomain:10, The attribute could not be found HOT 2
- Published plugin version 5.2.0 does not support federated plugin correctly HOT 1
- Major and Minor values
- MTU Negotiation wrong exchange HOT 10
- manufacturerData is not being updated fast enough
- Clone Example App not running HOT 1
- App crash - exception could not be delivered HOT 1
- Demo App for nRF52 DK UART HOT 2
- Cant connect after bluetooth is off/on HOT 1
- Choose between notifications or indications HOT 1
- No response value for long commands.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_reactive_ble.