diff options
Diffstat (limited to 'src/mm-serial-port.c')
-rw-r--r-- | src/mm-serial-port.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c index 07010e1d..1d98a537 100644 --- a/src/mm-serial-port.c +++ b/src/mm-serial-port.c @@ -357,8 +357,14 @@ config_fd (MMSerialPort *self, GError **error) stbuf.c_cc[VTIME] = 0; stbuf.c_cc[VEOF] = 1; - stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB); - stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits); + /* Use software handshaking */ + stbuf.c_iflag |= (IXON | IXOFF | IXANY); + + /* Set up port speed and serial attributes; also ignore modem control + * lines since most drivers don't implement RTS/CTS anyway. + */ + stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | CRTSCTS); + stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits | CLOCAL); if (ioctl (priv->fd, TCSETA, &stbuf) < 0) { g_set_error (error, |