I am trying to develop a vs code extension that needs Bluetooth interaction with ble devices.
I know vs code built on top of electron and electron supports web bluetooth api (blog related to this).
Also, I tested in VS Code chrome DevTools the web Bluetooth API (navigator.bluetooth) is working.
when i tried to use web bluetooth in webview of vs code i am getting cors error (ofcourse as webview in vscode are simply iframes)
SecurityError: requestDevice() called from cross-origin iframe
at the end using noble library to work but i just managed to get it work on windows. on linux it will not work as the node build that sits inside VS Code need permission to access Bluetooth. mac also getting many problems.
Things will be easier if some how I can use web Bluetooth directly within vs code extension but vs code doesn't let you use electron APIs.
UPDATE 2023/04/28: managed with abandonware/noble now working on mac and windows its open source for brilliant labs here the link