How do I get device information from specific port names?
I am now working on a project which related to bluetooth communication.I retrieved all COM ports names "COM12" , "COM23" from devices "Dual-SPP" and "SOLONOID" , now my problem is I could get information related to device like "DeviceID", "Friendly name" , but i need to get the above actual names of device like
"Dual-SPP" and "SOLONOID".
How do i get this names? please suggest.
Thanks .
What I have tried:
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_PnPEntity");
foreach (ManagementObject ManObj in searcher.Get())
{
if (ManObj["Caption"].ToString().Contains("(COM"))
{
Console.WriteLine(ManObj["DeviceID"].ToString());
Console.WriteLine(ManObj["PNPDeviceID"].ToString());
Console.WriteLine(ManObj["Name"].ToString());
Console.WriteLine(ManObj["Caption"].ToString());
Console.WriteLine(ManObj["Description"].ToString());
Console.WriteLine(ManObj["ProviderType"].ToString());
Console.WriteLine(ManObj["Status"].ToString());
}
}