This project has moved and is read-only. For the latest updates, please go here.

How to detect a plugged in device is a bluetooth or not

Dec 10, 2013 at 5:41 PM

I have a need to find out what type of audio device it is. For eg. bluetooth or not. Is there an NAudio API that would tell this?

I tried to rely on the device name but each model has its own convention. Some devices have "Bluetoo" in the name and some have BT<Model No> etc.

Is there a way to determine device(from list of connected audio devices) is Bluetooth device or not?

Thanks for the help.
Dec 15, 2013 at 3:53 PM
You can only get all devices list and if name contains BT or Bluetooth you can use text comparation function, like if text.contains...

or you can enumerate audio card at power on and if Bluetooth is connected you can get last added.

I suggest to enumerate all fixed sound cards and create separate thread for checking available sound card and if number of cards changed raise event for new sound card
Dec 23, 2013 at 5:00 PM
Thanks fabcal for the reply.

I could rely on 'BT' or 'Bluetooth' substring but not sure if there are other models that may use different conventions so trying to find a generic solution.

Also, my recording device are constant i.e. my requirement is to find if the recording device is bluetooth or not when its actually connecte/paired. I need not worry about changes in the recording devices.

Meanwhile, I tried to rely on the recording devices property 'Enumerator' which most of the time seem to be set to "BTHENUM" and I thought I solved the problem. But just today I found in one plantronics BT device, the property is actually set to 'USB'. So my trial was in vain.

Appreciate if you have any other thoughts.