[Ilugc] Reading from a TTY

  • From: arunchaganty@xxxxxxxxx (Arun Chaganty)
  • Date: Wed Dec 3 14:49:43 2008

Hey,

To interact with a Linux virtual console you can run "conspy".
Nice!

Note that this only works if the virtual console is in text mode.
So xterm sessions would not work? Is it because this only works for "real" ttys,
and not pseudo ttys? (ptys)

For "raw" I/O piped back and forth from a modem you could use
 socat readline /dev/ttyUSB0,raw,echo=0,crlf,nonblock
This is exactly what I was looking for.

It may be possible to use socat for /dev/tty0 as well.
I tried it on a pts, and it atleast managed to write to that console. However,
it failed to read... from the same. Thank you for the pointer though, I'm
definitely going to explore more into this.

Thanks all!

-- 
Arun Tejasvi Chaganty
http://arun.chagantys.org/

Other related posts: