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

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

.net - Bluetooth Low Energy API for Windows 7.0

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

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

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...