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

getDevices() returns an empty list on Windows 11 #242

Open
FLATT-Dev opened this issue Aug 15, 2024 · 3 comments
Open

getDevices() returns an empty list on Windows 11 #242

FLATT-Dev opened this issue Aug 15, 2024 · 3 comments

Comments

@FLATT-Dev
Copy link

FLATT-Dev commented Aug 15, 2024

This code

const bluetooth = new Bluetooth({ deviceFound });
const device = await bluetooth.getDevices();

returns an empty list and this message in the console

[INFO] SimpleBLE: D:\a\webbluetooth\webbluetooth\SimpleBLE\simpleble\src\backends\windows\Utils.cpp:33 in initialize_winrt: CoGetApartmentType: cotype=-1, qualifier=0, result=800401F0
[INFO] SimpleBLE: D:\a\webbluetooth\webbluetooth\SimpleBLE\simpleble\src\backends\windows\Utils.cpp:41 in initialize_winrt: RoInitialize: result=0

The PC runs Windows 11 and has a built in Bluetooth adapter
Any ideas how to fix?
Thank you

@thegecko
Copy link
Owner

If possible, can you see if the underlying bluetooth engine works on your system?

https://github.com/OpenBluetoothToolbox/SimpleBLE

@FLATT-Dev
Copy link
Author

Unfortunately I'm not set up to do that at the moment so it will take time.
Looking at the SimpleBLE supported platforms it says "Windows 10+" but does not explicitly list Windows 11 so I'm suspicious. I'll try on Windows 10 and let you know
Thank you!

@thegecko
Copy link
Owner

Windows 10 should work, I test on it :)

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

2 participants