mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: Paul Fulghum <paulkf@microgate.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Strange problem with tty layer
Date: Fri, 26 Jan 2007 11:08:42 -0500	[thread overview]
Message-ID: <20070126160842.GM7582@csclub.uwaterloo.ca> (raw)
In-Reply-To: <45BA190C.5040300@microgate.com>

On Fri, Jan 26, 2007 at 09:06:52AM -0600, Paul Fulghum wrote:
> ioctl(TIOCSETD/TIOCGETD) sets/returns an integer identifier
> that can be compared agains the N_XXX macros. If you are
> not explicitly setting this then is is probably the default N_TTY.

Yes it is N_TTY (value 0).  I never set it.

> Also at the application level, look at tcsetattr() for setting
> the termios features. Look specifically at the c_cc[VTIME] and c_cc[VMIN]
> members of the termios structure. These settings control how
> much data must be available before returning data to a read().
> Try VTIME=0 and VMIN=1.
> 
> Since your 'missing' data is always on the tail end, maybe
> VMIN is set to 64 or something.

OK, the tty settings according to stty that I am using are:
# stty -F /dev/ttyn0 -a
speed 230400 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

So min and time seems good.  I am not explicitly setting those in my
test program (unless one of the other settings implies it).  I will add
it explicitly just in case too.

--
Len Sorensen

  reply	other threads:[~2007-01-26 16:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 20:40 Lennart Sorensen
2007-01-24 21:20 ` Paul Fulghum
2007-01-24 21:48   ` Lennart Sorensen
2007-01-25 15:16   ` Lennart Sorensen
2007-01-26 14:20     ` Lennart Sorensen
2007-01-26 14:51       ` Paul Fulghum
2007-01-26 14:56         ` Lennart Sorensen
2007-01-26 15:06           ` Paul Fulghum
2007-01-26 16:08             ` Lennart Sorensen [this message]
2007-01-29 19:27               ` Lennart Sorensen
2007-02-17 16:09                 ` Lennart Sorensen
2007-01-24 21:19 Kilau, Scott
2007-01-24 21:34 ` Lennart Sorensen
2007-01-25 14:31   ` Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070126160842.GM7582@csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulkf@microgate.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®