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

Connecting to a device that's connected to the OS already #49

Open
gfwilliams opened this issue Feb 17, 2022 · 2 comments
Open

Connecting to a device that's connected to the OS already #49

gfwilliams opened this issue Feb 17, 2022 · 2 comments

Comments

@gfwilliams
Copy link

With Bangle.js you can now enable ANCS and AMS, which allows it to grab notifications and music playback info direct from iOS without an app installed (iOS stays connected to the Bangle). You may also have a HID bluetooth device connected to iOS that you also want to control with WebBLE.

However, when iOS is connected to the device, you don't see it listed in WebBLE and can't connect to it.

However on Android/other OSes you generally can do this.

I believe this should be possible on iOS too, and the BlueFruit app seems able to do it (if that's any help to see how they manage it?) https://github.com/adafruit/Bluefruit_LE_Connect_v2

@daphtdazz
Copy link
Owner

@gfwilliams is there a bit of the web bluetooth spec that covers this do you know? How would you access these connected devices through the web APIs? Would you just expect to see them in requestDevices()?

@gfwilliams
Copy link
Author

Yes, they appear through requestDevices just like any other device. It's possible you may not be able to get hold of full advertising data, but I guess at minimum you'll know the device name.

In https://webbluetoothcg.github.io/web-bluetooth/#scan-for-devices it does mention:

Let nearbyDevices be a set of Bluetooth devices, initially equal to the set of devices that are connected (have an ATT Bearer) to the UA.

Then it talks about adding devices that it's found by doing a scan...

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

No branches or pull requests

2 participants