Go Down

Topic: Recognizing the UNO on a com port (Read 2 times) previous topic - next topic


Feb 18, 2011, 02:33 am Last Edit: Feb 18, 2011, 02:37 am by eried Reason: 1
Which service is failing to detect the uno?

You can see in Windows devices that the uno is creating the COM port, so it might be a failure in your application. If you don't require a constant monitoring, I suggest to use a simple approach like this (C#):

Code: [Select]
private void UpdateSerialPortList()
   String[] ports = SerialPort.GetPortNames();

   if (originalPorts.Length == 0)
       originalPorts = ports;

   foreach (String s in SmartSort(ports))
       ToolStripMenuItem i = new ToolStripMenuItem(s + ((Array.IndexOf(originalPorts, s) == -1) ? " (new)":""));
       i.Tag = "port_" + s;
       i.Click += new System.EventHandler(connectToToolStripMenuItem_Click);

My website: http://ried.cl

Go Up