So I have a connection to an arduino using a Bluetooth card. Right now I have the com hard coded into the C# and the arduino doesn't set or choose a COM. My question is, assume I distributed this product. How do I know that my arduino will always connect to that COM? Is there a way to scan all COMs for a specific item then use that as a connection param? Here is some sample code of what I am doing to give you an idea.
SerialPort BlueToothConnection = new SerialPort();
BlueToothConnection.BaudRate = (9600);
BlueToothConnection.PortName = "COM3";
BlueToothConnection.Open();
This code is currently working but as you can see COM3 is hard coded... No good for distribution
Also this is the basic example given when you Google C# and Bluetooth connections so no help there.