This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: Problems with tcgetattr()
- From: Andre-John Mas <ajmas at sympatico dot ca>
- To: Andre-John Mas <ajmas at sympatico dot ca>,Andrew Lunn <andrew at lunn dot ch>
- Cc: <ecos-discuss at sourceware dot org>
- Date: Fri, 18 Aug 2006 11:56:56 -0400
- Subject: Re: Re: [ECOS] Problems with tcgetattr()
Trying to see if I can get things working myself, I have activated
the option in the ECC file for "Termios TTY channel #0", but when
I compile I get the error:
packages/io/serial/v2_0_51/src/common/termiostty.c:189: error: `B5000000' undeclared here (not in a function)
Searching the packages I have I find no defintion for 'B5000000' or
any of the values defined in the variable defined at that line:
static speed_t ecosbaud2posixbaud[]
Any ideas?
Andre
Andre-John Mas <ajmas@sympatico.ca> wrote:
>
> Fair enough. I have added the following code:
>
> char* deviceName = "/dev/termiosX";
>
> fd = open(deviceName, O_RDWR | O_NOCTTY);
>
> but this fails at the 'isatty(fd)' test. Changing the device name
> to to the value specified by 'console device name',in the ECC file:
>
> "/dev/ttydiag"
>
> gives me the same error as when I used STDIN_FILENO:
>
> tcgetattr: Invalid argument
>
> Any ideas?
>
> Andre
>
> Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Fri, Aug 18, 2006 at 10:20:30AM -0400, Andre-John Mas wrote:
> >
> > > I am trying this on STDIN_FILENO, based on examples I have seen
> > > posted on the net. Currently I am connecting via the serial port,
> > > but later on it is likely to be via a telnet or ssh connection. I
> > > thought STDIN_FILENO was meant to be mapped to the current device?
> >
> > You are thinking in Unix way, not the eCos way. termio controls only
> > work on the termios devices and no other devices.
> >
> > However, there is currently no ssh or telnet daemon for eCos, so when
> > you implement these things, you can add support for this in however
> > you implement telnet or ssh.
> >
> > Also, not there is no concept of a per thread STDIN. It is one STDIN
> > for the whole system.
> >
> > 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
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss