* [ECOS] Canonical tty (termios) and nonblocking
@ 2007-07-18 22:31 Rutger Hofman
2007-07-20 19:29 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Rutger Hofman @ 2007-07-18 22:31 UTC (permalink / raw)
To: ecos-discuss
Good evening list,
I run into the following problem. I have a device that is attached to a
serial port (a BlueTooth thingy).
This port is opened in my application as a file, /dev/ser0 or /dev/tty0
or /dev/termios0 or /dev/... I want to control the line speed for the
serial connection from the application, so I want to use tcsetattr or
cfseti/ospeed. This interface only exists for termios devices
("/dev/termios0"), as defined in
packages/io/serial/current/src/common/termiostty.c
Now, this BlueTooth thingy talks to some other device, not a human. So
the terminal should NOT be in canonical mode: no special handling of
ERASE and KILL (though these can be disabled separately), and of course
no buffering -- which /cannot/ be disabled separately. However, if I
look at the code (above file, line 656-675 in CVS from a week ago), if
the device is not canonical, receive is implemented as *nonblocking*.
This is emphatically not what I want, and I think blockingness should be
specified in another way, by using O_NONBLOCK or O_NDELAY as parameters
for open(2).
Any ideas where my reasoning went astray, or how this can be fixed?
Greetings,
Rutger
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] Canonical tty (termios) and nonblocking
2007-07-18 22:31 [ECOS] Canonical tty (termios) and nonblocking Rutger Hofman
@ 2007-07-20 19:29 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2007-07-20 19:29 UTC (permalink / raw)
To: Rutger Hofman; +Cc: ecos-discuss
On Thu, Jul 19, 2007 at 12:33:43AM +0200, Rutger Hofman wrote:
> Good evening list,
>
> I run into the following problem. I have a device that is attached to a
> serial port (a BlueTooth thingy).
>
> This port is opened in my application as a file, /dev/ser0 or /dev/tty0 or
> /dev/termios0 or /dev/... I want to control the line speed for the serial
> connection from the application, so I want to use tcsetattr or
> cfseti/ospeed. This interface only exists for termios devices
> ("/dev/termios0"), as defined in
> packages/io/serial/current/src/common/termiostty.c
There is an eCos way to set the line speed. Take a look at
cyg_io_set_config() and there should be a key to set the speed of the
device. You can apply this to the raw device.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-20 19:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-18 22:31 [ECOS] Canonical tty (termios) and nonblocking Rutger Hofman
2007-07-20 19:29 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).