From a510d55571a970fd90e6aca30771dd34bcc73296 Mon Sep 17 00:00:00 2001 From: Matthias Heidbrink Date: Thu, 17 Oct 2013 10:57:13 +0200 Subject: [PATCH] serial: Added flags CLOCAL (ignore modem status lines) and CREAD (start receiver). --- hardware/common/serial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 0c64203f..d8a912b2 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -598,6 +598,9 @@ SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate, /* Disable canonical mode, and don't echo input characters. */ term.c_lflag &= ~(ICANON | ECHO); + /* Ignore modem status lines; enable receiver */ + term.c_cflag |= (CLOCAL | CREAD); + /* Write the configured settings. */ if (tcsetattr(serial->fd, TCSADRAIN, &term) < 0) { sr_err("tcsetattr() error: %s.", strerror(errno));