Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Setting the ohpaged bit to /dev/ser1 from within code.
Ref. No. QNX.000004379
Category(ies) Utilities, Character I/O
Issue We have discovered that when using the serial ports we need to ensure that the serial output is not paged by hardware flow control.
i.e. we need to do the equivalent of "stty -ohpaged </dev/ser1".

(a) How do we disable this paging from within a program without doing a 'system("stty -ohpaged </dev/ser1")'

(b) What does "paging the output by hardware flow control" mean anyway?


Solution Hardware flow control uses the CTS and DTR lines of the serial ports to control access to the serial lines.  What it means is that when your ohpaged is high you have been flow controlled (it is no longer your turn to use the serial line).  The raising of this line is controlled by the other side.  If the other side holds this line high, it doesn't matter what you do with the ohpaged setting because as soon as the serial port checks it again, it will return to the proper setting.

That stated the equivalent of stty -ohpaged </dev/ser1 is:

fd = open( "/dev/ser1", O_RDWR );
tcflow( fd, TCOONHW );

The equivalent of stty +ohpaged </dev/ser1 is:

fd = open( "/dev/ser1", O_RDWR );
tcflow( fd, TCOOFFHW );