Re: cat problem in tiny_tty driver (the source included)
From: Lennart Sorensen
Date: Wed Feb 21 2007 - 15:28:45 EST
On Wed, Feb 21, 2007 at 11:21:10PM +0300, Mockern wrote:
> cat < /dev/my_tty does nothing, just stopped for reading. I tried to send a data,
> but there was no respond, just waiting.
Well certainly using the jsm driver (which is what I use for the pci
card I play with), doing cat to the port send data and cat from the port
receives, as long as both ports are set to the right baud rates and with
sensible stty settings.
Here are the stty settings I was using when cat worked fine:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon
-ixoff -iuclc -ixany -imaxbel
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
-isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke
You can read yours using 'stty -a -F /dev/serialdevice'.
Maybe you can find something that has to be changed to do raw reads.
Also make sure there are newlines in the stuff you send, otherwise cat
might not show it for a while, if at all since I think it tries to wait
for a newline before showing the line.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/