简体   繁体   中英

Is there a way use Bluetooth LE libraries C# in Windows 10 to communicate with sensors or micro-controllers?

I spent some time looking for ways to exchange data from a micro-controller Bluno Beetle from DFRobots that uses Bluetooth LE and a desktop application written in C#. DFRobots actually has a code (in Java Android), where they use GATT profiles to exchange data from/to the micro-controller and an Android Phone. I tested this app myself and it works perfectly. I would like to have a similar application written in C# running on a Desktop. I recently bought a BLE dongle (the cheapest option I found on Amazon) which I can pair successfully.

So far, I found solutions that involve using UWP, being one of those an example for exchanging data between a Windows Phone and a Heart Rate monitor , and very little documentation on how to accomplish that for Desktop applications here and here , that involve using System.Runtime.WindowsRuntime but no other information about how to connect to a device or listen to what is being broadcast.

Do any of you guys know if it is really possible to accomplish that? And if so, are you aware of a tutorial I could use to help me?

Thanks!

but no other information about how to connect to a device or listen to what is being broadcast

Here is an official and complete BLE client/server sample which you can use as a starting point

Look into the BTFramework library. We have worked with it for years. It took one afternoon to establish good communication with an ioT device this week. We are using C# NET, by the way. Their libraries have worked well on all platforms from the latest versions of Windows 10 all the way back to barely-functioning XP machines, skipping Vista of course. As to the dongles you can buy... we support a commercial product using those dongles, and found their marketing claims don't always support their performance. Some work fine for a day, then fail, then work again. And one large batch from one vendor may work fine, but a batch purchased months later may have a high failure rate when you are pushing the envelope.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM