From cf9c945fb62f0d0da0d0d300f0e5ee2fdb3a3e71 Mon Sep 17 00:00:00 2001 From: LongHairedHacker Date: Wed, 26 Oct 2016 17:19:45 +0200 Subject: [PATCH] Smaller software tweaks --- software/python/sss7bus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/python/sss7bus.py b/software/python/sss7bus.py index a7197c0..b14147c 100644 --- a/software/python/sss7bus.py +++ b/software/python/sss7bus.py @@ -82,7 +82,7 @@ class SSS7Bus(object): self._debug("Timeout reading length byte") return False - length = ord(length_byte) - 1 # we read the size length byte already + length = ord(length_byte) + 2 # Payload length + 2 byte CRC16 self._serial.timeout = timeout=self._bit_time * TIMEOUT @@ -139,7 +139,7 @@ class SSS7Bus(object): crc16.update(msg) msg_crc = crc16.digest() - frame = chr(0xAA) + chr(0xFE) + chr(len(msg) + 3) + msg + msg_crc + frame = chr(0xAA) + chr(0xFE) + chr(len(msg)) + msg + msg_crc result = self._send_frame(frame)