for testing purposes I am trying to write a simple program that connects to a virtual serial port created using socat.
I create a serial port using this command:
socat -d -d PTY,b9600 PTY,link=ttyVS1,b9600
getting this result:
2011/11/08 18:26:31 socat[32708] N PTY is /dev/pts/1 2011/11/08 18:26:31 socat[32708] N PTY is /dev/pts/2 2011/11/08 18:26:31 socat[32708] N starting data transfer loop with FDs [3,3] and [5,5]
When I try to connect in this way:
System.IO.Ports.SerialPort _port; _port = new SerialPort("/dev/pts/1", 9600); _port.Open();
I get a "file name unknown" System.IO.IOException .
Am I missing to set DataBits, StopBits or other parameters? How can I find properties offered by socat? Or what's wrong with this code?
source share