🦊:foxsi-4matter $ ./bin/test_uart Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 16 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 } Test0. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 16 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 } Test1. 1,000 us delay between write and read. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 16 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 } Test2. 10,000 us delay between write and read. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 24 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Test3. 100,000 us delay between write and read. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 16 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 } Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 32 bytes. Received message: {07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } {07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 00 00 00 00 00 } Test4. Same as test0 then change vtime and vmin for the same message again (see what is left in the buffer). Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 24 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sending frame: {03 02 05 07 } Sent bytes:4 Sent frame. Buffer is 1000000 bytes long. Read 4 bytes. Received message: {03 02 05 07 } Read 24 bytes (1st message value). Received message: {03 02 05 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 } Test5. First frame is long, second is short. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 24 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sending frame: {03 02 05 07 } Sent bytes:4 Sent frame. Buffer is 1000000 bytes long. Read 4 bytes. Received message: {03 02 05 07 } Read 24 bytes (1st message value). Received message: {03 02 05 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 } Sending frame: {08 1e 7d 7b 03 02 05 07 7d 7b 03 02 05 07 6f } Sent bytes:15 Sent frame. Buffer is 1000000 bytes long. Read 15 bytes. Received message: {08 1e 7d 7b 03 02 05 07 7d 7b 03 02 05 07 6f } Test6. First frame is long, second is short, third is longer again and scale vmin to match. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 24 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Test7. Same as Test0 but with 6xBaud rate. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 16 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 } Test8. Change from default UART0/1 port (/dev/ttyS0) to UART3 (/dev/ttyAMA1). Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Buffer is 1000000 bytes long. Read 16 bytes. Received message: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 } Buffer is 1000000 bytes long. Read 16 bytes. Received message: {07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 } Test9. Test default UART0/1 port (/dev/ttyS0) and UART3 (/dev/ttyAMA1). Sending frame: {7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d 7b 03 02 05 07 7d } Sent bytes:24 Sent frame. Pausing thread for 5 seconds. ^C 🦊:foxsi-4matter $