How to get serial error on application layer ?
cedric_aubert at yahoo.fr
Tue Sep 23 12:20:55 UTC 2003
--- Ralf Corsepius <corsepiu at faw.uni-ulm.de> wrote:
> On Tue, 2003-09-23 at 13:34, Cedric Aubert wrote:
> > Hi
> > I want to known how to have my serial
> > error from the application layer.
> > I try to get error from the read() function.
> > If it's return -1, I should read errno = EIO but
> > how to known if it's overflow, overrun, framing or
> > parity error.
> > With termios, I don't found any support of this
> > of error.
> > Does something exist or should I do it myself ?
> AFAICT, there is no standardized way to do this,
> because I/O is assumed
> to "simply work" and "drivers to handle the nasty
> details" and such
> errors not to be propagated/exposed to the
> application level nor to be
> handled there.
That's exactly what I see, the only think I found is
the termios IGNPAR and PARMRK to handle parity and
framing error, but don't supported by the rtems
> If you really can't avoid exposing such details to
> the application
> level, you could consider to implement corresponding
> ioctl's to your
> However, facing such problems in almost all cases
> indicate a driver bug.
Thanks a lot, I will certainly do this
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
More information about the users