Enabling/Disabling RTS and DTR

Hi,
I have a method for enabling RTS and DTR, but for some reason it makes the
serial driver very unhappy after I’ve done it (using a qioctl with specific
values on the file descriptor). What I notice is that when I go to enable
RTS, a byte is sent, or that the byte I want to send after I set RTS is sent
WAY before it’s supposed to (an oscilloscope shows the data being sent the
moment RTS is raised, but it’s supposed to happen much later, 200ms after I
lower RTS (another 200 ms after I raise it, 400ms from the original raise of
the line).

So, what’s the best method for enabling/disabling RTS and DTR? Any code
examples are best. I could system() a stty command, but I’d prefer not to
do that :slight_smile:

TX!

R B Adler

R B Adler <request@qnx.com> wrote:

Hi,
I have a method for enabling RTS and DTR, but for some reason it makes the
serial driver very unhappy after I’ve done it (using a qioctl with specific
values on the file descriptor). What I notice is that when I go to enable
RTS, a byte is sent, or that the byte I want to send after I set RTS is sent
WAY before it’s supposed to (an oscilloscope shows the data being sent the
moment RTS is raised, but it’s supposed to happen much later, 200ms after I
lower RTS (another 200 ms after I raise it, 400ms from the original raise of
the line).

So, what’s the best method for enabling/disabling RTS and DTR? Any code
examples are best. I could system() a stty command, but I’d prefer not to
do that > :slight_smile:

TX!

R B Adler

This is a bit late, but I just came across this thread. There is some sample
code in the following knowledge base entry.
http://qdn.qnx.com/support/bok/solution.qnx?9291

Barry