-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help]: Bug: ERROR_GATT_WRITE_REQUEST_BUSY (201) on Version 1.35.0 on setCharacteristicNotification
#1102
Comments
I also encountered this problem |
@chipweinberger am I right in thinking that in theory the mutex should prevent more than one operation at a time? It looks like this issue may be caused by the previous operation not completing before the next operations starts. |
yes this is the role of the mutex. not sure why 1.35.0 would regress this |
@codercengiz would I be able to get you to confirm if you still experience this issue with the fix/1102 branch? dependency_overrides:
flutter_blue_plus_android:
git:
url: https://github.com/chipweinberger/flutter_blue_plus.git
ref: fix/1102
path: packages/flutter_blue_plus_android |
@tnc1997 , why not just keep it how we had it in 1.34.5? And why was this changed? We need to wait on all platforms, not just Android. If you dont wait on iOS, then we no longer detect failure anymore. You can see we waited for the descriptor to be written.
|
I tested with override plugin (flutter_blue_plus_android) |
I believe that we only need to wait on Android and iOS/macOS therefore this is internal platform specific behaviour. Also reviewing the iOS/macOS implementation it only appears to return |
Thank you for confirming that change fixes this issue, we will publish some patched versions to pub.dev. |
For the other platforms (just web I think), they just need to return "false", then we wont wait. Yes we could refactor it. And we probably should at some point. But let's get all the bugs worked out first. |
Btw, this fix has an issue.
It should early returns if the device is disconnected / adapter turned off, and the timeout should be configurable like this:
Also, (my goal with FBP was to always return well defined e.g. IMO, lets just update the platform interface to keep it how it was. Seems simpler. So that all platforms are more unified in their behavior. |
Of course, that sounds good to me. If you can update the platform interface how you would like it, then I would be more than happy to update the Linux and Web packages after. |
I think just this: 5e59a71 |
Looks good to me, don't forget to bump the major version of the platform interface package, as that is a breaking change. |
Now would be a good opportunity to review the platform interface for any other breaking changes that you may like to make so that they could all be combined together into a single major release. |
What is the reason to not break the platform interface? We own nearly all the platform code too. If someone else starts making platform implementations, we can have that conversation later. But for now, we can break whenever we want with zero consequnce. Literally no one will know / care haha. I don't see this situation changing anytime soon. There are almost no other platforms left to implement. TBD on Windows. But Windows should not prevent us from designing the platform interface as we see fit. We are the main users of it. Normal users will never touch it. |
This guide from the Flutter team has more information on platform interface breaking changes. As long as the major version is bumped each time then you can make as many breaking changes as you like. It is just that each breaking change that is made requires updating each federated implementation package appropriately. |
even without a major version bump, it affects no one except you and me, we are the only platform implementers right now (possibly ever). I do appreciate the link though. but seems like worrying about a problem that doesnt yet exist / probably never will IMO. |
No problem, you're welcome!
I would strongly advocate bumping the major version when any breaking changes are made as per semantic versioning. More information regarding the pub.dev best practice on package versioning can be found here for reference. If you choose not to follow semantic versioning then I would suggest documenting this in the README. |
Okay |
Also, the 1.X.X style is a badge of honor for me. You can clearly see how much work I've put into it. 35 versions! When you go to 2.0.0, it gets wiped. |
Of course, as the lead maintainer, you are entitled to version each of the packages however you would like to. The reason for my strong advocacy for semantic versioning, is that most packages across different languages follow this established convention, including Flutter packages. |
Let's use this versioning. |
As I previously advocated, many developers are familiar with and expect Flutter packages to use semantic versioning, because this is the documented standard, but ultimately you can of course version the
|
Yes let's just try 1 version number to start. It's easy to switch to semantic versioning later if we want. But it would be annoying to switch back to 1 version number after semantic versioning. |
But I'm also open to you doing whatever you want. Feel free to use semantic versioning for the other packages. im flexible |
update to 1.35.1 |
Requirements
Have you checked this problem on the example app?
No
FlutterBluePlus Version
1.35.0
Flutter Version
3.27.2
What OS?
Android
OS Version
Android 14
Bluetooth Module
esp32
What is your problem?
I was using version 1.34.5 without any issues, but after upgrading to version 1.35.0, I encountered a bug.
Here are the details:
Could you please look into this? Let me know if you need further details or additional testing.
Logs
The text was updated successfully, but these errors were encountered: