Re: XON/XOFF communication problem
From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 10/22/03
- Previous message: Grant Edwards: "Re: Creating a linux cd bootdisk"
- In reply to: Andrej Trobentar: "Re: XON/XOFF communication problem"
- Next in thread: Leon: "Re: XON/XOFF communication problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 22 Oct 2003 18:34:13 GMT
"Andrej Trobentar" <andrej@rikom.si> wrote in message
news:59127cb2.0310220133.790b719e@posting.google.com...
> Grant Edwards <grante@visi.com> wrote in message
news:<slrnbpbeut.4on.grante@isis.visi.com>...
>
> Hello all!
>
> First of all thanks for your help, I appriciate the quick response.
>
> > As long as he did an "stty" to set the port, it should work fine. I
suggest
> > something like this:
> >
> > (stty <whatever options you like>; cat foobar;) </dev/ttyS0
>/dev/ttyS0
> > or
> > (stty <whatever options you like>; while true; do echo "foobar\n";
done;) </dev/ttyS0 >/dev/ttyS0
> >
> > You can do it in two redirections, but the port will get closed/opened
> > between the commands and the control lines (DTR, RTS) will glitch:
> >
> > stty <options> </dev/ttyS0
> > cat foobar >/dev/ttyS0
>
> This is that I did now :
>
> stty -F /dev/ttyS0 -crtscts ixon ixoff 115200
>
> stty -a </dev/ttyS0 returns now :
>
> speed 115200 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 vt0 ff0
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
> -echoprt echoctl echoke
>
> Then I created a script with this in it :
>
> #!/bin/bash
>
> while true
> do
> echo "foobardjashdkjasdghasjddgajsdg" >/dev/ttyS0
> done
>
> and run it. After 2 seconds or so I still get the errors on the
> terminal as before. Any ideas what else can I try?
>
> MJT suggested :
> > .... rather than correcting Paul and espousing your serial
> > ability, why not go back to the OP and correct THEIR stty
> > entry (check orig post).
>
> So I guess there is a problem with my stty setup, or?
>
> Sorry for my poor english.
>
No problem - it's not my native language, either.
The difference between Linux and Windows may be caused by Windows not
sending at full speed, but keeping short pauses between the bytes sent. The
data stream can be looked at with an oscilloscope to verify. My experience
is that Windows is not able to feed 115200 bit/s (not baud) at full speed,
but Linux can on the same host.
You need a fast feedback from the terminal - it's not able to follow a
continuous stream of data at that speed. The feedback needs to be fast to
cope with the receiver buffer getting full before the extra slack in the
receiving FIFO is used up: the data is piling in a byte each 90 us.
IMHO, the hardware handshake may be better here - no interrupt latency is
involved in getting the feedback signal in, so we win at least one character
time.
Is is obligatory to pour the data at such high speed? I'd seriously
condsider lowering the speed if ever possible.
HTH
Tauno Voipio
tauno voipio @ iki fi
- Previous message: Grant Edwards: "Re: Creating a linux cd bootdisk"
- In reply to: Andrej Trobentar: "Re: XON/XOFF communication problem"
- Next in thread: Leon: "Re: XON/XOFF communication problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|