4

I've found scatterings around the web but no concise answer. Everyone talks about developing BLE for Android and iOS, but how does one develop for Windows in C# (.NET)?

I've found this http://social.msdn.microsoft.com/Forums/windowsapps/en-US/2f236b71-a6ac-4c42-aef3-723c3691cbf8/how-to-discover-connectdisconnect-and-reconnect-to-bluetooth-low-energy-device-from-windows-81?forum=wdk

I've tried the C# example, but I don't have any devices with health profiles (and I don't know how to set searching for a generic device). I did try modifying the code but it didn't help

I have a sensor tag and also a generic BLE HM-10 module useful for arduino projects. My iPhone can find both of these devices using the SensorTag application or LightBlue.

I also found this http://orcs.sebsoft.com/openvision/index.php/8-vision/37-how-to-acquire-data-by-c-from-bluetooth-4-bluetooth-low-energy-ti-ble-keyfob-ti-sensor-tag

I tried starting it up and scanning, but it didn't find any BLE devices. I don't even know if what I'm doing it right.

I have a BT 4.0 USB dongle.

How on earth do I detect a bluetooth device?

Thanks

Sam Protsenko
  • 14,045
  • 4
  • 59
  • 75
friartuck
  • 2,954
  • 4
  • 33
  • 67
  • Did you pair the BLE device? Your first link did mentioned paring was a must, but you did not mention this in your question. – Yongwei Wu Jul 09 '14 at 08:39

2 Answers2

2

Here is a two-part blog post about enumerating and configuring BLE devices in Windows 8.1.

After reading this, the documentation on MSDN seemed to make a lot more sense.

Zak
  • 12,213
  • 21
  • 59
  • 105
  • is there a way to do this in a desktop app on windows 10? – Cedric Mamo May 19 '16 at 20:09
  • Yes. Windows 10 provides WAY better APIs for working with BLE devices. I would look at `https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing` – Zak May 31 '16 at 04:11
1

This is just a guess, but if you're using a generic HM-10 BT module, you might need to program it first to be discoverable and pairable.

You do that using AT commands which you can find in the HM-10 datasheet. The way to send those commands to the module is up to you, you can either use a microcontroller, Arduino for example, or via a serial console.

poli_g
  • 629
  • 3
  • 15