I am writing an application in C#, to connect to a Bluetooth breakout chip.
From my understanding, Windows assign a COM port to the device; so I can connect to it. Although, I do not understand how to retrieve the name of the device associated to a specific port.
At the moment I retrieve all the COM, and then since I know which port is working for the BT device, I open the connection manually with a button.
The objective here is to turn on the device, and if the device is paired; it will connect automatically. Unless I got it wrong; when you pair a Bluetooth device, it get assigned to a COM port; so it should be possible to retrieve the device name/BT name, interrogating the COM port? In this way I can scan all the ports; check which port is assigned to that device name and open automatically the connection.
Is this correct or there is a different way to achieve what I want to achieve?