如何在 Windows 8 桌面中扫描低功耗蓝牙设备?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19959261/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to scan for Bluetooth Low Energy devices in Windows 8 Desktop?
提问by Pupsik
How to scan for Bluetooth Low Energy devices in Windows-8 Desktop?
如何在 Windows-8 桌面中扫描低功耗蓝牙设备?
I've tried to use WinSock APIsbut all I'm get is Bluetooth Classic devices.
我曾尝试使用WinSock API,但我得到的只是蓝牙经典设备。
I've also tried to use Bluetooth APIsbut all I'm get is Bluetooth Classic devices.
我也尝试过使用蓝牙 API,但我得到的只是蓝牙经典设备。
I know that it is possible, since windows is doing that. For example, I can run C:\Windows\System32\DevicePairingWizard.exeand it will display the list of all devices, Classic & Low Energy.
我知道这是可能的,因为 Windows 正在这样做。例如,我可以运行C:\Windows\System32\DevicePairingWizard.exe,它将显示所有设备的列表,经典和低能耗。
回答by Pupsik
In case other people are looking for an answer.
以防其他人正在寻找答案。
In Windows 8 (Desktop & Metro App) there are NO APIs for BLE device discovery and pairing.
在 Windows 8(桌面和 Metro 应用程序)中,没有用于 BLE 设备发现和配对的 API。
This is not lack of implementation, it is by design. Windows folks want us to use "inbox experience" to search & pair BLE devices.
这不是缺乏实施,而是设计使然。Windows 人员希望我们使用“收件箱体验”来搜索和配对 BLE 设备。
For more details, see this MSDN forum thread.
有关更多详细信息,请参阅此 MSDN 论坛主题。
Good luck!
祝你好运!
回答by Simon Wiesmann
You could use BLE hardware module that you can control via a serial interface. Depending on your use case this may not be what you want as it does not make use of Windows 8's internal BLE stack! Basically this solution is for tinkering/development.
您可以使用可以通过串行接口控制的 BLE 硬件模块。根据您的用例,这可能不是您想要的,因为它不使用 Windows 8 的内部 BLE 堆栈!基本上,此解决方案用于修补/开发。
I know these two devices that can do this and have APIs for BLE discovery:
我知道这两个设备可以做到这一点,并且具有用于 BLE 发现的 API:
- HM-10: http://imall.iteadstudio.com/im130614001.html
- BLE112: https://www.bluegiga.com/en-US/products/bluetooth-4.0-modules/ble112-bluetooth--smart-module/
- HM-10:http: //imall.iteadstudio.com/im130614001.html
- BLE112:https://www.bluegiga.com/en-US/products/bluetooth-4.0-modules/ble112-bluetooth--smart-module/