chipimix
chipimix

Reputation: 290

node.js BLE API for windows requires external dongle

I'm developping a node.js electron app and I need to decide if our Hardware will feature BLE or standard Bluetooth. I found a couple of APIs (bleno & noble) for this purpose. However for Windows OS both of these require me to use an additional bluetooth usb adapter (used WinUSB & Zadig).

To put it bluntly, is there any way to communicate with a BLE device on a Windows OS using node.js without using an external dongle?

It seems like standard bluetooth is just way less of a hassle. Thanks!

Upvotes: 6

Views: 2687

Answers (2)

chipimix
chipimix

Reputation: 290

Found a package which solves this issue using a UWP-to-noble bridge: https://www.npmjs.com/package/noble-winrt

It works just like noble but supports BLE connectivity on Windows without the need for a dongle and complicated driver set-ups!

I was able to easily integrate it on Electron as well, problem solved! :)

Upvotes: 4

Emil
Emil

Reputation: 18497

The official Bluetooth API on Windows is built for Windows Runtime, https://learn.microsoft.com/en-us/microsoft-edge/windows-runtime. It supports Javascript but I'm not sure if you need a specific js environment. If you don't get that working, you should write or use a native binding for node.js.

Upvotes: 1

Related Questions