--- In Triffid Hunter <> wrote:
>
> cat and similar tools use line buffering. They actually don't
receive or
> print a line until they have either a newline character (0x0A) or 4k of
> data.
>
> If you want every character to be stored, use dd.
I have done a lot of serial interfacing over the years, and I have to
agree with Triffid Hunter that line buffering is a problem. but there
might be more.
The TTY (serial port) driver in Unix and Linux does all sorts of
echoing, buffering, parity checking, and character translation, as
requested. I don't know what settings dd uses when it opens an input
stream, so I don't know which options are in effect.
In general, for binary data, you want "raw" mode as opposed to the
default, "cooked". From the command line you should be able to set
this with the stty command, like this:
stty --file=/dev/ttts4 raw
Of course, substitute the actual device for the "/dev/ttts4". You can
also display the current settings like this:
stty --file=/dev/ttts4
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|