From afde09e6cc7fc0af499b0dedd7f24eb844d5688f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 22 Feb 2020 13:01:58 +0000 Subject: [PATCH] linux: Don't set VTIME in UART configuration for esptun `read(esp_fd)` should wait for 1 or more characters to be available in the UART FIFO, no timing required. --- linux/esptun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/esptun.c b/linux/esptun.c index e14a60b..d032889 100644 --- a/linux/esptun.c +++ b/linux/esptun.c @@ -182,7 +182,7 @@ static void write_esc(int fd, const char *buf, int n) } /** - * Write a 32-bit unsigned integer. + * Write a 32-bit unsigned integer (as ASCII text). */ static void write_uint(int fd, uint32_t x) { @@ -237,7 +237,7 @@ static int setup_uart(int fd, int speed) /* fetch bytes as they become available */ tty.c_cc[VMIN] = 1; - tty.c_cc[VTIME] = 1; + tty.c_cc[VTIME] = 0; if (ioctl(fd, TCSETS2, &tty) != 0) { my_err("Error from TCSETS2: %s", strerror(errno));