Closed samnbd closed 2 months ago
Note in this case, the pairing stream emits 2 disconnected states before it emits connected state when trying to connect to the device
this is not the same issue.
in your logs, it looks like you are calling
is that right?
so I dont understand. What do you expect to happen?
Note in this case, the pairing stream emits 2 disconnected states before it emits connected state when trying to connect to the device
I dont see this in your logs
please include the full logs.
I'm not calling any disconnect from my end
Also, I don't know why did you change the title ?! It's exactly the same issue that is happening in the issue that was marked as resolved here
Note in this case, the pairing stream emits 2 disconnected states before it emits connected state when trying to connect to the device
I dont see this in your logs
it's visible in the logs:
I/flutter (27345): [FBP] <disconnect> args:
D/[FBP-Android](27345): [FBP] onMethodCall: disconnect //first disconnect, this wasn't called by me
D/[FBP-Android](27345): [FBP] already disconnected //second call of disconnect, this also isn't called by me
I/flutter (27345): [FBP] <disconnect> result: false
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] <connect> args: {remote_id: CA:26:03:F6:2E:90, auto_connect: 1}
I'm not calling any disconnect from my end
D/[FBP-Android](27345): [FBP] onMethodCall: disconnect
you call it right here
Note in this case, the pairing stream emits 2 disconnected states before it emits connected state when trying to connect to the device
I dont see this in your logs
it's visible in the logs:
I/flutter (27345): [FBP] <disconnect> args: D/[FBP-Android](27345): [FBP] onMethodCall: disconnect //first disconnect, this wasn't called by me D/[FBP-Android](27345): [FBP] already disconnected //second call of disconnect, this also isn't called by me I/flutter (27345): [FBP] <disconnect> result: false
you are misinterpreting the logs. this is a single call
Also, I don't know why did you change the title ?! It's exactly the same issue that is happening in the issue that was marked as resolved here
its a different issue. his had this log:
D/[FBP-Android](30007): [FBP] disconnect: cancelling connection in progress
yours does not.
As I mentioned before, I'm not calling disconnect at all, it's being emitted by the plugin without me calling it
prove it :)
maybe you're hitting this code, the connection timeout
BmConnectionStateResponse response = await futureState
.fbpEnsureAdapterIsOn("connect")
.fbpTimeout(timeout.inSeconds, "connect")
.catchError((e) async {
if (e is FlutterBluePlusException && e.code == FbpErrorCode.timeout.index) {
await FlutterBluePlus._invokeMethod('disconnect', remoteId.str); // cancel connection attempt
}
throw e;
});
but that is only called when autoconnect is false.
closing. nothing I can do without more data from OP.
Requirements
Have you checked this problem on the example app?
Yes
FlutterBluePlus Version
1.32.12
Flutter Version
3.22.3
What OS?
Android
OS Version
13
Bluetooth Module
BLE watch
What is your problem?
The issue reported previously here was marked as resolved but I still have the same issue on the latest plugin version 1.32.12 Note that this issue happens when trying to connect a device after disconnecting it.
Logs