Bluetooth Low Energy API for Windows 7.0

Muis picture Muis · Jan 18, 2013 · Viewed 27.9k times · Source

Windows 8 exposes an API to communicate to Bluetooth Low Energy (Smart) devices, but this API is not available in previous versions of Windows, so how can I communicate with a BLE dongle on Windows 7?

The BLE dongle I'm currently using (BLED112) exposes a virtual serial port, over which you can send commands using their custom proprietary API, but if I implement this in my software, it will not work with dongles from other manufacturers.

So is there a way to communicate with BLE devices on Windows 7 which is manufacturer-independent?

Answer

Timmmm picture Timmmm · Nov 4, 2016

So it turns out that some people have found a workaround. Basically the idea is to not use the Windows BLE API (which doesn't work on Windows 7) but instead to talk to the dongle directly. You can do that using WinUSB (a user-space USB driver). That driver can be installed using Zadig.

Here is an example:

https://github.com/sandeepmistry/node-bluetooth-hci-socket#windows

It has C++ code to let you send HCI commands. There is also a Node library of how to use HCI for higher level BLE stuff:

https://github.com/sandeepmistry/bleno

I don't know if there are any non-JS libraries that do the same, but I don't think it would be hard to convert Bleno to C++ in any case.