Skip to content
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

Bonding before Connection #21

Open
noumanqaiser opened this issue Feb 25, 2023 · 4 comments
Open

Bonding before Connection #21

noumanqaiser opened this issue Feb 25, 2023 · 4 comments

Comments

@noumanqaiser
Copy link

Hello,

Thanks for this extra ordinary peice of work. I am working with a BLE barcode reader that requires you to bond before you would be able to subscribe and listen to gatt characteristics.

I have put the question here aswell:
https://stackoverflow.com/questions/73505491/bluetooth-web-bonding-before-connection

Is there any function that you are exposing to the underlying Bluetooth web api that would allow you to bond to a device before listening to Gatt characteristics?

Looking forward to your input on this.

@EngstromJimmy
Copy link
Owner

Interesting, I would have thought anything paired with the operating system would work, so I am surprised it doesn't.
My library uses Web Bluetooth in the backend with JavaScript interop.
I know some devices have a non-standard bonding, which simply calls the right characteristics with the right data.
Figuring out what that data is, is the fun part =)

I'll leave this one open, if you ever figure out how to do it with Web Bluetooth, I'll be happy to try and implement it (or do a PR).

@frederm2018
Copy link

Jimmy, this might be a similar question to @noumanqaiser .
For BLE devices, normally, we just do a query by Gatt, find any that are beaconing. Then connect, without a prompt, collect data or update data on the device the same way you do now. In windows directly, I can listen to beaconing devices, and then decide, in code, if I want to connect or not. Since this is a web based tool, I'm assuming security wont allow it? If you know of a way to do what I'm looking for that would be helpful. I will keep digging as I'm sure you're busy with things. Take care and thanks for the great video.

@EngstromJimmy
Copy link
Owner

As far as I know, there is no way. For the same reasons you just mentioned. Apple don't think its secure enough, and haven't implemented it yet.
If you figure something out please let me know

@frederm2018
Copy link

frederm2018 commented Jun 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants