On Mon, Mar 21, 2011 at 09:48:05PM +0800, Steven Cook wrote: [...] > This evening I've found that adding two lines back into ftdi_set_termios > fixes the problem - see below. I don't understand why I've been unable > to achieve the same thing in userspace via the TIOCMBIS ioctl. Given > that it is the clear_mctrl call that seems to make the difference, I'm > trying to do the following after the initial call to tcsetattr. > > int mask = 0; > ioctl(tty_fd, TIOCMBIS, &mask); TIOCMBIS with zero argument won't do anything. If you need to lower DTR and RTS, you need to call TIOCMBIC instead: int mask = TIOCM_DTR | TIOCM_RTS; ioctl(tty_fd, TIOCMBIC, &mask);
Attachment:
signature.asc
Description: Digital signature