![](/img/trans.png)
[英]How to receive data from an Arduino-based Bluetooth device in Flutter
[英]Read response from Flutter Bluetooth device
我正在使用 Flutter Blue 写入设备(在本例中为 tx),它会自动在 tx 引脚上(在本例中为 rx)发回带有 List 的响应。 我如何阅读回复? 我总是像 null 一样获得价值。 设备将发送多个 20 字节长度的数据包。
getBackgroundFunction() async {
await _tx.write(setSetting, withoutResponse: false);
List<int> value = await _rx.read();
print(value);
}
我也试过:
getBackgroundFunction() async {
List<int> value = await _tx.write(setSetting, withoutResponse: false);
print(value);
}
Flutter 蓝色有维修问题。 我选择了 Flutter_Reactive_Ble,它由 Phillips 的开发人员支持并且非常稳定。 那里不会发生此错误。
会推荐任何在这里导航的人也这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.