Open two-bridges opened 1 year ago
PR created in forked repo (I don't have access to this repo):
https://github.com/two-bridges/ble/pull/1
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: https://github.com/two-bridges/ble/pull/1
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? Anyway your PR looks good. Could you open it on this repo?
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.
i like the fact that you now compare long and short. Seems safer
cool cool. I think this is the way to go too... should be backwards compatible
Anyway your PR looks good. Could you open it on this repo?
oh yeah, I've worked it out... will create the PR from my fork shortly
https://github.com/nativescript-community/ble/pull/258
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...