|
-
Jul 8th, 2016, 01:40 AM
#1
List of Bluetooth devices using C#
I need a very simple C# program that lists the names or IDs of bluetooth devices in range. I'm finding that there isn't a good example of this that I could find. I'm looking to create a simple Windows Phone 8.0/8.1 app that needs this functionality.
Anyone seen such code (or know how to write it)!
THanks,
Brad!
-
Jul 8th, 2016, 04:28 AM
#2
Re: List of Bluetooth devices using C#
Hi Brad,
Our Network Admin guy uses this 32feet.NET. There's a documentation section from that site.
I don't have a clue on how it works/coding part.
- kgc
-
Jul 13th, 2016, 08:11 AM
#3
Addicted Member
Re: List of Bluetooth devices using C#
Code:
{
System.Management.ManagementObjectCollection ManObjReturn;
System.Management.ManagementObjectSearcher ManObjSearch;
ManObjSearch = new System.Management.ManagementObjectSearcher("Select * from Win32_PnPEntity");
ManObjReturn = ManObjSearch.Get();
foreach (System.Management.ManagementObject ManObj in ManObjReturn)
{
if ( ("" + ManObj["ClassGUID"]).ToUpper() == "{e0cbf06c-cd8b-4647-bb8a-263b43f0f974}")
{
// Do something with ManObj["Name"] such as Add to a <List>
SomeList.Add(ManObj["Name"])
}
}
return SomeList;
}
See
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
for a list of GUIDs for other device types.
Last edited by Axcontrols; Jul 13th, 2016 at 08:14 AM.
Reason: Additonal info
-
Jul 13th, 2016, 08:23 AM
#4
Re: List of Bluetooth devices using C#
 Originally Posted by Axcontrols
Does this show bluetooth devices on my current machine, or does it show devices in range of my machine? I'll need to take a closer look at this.
Thanks!
-
Jul 13th, 2016, 08:24 AM
#5
Re: List of Bluetooth devices using C#
 Originally Posted by KGComputers
Our Network Admin guy uses this 32feet.NET. There's a documentation section from that site.
Others have pointed to 32feet as well, so it looks like I need to look at it.
Thanks!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|