Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bluetooth APIs in Windows/.Net?

I am in the process of writing a Bluetooth scanner that locates and identifies mobile devices in the local vicinity. Is this something that I can accomplish using C#, or do I need to drop down into the C/C++ APIs? My application is targeting Windows XP and Vista. Pointers are appreciated.

Thanks!

like image 897
cjkarr Avatar asked Sep 28 '08 00:09

cjkarr


People also ask

What is API in Bluetooth?

The Web Bluetooth API provides the ability to connect and interact with Bluetooth Low Energy peripherals.

How do I add a Bluetooth device to Windows?

On your PC, select Start > Settings > Devices > Bluetooth & other devices > Add Bluetooth or other device > Bluetooth. Choose the device and follow additional instructions if they appear, then select Done.

What is Windows Bluetooth enumerator?

In essence, a Microsoft Bluetooth Enumerator (dongle) is a wireless adapter that makes it possible for a PC without integrated Bluetooth to establish a connection with a Bluetooth device, like Bluetooth keyboards, mobile phones, and mice.

Does Windows 10 have Bluetooth built in?

If you've got a reasonable modern Windows 10 laptop, it's got Bluetooth. If you have a desktop PC, it might or might not have Bluetooth built-in, but you can always add it if you want.


3 Answers

One problem with Bluetooth on the PC is that there are several BT stacks in use and you can never quite know which one is available on a given machine. The most common ones are Widcomm (now Broadcom) and Microsoft (appeared in XP, maybe one of the service packs). However, some BT hardware vendors package BlueSoleil and some use Toshiba. Most dongles will work with the MS stack so the .NET libs I've seen tend to use that.

Each of the stacks has a totally different way of doing the discovery part where you browse for nearby devices and inquire their services.

If I had to pick one approach today I'd probably do the discovery in C++ and add an interface for .NET.

The 32feet.net stuff worked pretty well when I tried it but didn't support the Widcomm stack.

like image 178
Andrew Queisser Avatar answered Oct 13 '22 00:10

Andrew Queisser


There is also Peter Foot's 32feet.net

http://inthehand.com/content/32feet.aspx

I've played around with this back when it was v1.5 and it worked well.

like image 25
Kyle Avatar answered Oct 12 '22 23:10

Kyle


Mike Petrichenko has a nice BT framework. It works with BlueSoleil, Widcomm, Toshiba and Microsoft.

It is now called the Wireless Communications Library and works with Bluetooth 802.11 and Infrared. Mike named the company Soft Service Company and sells non-commercial and commercial licenses with and without source code in prices ranging between $100 and $2050.

like image 41
Guge Avatar answered Oct 13 '22 01:10

Guge