Add timestamp - try again

options
Simon 4 years ago
parent 6a75ac4de9
commit edcbc13287

@ -294,7 +294,7 @@ class OPENBRIDGE(DatagramProtocol):
elif _packet[:4] == DMRE: elif _packet[:4] == DMRE:
_data = _packet[:53] _data = _packet[:53]
_timestamp = _packet[53:61] _timestamp = _packet[53:60]
_hash = _packet[61:] _hash = _packet[61:]
#_ckhs = hmac_new(self._config['PASSPHRASE'],_data,sha1).digest() #_ckhs = hmac_new(self._config['PASSPHRASE'],_data,sha1).digest()
_h = blake2b(key=self._config['PASSPHRASE'], digest_size=16) _h = blake2b(key=self._config['PASSPHRASE'], digest_size=16)
@ -372,7 +372,7 @@ class OPENBRIDGE(DatagramProtocol):
#Remove timestamp from data. For now dmrd_received does not expect it #Remove timestamp from data. For now dmrd_received does not expect it
#Leaving it in screws up the AMBE data #Leaving it in screws up the AMBE data
#_data = b''.join([_data[:5],_data[12:]]) #_data = b''.join([_data[:5],_data[12:]])
_data = b''.join([DMRD,_data[12:]]) _data = b''.join([DMRD,_data[4:]])
# Userland actions -- typically this is the function you subclass for an application # Userland actions -- typically this is the function you subclass for an application
self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash) self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash)
#Silently treat a DMRD packet like a keepalive - this is because it's traffic and the #Silently treat a DMRD packet like a keepalive - this is because it's traffic and the

Loading…
Cancel
Save

Powered by TurnKey Linux.