Hi everyone !
I’m having a ‘minor’ problem with a serial port in QNX 4.25. i have a small
aplication that talks to a hhardware unit connected to the serial port. My
problem is that in order to get the communications working, I have to manually
use ‘stty -brkint -ohpaged -ihflow -ohflow -lkhflow -DTR -RTS < /dev/ser1’ to
get my software to talk nicely to the hardware. I have been looking in the
doumentation to try to find a way to set these flags when I initiate the port
in my software but haven’t been able to find anything that seems to work.
i try to set the port to RAW mode with:
dev_mode(fd ,0, _DEV_MODES);
The I use tcgetattr / tcgetattr to get te current settings and set my
requested ones. All seems to work except that when I run sttys on the port
after it has been opened, it doesn’t remove the flags mentioned above. I found
ihflow/ohflow flags that work if IEXTEN is used but I guess that I haven’t
used them correctly.
I would appreciate if someone could give me a pointer or an examle of how to
get the port working the way I’d like.