I have an usb device that is plugged in as a serial port on com3. I use this to open port:
string[] ports = SerialPort.GetPortNames();
foreach (string portName in ports)
{
try
{
var port = new SerialPort(portName, 256000);
port.Open();
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
}
I get an io exception here "port com3 does not exist". I use VS2012 + Win7x64Pro. I tried to reboot windows and everything worked fine, but just 1 time. Some days ago I run this project on VS2012 + Win8 and everything was great. It worked great, no exceptions were found. I found great amount of similar questions but there are not any solution for this problem. For more information: as a usb device I use BlueGiga BLED112 with driver version "ble-1.1.1-71". Explain me please where and what am I doing wrong.