diff --git a/pyxcp/transport/can.py b/pyxcp/transport/can.py index e073d7c..5464f45 100644 --- a/pyxcp/transport/can.py +++ b/pyxcp/transport/can.py @@ -321,7 +321,7 @@ def dataReceived(self, payload: bytes, recv_timestamp: float = None): self.processResponse( payload, len(payload), - counter=self.counterReceived + 1, + counter=(self.counterReceived + 1) & 0xffff, recv_timestamp=recv_timestamp, )