5

How to scan for Bluetooth Low Energy devices in Windows-8 Desktop?

I've tried to use WinSock APIs but all I'm get is Bluetooth Classic devices.

I've also tried to use Bluetooth APIs but all I'm get is Bluetooth Classic devices.

I know that it is possible, since windows is doing that. For example, I can run C:\Windows\System32\DevicePairingWizard.exe and it will display the list of all devices, Classic & Low Energy.

2 Answers 2

7

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.

This is not lack of implementation, it is by design. Windows folks want us to use "inbox experience" to search & pair BLE devices.

For more details, see this MSDN forum thread.

Good luck!

7
  • Regarding Windows Desktop APIs there are no changes. Regarding Metro APIs I can't not be sure since I didn't check them since the last time.
    – Pupsik
    Jun 17, 2014 at 11:04
  • 2
    There's a GATT BLE API in Windows 8: msdn.microsoft.com/en-us/library/windows/hardware/… Apr 1, 2015 at 22:12
  • 1
    Yes, these APIs are funny. Do you know how to get hDevice HANDLE that is used in most of these APIs? It is well documented... NOT!
    – Pupsik
    Apr 8, 2015 at 8:02
  • I guess based on the MSDN thread, best to try with Windows 10.
    – David
    Dec 5, 2015 at 2:23
  • Sample for Windows 10, which I've tested and it works. Unfortunately it seems to be Universal platform only which wasn't quite what I wanted, but it might work for others. github.com/Microsoft/Windows-universal-samples/tree/master/…
    – Chris Rae
    Nov 21, 2017 at 0:10
2

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.

I know these two devices that can do this and have APIs for BLE discovery:

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.