Problems with /dev/ser* (break interrupt, framing, overrun a

Under QNX RTP I want to catch Break interrupt, Framing error, Overrun
error and Parity error. Is it possible and how?

Margi <margi_simeonov@yahoo.com> wrote:

Under QNX RTP I want to catch Break interrupt, Framing error, Overrun
error and Parity error. Is it possible and how?

It is completely possible. QNX does absolutely rock-solid standard
handling of these.

Advanced Programming in the Unix Environment by W. Richard Stevens
has a good chapter on terminal handling that covers how to do this.
(And is an excellent general Unix book.)

You need to use tcgetattr() and tcsetattr() to control these.

You want to:

set: PARENB, INPCK, PARMRK,
clear: IGNBRK, BRKINT, IGNPAR
decide: CSIZE (bits/byte), CSTOPB (# stop bits) PARODD (odd/even parity)

I think that will get what you want – error bytes marked in the input
stream as \377,\0,X for all the errors, and as \377,\0,\0 for break.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.