From 864c7749d03a39b2e27757fffd805007bf8380cb Mon Sep 17 00:00:00 2001 From: Sebastian Renner Date: Fri, 12 Jul 2019 13:02:03 +0200 Subject: [PATCH] Debug to stderr if necessary --- subprocess.log | 919 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- templates/blackpill/middleware.py | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 928 deletions(-) delete mode 100644 subprocess.log diff --git a/subprocess.log b/subprocess.log deleted file mode 100644 index ba2d844..0000000 --- a/subprocess.log +++ /dev/null @@ -1,919 +0,0 @@ -/home/sr/PhD/research/lwc/owncode/compare/build/959521385Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 0 bytes from std -Data sent to serial: b'a\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'[\x9d\x12t\x01\xae\xa7\x85\x0b\xba\x00h\x13\x92*^' -Submitted following data to stdout: b'[\x9d\x12t\x01\xae\xa7\x85\x0b\xba\x00h\x13\x92*^' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'[\x9d\x12t\x01\xae\xa7\x85\x0b\xba\x00h\x13\x92*^' -Read following action from stdin: b'a' -Trying to read 0 bytes from std -Data sent to serial: b'a\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 1 bytes from std -Data sent to serial: b'a\x01\x00\x00\x00' -Data sent to serial: b'\x00' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'\xd9\xce\x90\x08\x9eN\xf6\x0c\xe0%\xc8\xac;\x18\x0c\xbb' -Submitted following data to stdout: b'\xd9\xce\x90\x08\x9eN\xf6\x0c\xe0%\xc8\xac;\x18\x0c\xbb' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'\xd9\xce\x90\x08\x9eN\xf6\x0c\xe0%\xc8\xac;\x18\x0c\xbb' -Read following action from stdin: b'a' -Trying to read 1 bytes from std -Data sent to serial: b'a\x01\x00\x00\x00' -Data sent to serial: b'\x00' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 2 bytes from std -Data sent to serial: b'a\x02\x00\x00\x00' -Data sent to serial: b'\x00\x01' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'8\xe6*\xe8\xd4s(\xde\x91@$`\xe9N\xb5\xe1' -Submitted following data to stdout: b'8\xe6*\xe8\xd4s(\xde\x91@$`\xe9N\xb5\xe1' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'8\xe6*\xe8\xd4s(\xde\x91@$`\xe9N\xb5\xe1' -Read following action from stdin: b'a' -Trying to read 2 bytes from std -Data sent to serial: b'a\x02\x00\x00\x00' -Data sent to serial: b'\x00\x01' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 3 bytes from std -Data sent to serial: b'a\x03\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'\x89\x99\xcc\xb4\x94z{S\xb9\xb3\x90\x04E\xd2^\xc7' -Submitted following data to stdout: b'\x89\x99\xcc\xb4\x94z{S\xb9\xb3\x90\x04E\xd2^\xc7' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'\x89\x99\xcc\xb4\x94z{S\xb9\xb3\x90\x04E\xd2^\xc7' -Read following action from stdin: b'a' -Trying to read 3 bytes from std -Data sent to serial: b'a\x03\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 4 bytes from std -Data sent to serial: b'a\x04\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'3\x81r\xabe\xce\xed\r*T\xf4\x12\xa8\x1a\xbaK' -Submitted following data to stdout: b'3\x81r\xabe\xce\xed\r*T\xf4\x12\xa8\x1a\xbaK' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'3\x81r\xabe\xce\xed\r*T\xf4\x12\xa8\x1a\xbaK' -Read following action from stdin: b'a' -Trying to read 4 bytes from std -Data sent to serial: b'a\x04\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 5 bytes from std -Data sent to serial: b'a\x05\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'\x10&\xd6le$\x1a\x90CYIzL[\xd0\x92' -Submitted following data to stdout: b'\x10&\xd6le$\x1a\x90CYIzL[\xd0\x92' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'\x10&\xd6le$\x1a\x90CYIzL[\xd0\x92' -Read following action from stdin: b'a' -Trying to read 5 bytes from std -Data sent to serial: b'a\x05\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 6 bytes from std -Data sent to serial: b'a\x06\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'@+\xf7_\x85r\xfa\x15TW\xc7\x0b\x9fe>\xd6' -Submitted following data to stdout: b'@+\xf7_\x85r\xfa\x15TW\xc7\x0b\x9fe>\xd6' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'@+\xf7_\x85r\xfa\x15TW\xc7\x0b\x9fe>\xd6' -Read following action from stdin: b'a' -Trying to read 6 bytes from std -Data sent to serial: b'a\x06\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 7 bytes from std -Data sent to serial: b'a\x07\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'V\x9dN\xc0\xa6w\xc7\x9b\xec\xf1\xe9?\xa8\xbb\x8d3' -Submitted following data to stdout: b'V\x9dN\xc0\xa6w\xc7\x9b\xec\xf1\xe9?\xa8\xbb\x8d3' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'V\x9dN\xc0\xa6w\xc7\x9b\xec\xf1\xe9?\xa8\xbb\x8d3' -Read following action from stdin: b'a' -Trying to read 7 bytes from std -Data sent to serial: b'a\x07\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 8 bytes from std -Data sent to serial: b'a\x08\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'R\t}\x8a\':\xd3\xd4\x1d\x9cA\xdf-"n\xd6' -Submitted following data to stdout: b'R\t}\x8a\':\xd3\xd4\x1d\x9cA\xdf-"n\xd6' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'R\t}\x8a\':\xd3\xd4\x1d\x9cA\xdf-"n\xd6' -Read following action from stdin: b'a' -Trying to read 8 bytes from std -Data sent to serial: b'a\x08\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 9 bytes from std -Data sent to serial: b'a\t\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'i\xb0\x83\x01\n\xc9\xda\xb86\xc0m\xdfI\xd2YT' -Submitted following data to stdout: b'i\xb0\x83\x01\n\xc9\xda\xb86\xc0m\xdfI\xd2YT' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'i\xb0\x83\x01\n\xc9\xda\xb86\xc0m\xdfI\xd2YT' -Read following action from stdin: b'a' -Trying to read 9 bytes from std -Data sent to serial: b'a\t\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 10 bytes from std -Data sent to serial: b'a\n\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'\xeb\n\x8e\xaf\xef\xcc\x9d\xb6`uE\xb3\xc4,\xe8[' -Submitted following data to stdout: b'\xeb\n\x8e\xaf\xef\xcc\x9d\xb6`uE\xb3\xc4,\xe8[' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'\xeb\n\x8e\xaf\xef\xcc\x9d\xb6`uE\xb3\xc4,\xe8[' -Read following action from stdin: b'a' -Trying to read 10 bytes from std -Data sent to serial: b'a\n\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 11 bytes from std -Data sent to serial: b'a\x0b\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'\xach\x92aa2P\x10\x01\xcd\xfd\xa1\xd6!bS' -Submitted following data to stdout: b'\xach\x92aa2P\x10\x01\xcd\xfd\xa1\xd6!bS' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'\xach\x92aa2P\x10\x01\xcd\xfd\xa1\xd6!bS' -Read following action from stdin: b'a' -Trying to read 11 bytes from std -Data sent to serial: b'a\x0b\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 12 bytes from std -Data sent to serial: b'a\x0c\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'B\xc7\xfd\xce\xa5Ctt\xd7\xf0}\xec\xdc\x89\x84\x9b' -Submitted following data to stdout: b'B\xc7\xfd\xce\xa5Ctt\xd7\xf0}\xec\xdc\x89\x84\x9b' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'B\xc7\xfd\xce\xa5Ctt\xd7\xf0}\xec\xdc\x89\x84\x9b' -Read following action from stdin: b'a' -Trying to read 12 bytes from std -Data sent to serial: b'a\x0c\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 13 bytes from std -Data sent to serial: b'a\r\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b'\xa4q\xaeh:\x80\xf3\xd1A/\xca\xa3\xec\xeej\xd6' -Submitted following data to stdout: b'\xa4q\xaeh:\x80\xf3\xd1A/\xca\xa3\xec\xeej\xd6' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b'\xa4q\xaeh:\x80\xf3\xd1A/\xca\xa3\xec\xeej\xd6' -Read following action from stdin: b'a' -Trying to read 13 bytes from std -Data sent to serial: b'a\r\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'd' -Data sent to serial: b'd' -Read following action from stdin: b'M' -Data sent to serial: b'M' -Trying to read 0 bytes from ser -Obtained following data from serial: b'' -Submitted following data to stdout: b'' -Read following action from stdin: b'c' -Trying to read 32 bytes from std -Data sent to serial: b'c \x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'm' -Trying to read 0 bytes from std -Data sent to serial: b'm\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'a' -Trying to read 14 bytes from std -Data sent to serial: b'a\x0e\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' -Read following action from stdin: b'p' -Trying to read 15 bytes from std -Data sent to serial: b'p\x0f\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e' -Read following action from stdin: b'e' -Data sent to serial: b'e' -Read following action from stdin: b'C' -Data sent to serial: b'C' -Trying to read 16 bytes from ser -Obtained following data from serial: b't\x8d\x1c\x8f\xe6\xe5X\x89\x8b\x02\xbe\x84:\xe4\xc6$' -Submitted following data to stdout: b't\x8d\x1c\x8f\xe6\xe5X\x89\x8b\x02\xbe\x84:\xe4\xc6$' -Read following action from stdin: b'm' -Trying to read 16 bytes from std -Data sent to serial: b'm\x10\x00\x00\x00' -Data sent to serial: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Read following action from stdin: b's' -Trying to read 0 bytes from std -Data sent to serial: b's\x00\x00\x00\x00' -Data sent to serial: b'' -Read following action from stdin: b'c' -Trying to read 16 bytes from std -Data sent to serial: b'c\x10\x00\x00\x00' -Data sent to serial: b't\x8d\x1c\x8f\xe6\xe5X\x89\x8b\x02\xbe\x84:\xe4\xc6$' -Read following action from stdin: b'a' -Trying to read 14 bytes from std -Data sent to serial: b'a\x0e\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r' -Read following action from stdin: b'k' -Trying to read 16 bytes from std -Data sent to serial: b'k\x10\x00\x00\x00' -Data sent to serial: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' diff --git a/templates/blackpill/middleware.py b/templates/blackpill/middleware.py index 6b8dc14..8b0bf71 100755 --- a/templates/blackpill/middleware.py +++ b/templates/blackpill/middleware.py @@ -7,7 +7,8 @@ import struct import serial import subprocess -f = open("subprocess.log", "w+") +DBG='1' + ser = serial.Serial('/dev/ttyUSB0', 115200) @@ -23,8 +24,6 @@ def read(channel, l): data = sys.stdin.buffer.read(l) else: raise Exception("read() complains: no sai channelino") -# if channel == "std" and len(data) == 0: -# sys.exit(0) if len(data) != l: raise Exception("could not read %d bytes of data (got %d)" % (l, len(data))) return data @@ -32,7 +31,8 @@ def read(channel, l): def write(channel, data): if channel == 'ser': l = ser.write(data) - f.write("Data sent to serial: " + str(data) + "\n") + if DBG: + print("Data sent to serial: " + str(data) + "\n", file=sys.stderr) elif channel == 'std': l = sys.stdout.buffer.write(data) else: @@ -43,7 +43,8 @@ def write(channel, data): def obtain(channel): l = read(channel, 4) (l, ) = struct.unpack(" 0: os.chdir(script_dir) - f.write(os.getcwd()) flash() print("Hello, World!") while(1): action = read('std', 1) - f.write("Read following action from stdin: %s\n" % action) + if DBG: + print("Read following action from stdin: %s\n" % action, file=sys.stderr) if action == b'c' or action == b'm' or action == b'a' or action == b'k' or action == b's' or action == b'p': data = obtain('std') submit('ser', action, data) @@ -75,9 +78,11 @@ def main(argv): elif action == b'C' or action == b'M' or action == b'A' or action == b'K' or action == b'S' or action == b'P': write('ser', action) data = obtain('ser') - f.write("Obtained following data from serial: %s\n" % data) + if DBG: + print("Obtained following data from serial: %s\n" % data, file=sys.stderr) submit('std', action, data) - f.write("Submitted following data to stdout: %s\n" % data) + if DBG: + print("Submitted following data to stdout: %s\n" % data, file=sys.stderr) else: raise Exception("no capiche aczione %s" % (action)) -- libgit2 0.26.0