Closed amirsuwal01 closed 10 months ago
update to 1.15.8 & post all logs, not just the error
The issue is resolved once the ble is disconnected properly.
@amirsuwal01 What do you mean by disconnect properly?
he is referring to a bug in FBP that has been fixed
FBP was not updating its internal state, so it thought it was still connected but it wasn't
@chipweinberger Possible this is still happening? I was running perfectly fine with my BLE arduino code, then out of nowhere started getting these errors:
E/flutter ( 3650): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FlutterBluePlusException | writeCharacteristic | fbp-code: 1 | Timed out after 15s
E/flutter ( 3650): #0 FutureTimeout.fbpTimeout.<anonymous closure> (package:flutter_blue_plus/src/utils.dart:71:7)
E/flutter ( 3650): #1 _RootZone.run (dart:async/zone.dart:1655:54)
E/flutter ( 3650): #2 Future.timeout.<anonymous closure> (dart:async/future_impl.dart:942:34)
E/flutter ( 3650): #3 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
E/flutter ( 3650): #4 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
E/flutter ( 3650): #5 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
E/flutter ( 3650): #6 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
FlutterBluePlus Version
^1.15.1
Flutter Version
3.10.5
What OS?
Android
OS Version
10
Bluetooth Module
Nordic
What happened?
I tried with a timeout of 15 and 30 but was not able to discover the services...Sometimes it does discover services in a defined time. I connect the BLE directly via the Device address. Here is BLE device: {remoteId: device address, localName: dice, type: BluetoothDeviceType.le, isDiscoveringServices: false, services: null}
Even if i disconnect the device and connect again..It couldnt discover services.
Logs