-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support for bonding #111
Comments
It isn't on the short-term roadmap but I've been trying to prioritize GitHub issues by the number of 👍 they have. So, if there are others who also need this feature (and "up vote" it) then I'd be happy to tackle it sooner rather than later. Long-term I would like to support it, so it will come eventually. Also happy to accept PRs. 😉 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There are multiple medical devices that I've come across requiring pairing: |
This comment was marked as outdated.
This comment was marked as outdated.
Hey @twyatt any real advance on this? I would suggest acquiring a stater kit like the one silicon labs have: https://www.silabs.com/development-tools/wireless/bluetooth/bgx220p-bluetooth-xpress-starter-kit |
This comment was marked as outdated.
This comment was marked as outdated.
@WildStudio Does the starter kit support BLE bonding out-of-the-box, or does it have to be programmed/configured for bonding? |
Has there been any progress on this part one year later ? |
This comment was marked as outdated.
This comment was marked as outdated.
Whenever I've done pairing it's by using the Nordic library (https://github.com/NordicSemiconductor/Android-BLE-Library), I've never implemented it from scratch. So I may not be in the best position to provide a test sample. |
It has recently come up that we may have a need for bonding internally. Meaning that this may end up on our team's project roadmap (so I'd be able to allocate a lot of time to this effort). 🤞 I'm not certain of timelines, but I'm hopeful the effort kicks off sometime in first half of 2023. |
Hello @twyatt, Just wondering, how's that feature coming along 😃 ? |
I just last week researched what typical Android bonding looks like, here are some great articles I came across:
...that is to say: sorry it has taken so long, but I have finally started on this. Thanks for your patience. ❤️ |
I have a completely untested implementation (#494), based on the great articles I linked. Although I don't (yet) have any devices to test it against. I have a Beurer PO60 Pulse Oximeter but getting the BLE working on it was super wonky (I ultimately gave up). Additionally, according to this, it doesn't require bonding anyways. 🤷 Does anyone have some recommendations of devices that:
Thank you! |
Any update on this? Our company would like to use your library but bonding is a key requirement. |
@YSDC do you happen to know of a publicly available (and affordable) device that requires/supports bonding? Or, is the product your company is wanting to developer for available for use as something I can develop against? The only blocker at this point is me getting a device I can test #494 against. |
Mentioned a couple of devices that requires bonding with different behaviors here |
Yes, thanks for those recommendations @DoruAdryan! Unfortunately I could not get the bluetooth on the Beurer PO60 Pulse Oximeter working (the guides in the official app were terrible — could not even get it connected in their app). If you happen to know how to enable bluetooth on that device, then I'll give it another try. I didn't get very far with the Beurer Thermometer either, as it was difficult to find documentation on how to communicate with it over bluetooth (i.e. what are its characteristic UUIDs, what does the data format look like to communicate with it, etc?). I was hoping to have a device that was a little more developer friendly (specifically, better documentation) but I'll go back to reverse engineering it if no better device options come up. |
Hi @twyatt I'm checking these modifications on my own. The first problem I'm facing is that 'onCharacteristicRead' inside the callback is not firing. It seems like Android is waiting for pairing because my device requires pairing from the initial connection. Maybe this behavior only occurs with devices that require pairing at the initial connection, and not with devices that only require pairing for some protected characteristics. Perhaps we should add a function to wait for pairing or consider giving access to the bonding state from an external part and keeping that responsibility outside of this library. Added to this I'm clear code and merge with the main in my own pull request, the broadcast ACTION_BOND_STATE_CHANGED have a problem because is not called. Can you check this? https://github.com/CristianMG/kable/tree/feature/bonding_v2 as you can see, I have modified some problematic code. Greetings |
Hi @CristianMG, is the peripheral you're working with publicly available? If not, are you able to provide me with one so that I can test the bonding support against it? |
Hello @twyatt, just wanted to check-in and see how this effort was coming along. Bonding support would be an essential requirement. |
@kdkoyamatsu, the only hold up at this time is that I don't have a device that requires bonding to test against (to complete development of #494). If you're aware of a publicly available BLE device that requires bonding and has API documentation (i.e. something to reference to spin up a test app for BLE communication) then I'll gladly purchase it to continue development. |
@CristianMG I tested bonding against your kable-ble-test project (thanks again, by the way — it has been super helpful). Some things I've observed thus far:
None of the above issues are show-stoppers, but it definitely isn't the behavior I was expecting. I'll continue investigating, just sharing my findings thus far. |
Is there a plan for supporting bonding (pairing) with a bluetooth device gracefully? I think that at connect() time or later on, when reading / writing a characteristic (which could respond with INSUFFICIENT_AUTHENTICATION) would have to do it.
I saw that Advertisement has a BondState property.
The text was updated successfully, but these errors were encountered: