05-31-2013 05:26 AM
Hey,
I would like to be able to programatically find the list of Bluetooth devices currently paired with a machine and their associated COM ports.
I can list both of these individually using the snippet below.
However, I need to know which COM port is associated with which device... this is where I'm hitting a brick wall.
I seen similar threads here and here but not finding them particularly helpful.
Anyone make any progress on this issue?
Strokes
06-03-2013 02:40 PM - edited 06-03-2013 02:42 PM
I don't have any Blurtooth COM ports myself, but I have had to do some work with USB Virtual COM Ports where I needed similar information for some lab tests. Attached is a quick and dirty VI that obtained the Serial Port info that I needed.
I requires .Net 2.0 or greater to use the WMI API. You can see that it requests different named parameters from each found Serial Port (eg. "Description") - in my case I'm only retriving three. Here is a link that describes all the property names and what they mean:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394413(v=vs.85).aspx
The first word in the acronym WMI in Windows so this will obviously only work on a Windows OS with .Net 2.0 or greater.
Maybe this will help get you started in the right direction. If it doesn't give you what you need, and no-one else here can help, then you could look further at the WMI API to see if there is anything there Bluetooth oriented.
06-04-2013 03:15 AM
@tyk007 wrote:
I don't have any Blurtooth COM ports myself, but I have had to do some work with USB Virtual COM Ports where I needed similar information for some lab tests. Attached is a quick and dirty VI that obtained the Serial Port info that I needed.
I requires .Net 2.0 or greater to use the WMI API. You can see that it requests different named parameters from each found Serial Port (eg. "Description") - in my case I'm only retriving three. Here is a link that describes all the property names and what they mean:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394413(v=vs.85).aspx
The first word in the acronym WMI in Windows so this will obviously only work on a Windows OS with .Net 2.0 or greater.
Maybe this will help get you started in the right direction. If it doesn't give you what you need, and no-one else here can help, then you could look further at the WMI API to see if there is anything there Bluetooth oriented.
Hi Tyk,
Appreciate the assistance, it seems to be a step in the right direction. I had a quick mess around with the WMI API and while useful, I couldn't find a method to retrieve the device name/ID that is associated with the COM ports.
I assume this should be possible somehow as Window's knows it...