-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
bluetooth.connect with autoDiscoverAll hangs on iOS for BT Assigned Numbers #256
Comments
PR created in forked repo (I don't have access to this repo): I'm testing it now... |
my local testing passed. I'm not sure how to automate the testing. Since, it required physical BLE device and physical iPhone to get the result... Anyway, could you please review the code and consider if/how to merge this into a future version 🙏 Here's my forked code with an open PR for consideration: Thanks 🙌 |
@two-bridges i like the fact that you now compare long and short. Seems safer. Though what s weird is that I know for sure it was working for me for battery and other BAN. Might it be in a new iOS version? |
Yeah I have been using this plugin for a while and this issue was new for me... There are two things that have changed on my side that could have caused this:
I cannot tell if (1) or (2) caused this issue, since they have both changed since I last did a build.
cool cool. I think this is the way to go too... should be backwards compatible |
oh yeah, I've worked it out... will create the PR from my fork shortly thanks for the great plugin 🙌 |
I'm investigating an issue where bluetooth.connect() fails to resolve the promise when a serviceUUID falls under the Bluetooth Assigned Numbers list:
my project versions:
the call to bluetooth.connect():
I have tracked the problem down to:
https://github.com/nativescript-community/ble/blob/master/src/bluetooth.ios.ts#L1643-L1644
the issue is the following comparison fails:
args.serviceUUID is being be modified by the decorator
prepareArgs()
to a "Short UUID", if the service's UUID matches a Bluetooth Assigned Number of the formhowever, sUUID returned by
CBUUIDToString(service.UUID)
is a "Long UUID"Long vs Short UUIDs:
I'll work on a fix and submit a PR today hopefully...
The text was updated successfully, but these errors were encountered: