diff --git a/server.py b/server.py index 9f79070..70f84d1 100755 --- a/server.py +++ b/server.py @@ -105,7 +105,11 @@ def tt_hh(addr, data): update_pairs(addr, ccid) # 组帧再返回 msg = bytearray(data[:]) - msg[12:-1] = val = "%04x" % int(time.time()) + val = "%04x" % int(time.time()) + tmp=[] + for i in range(0,len(val),2): + tmp.append(int(val[i:i+2],16)) + msg[12:-1] = tmp # 计算校验和 crc = 0 for i in msg[:-1]: