[MonoDevelop] Reading from a USB device.... attempting anyway

Steve Ricketts velocedge at hotmail.com
Sat Apr 10 12:36:41 EDT 2010

Mono 2.6.3 MonoDevelop 2.2 openSUSE 11.2

I'm trying to read from a CP2102 USB device.  The program works when running
in Windows but not when on Linux.  The comport.DataReceived event does not

I'm using /dev/ttyUSB0 as the comport.portName value which is the only
ttyUSB value that shows up in my dir list.  Is that the correct value to be

crw-rw----  1 root dialout 188,   0 2010-04-10 11:45 ttyUSB0

lsusb shows:
Bus 004 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x
Composite Device

I looked in yast's hardware information and under USB it shows the CP2102
(/dev/ttyUSB0), Drivers Active:Yes so I assume the drivers are in place. 
Here's the code I'm using:

            comport = new SerialPort();
            comport.DataReceived += new
            comport.BaudRate = 128000;
            comport.DataBits = 8;
            comport.StopBits = StopBits.One;
            comport.Parity = Parity.None;
            comport.Handshake = Handshake.None;
            comport.ReadTimeout = 500;
            comport.WriteTimeout = 500;
            comport.PortName = "/dev/ttyUSB0";
            comport.DtrEnable = true;


        private void port_DataReceived(object sender,
SerialDataReceivedEventArgs e)
            getPortData();  // Never gets fired

Can anyone tell me what might be stopping the DataReceived event from



View this message in context: http://n4.nabble.com/Reading-from-a-USB-device-attempting-anyway-tp1835480p1835480.html
Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.

More information about the Monodevelop-list mailing list