蓝色颤振示例无法连接到 GATT 服务器



我正在尝试创建一个应用程序(在flutter/androidstudio上(,它可以连接到Ble服务器并读取他的特性。我使用了flatter_blue_example:https://github.com/pauldemarco/flutter_blue/tree/master/example。

扫描进行得很好,但当我尝试连接到BLE设备时,它不起作用,我在安卓工作室上得到以下日志:

D/BluetoothGatt( 8205): onClientConnectionState() - status=133 clientIf=8 
device=00:1A:7D:DA:71:13
D/FlutterBluePlugin( 8205): onConnectionStateChange: 
D/BluetoothGatt( 8205): close()
D/BluetoothGatt( 8205): unregisterApp() - mClientIf=8

我使用以下示例创建了我的Ble服务器:https://github.com/Jumperr-labs/python-gatt-server

问题可能来自服务器,但由于它与Play商店上的Ble扫描仪等应用程序配合良好,我认为问题更可能来自基于flutter的应用程序。

我终于发现,在启动我的应用程序之前,我必须在蓝牙参数中与设备配对。顺便说一句,刷新发现的服务仍然有问题,但我正在努力。

最新更新