how to read multiple serial ports in realtime in C or Python
问题 I need to read multiple (at least 2) serial ports (currently two ports on a FT2232H module connected through USB). I am using it to monitor a serial connections, so the two ports have their RX connected in parallel to RX and TX of the serial I need to monitor. Setup is very similar to this. I am setting up ports like this: #define waitTime 0 int start_dev(const int speed, const char *dev) { int fd = open(dev, O_RDWR | O_NOCTTY |O_NONBLOCK| O_NDELAY); int isBlockingMode, parity = 0; struct