From 323be20ecfe87e212db0259e93af7c2eec969e83 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 13 Feb 2022 15:34:58 +0000 Subject: [PATCH] get data earlier --- hblink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hblink.py b/hblink.py index 4615a64..612095d 100755 --- a/hblink.py +++ b/hblink.py @@ -233,6 +233,7 @@ class OPENBRIDGE(DatagramProtocol): if _packet[:3] == DMR: # DMRData -- encapsulated DMR data frame if _packet[:4] == DMRD: + _data = _packet[:53] _stream_id = _data[16:20] if self._config['VER'] > 1: if _stream_id not in self._laststrid: @@ -240,7 +241,6 @@ class OPENBRIDGE(DatagramProtocol): self._laststrid.append(_stream_id) self.send_bcve() return - _data = _packet[:53] _hash = _packet[53:] _ckhs = hmac_new(self._config['PASSPHRASE'],_data,sha1).digest()