diff --git a/test_client.py b/test_client.py new file mode 100644 index 0000000..ab7f68c --- /dev/null +++ b/test_client.py @@ -0,0 +1,82 @@ +import serial, struct, sys +import serial.tools.list_ports + +def get_version(com): + com.write(b"\x00" * 5) + reply = com.read(4) + return struct.unpack(" 2: + name = sys.argv[2] + open("dump.bin", "wb").write(rdata) + elif sys.argv[1] == "write" and len(sys.argv) > 2: + wdata = open(sys.argv[2], "rb").read() + write_flash_full(com, 0, wdata) + start_smc(com) + com.close()