[Mono-dev] [System.IO.Ports] How to configure the serial port?

David Arnaud-Goddet david.goddet at gmail.com
Tue Aug 28 10:44:49 EDT 2007


Hi all,

I use the System.IO.Ports class to configure a RS232 connection.
In fact my program must open a serial port and read information send by a
medical device (an oxymeter).
I find that :http://www.mono-project.com/HowToSystemIOPorts
But it doesn't explain how to configure the serial port (baudrate, Data
bits, Parity, Stop bits and Flow control).
I try to use this peice of code but I obtain a TimeoutException.
My application works on Windows but it will be able to work on Unix too!
I'm not sure of this line code :

mySerial = new <http://www.google.com/search?q=new+msdn.microsoft.com>
SerialPort("/dev/ttyS0", 38400);

I change "/dev/ttyS0" by "COM7" (the oxymeter is detected on this port in
Windows) and I don't know what is the number 38400...

Moreover I don't find the System.IO.Ports documentation in the mono doc :
http://www.go-mono.com/docs!
I suppose that this documentation class has not yet been entered...

Thanks in advance.

-- 
David ARNAUD-GODDET
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070828/88c67206/attachment.html 


More information about the Mono-devel-list mailing list