How to open a tty (or cu) without asserting DTR on the open?

I have a little doodad that I talk to via a FTDI USB/serial adapter. I want to use the DTR signal to control it. I have a requirement that when I initially open the tty -- /dev/cuaU0 for example -- the DTR most remain OFF/non-asserted.

Once I have the tty open, I can set the DTR to what I want via TIOCMSET and so forth. But immediately on opening the DTR is always asserted, which is no good.
I have tried applying the settings I want to /dev/cuaU0.init, but TIOCMSET and friends are inappropriate for this device -- evidently the .init devices don't handle this.
It doesn't seem to make a difference if I use the cuaU0 or ttyU0 nodes.

I am sure I am missing something simple, but I am unable to discover what.

Thanks for any suggestions.
 
Re: How to open a tty (or cu) without asserting DTR on the o

Now I am looking at dev/usb/ucom.c and it looks like it unconditionally sets DTR and RTS in ucomopen(). Bummer.

Code:
ucomopen(struct tty *tp, struct cdev *dev)
{

      :

        (void)ucommodem(tp, SER_DTR | SER_RTS, 0);

      :
 
Back
Top