From cc8dd6e22f515855ccc462b56dfbd6bf40c6e232 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Sat, 1 Feb 2025 16:22:36 +0100 Subject: [PATCH] aqhome: modified setup of serial port. --- aqhome/msg/endpoint_tty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aqhome/msg/endpoint_tty.c b/aqhome/msg/endpoint_tty.c index 1dcbd2a..ab60fdb 100644 --- a/aqhome/msg/endpoint_tty.c +++ b/aqhome/msg/endpoint_tty.c @@ -212,15 +212,16 @@ int _openDevice(GWEN_MSG_ENDPOINT *ep) DBG_ERROR(AQH_LOGDOMAIN, "Error on tcgetattr(%s): %s (%d)", xep->deviceName, strerror(errno), errno); return GWEN_ERROR_IO; } - memset(&options, 0, sizeof(options)); /* preset */ + options=xep->previousOptions; +// memset(&options, 0, sizeof(options)); /* preset */ options.c_cflag=CLOCAL | CREAD | CS8; options.c_iflag=IGNPAR | IGNBRK; options.c_oflag=0; - options.c_lflag=0; - cfmakeraw(&options); + options.c_lflag&= ~(ICANON | ECHO | ECHOE | ISIG); options.c_cc[VTIME]=0; /* read timeout in deciseconds */ options.c_cc[VMIN]=0; /* no minimum number of receive bytes */ + cfmakeraw(&options); rv=cfsetispeed(&options, AQH_MSG_ENDPOINT_TTY_BAUDRATE); if (rv<0) {