don't respond on error, only one line of output
[veternica] / ser-kramer.py
old mode 100644 (file)
new mode 100755 (executable)
index 322316a..1ab5d9d
@@ -25,13 +25,14 @@ def read_and_respond():
         elif read_bytes == b"\x14\x81\x80\x81":
             response = b"\x54\x81\x80\x81"
         else:
-            response = b"\xDE\xAD\xBE\xEF"
+            response = b""
+            #response = b"\xDE\xAD\xBE\xEF"
+            print("ERROR no reponse for", read_bytes.hex())
 
         # Send the response back
         ser.write(response)
 
-        print("Received:", read_bytes, read_bytes.hex())
-        print("Response:", response, response.hex())
+        print("<<", read_bytes.hex(), ">>", response.hex())
 
 if __name__ == "__main__":
     read_and_respond()