Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
420 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...