thegecko / webbluetooth

Node.js implementation of the Web Bluetooth Specification
https://thegecko.github.io/webbluetooth/
MIT License
145 stars 23 forks source link

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

Open FLATT-Dev opened 4 weeks ago

FLATT-Dev commented 4 weeks ago

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 commented 4 weeks ago

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

https://github.com/OpenBluetoothToolbox/SimpleBLE

FLATT-Dev commented 4 weeks ago

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 commented 3 weeks ago

Windows 10 should work, I test on it :)