From d633595d5e1c59694246dd0471076add5ab2bd65 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Thu, 2 Aug 2018 14:21:51 -0500 Subject: [PATCH] DMRD "repeater id" field always set to the "client" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If Master -> Client, it is the client’s radio ID, if it is Client -> Master, it is the client radio ID. This appears to be the most correct way, though admittedly not enforced, and might be better to use the originating repeater/hotspot radio ID, but that’s for another day. --- hblink.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hblink.py b/hblink.py index f9f2b94..25b94d4 100755 --- a/hblink.py +++ b/hblink.py @@ -258,6 +258,8 @@ class HBSYSTEM(DatagramProtocol): def send_client(self, _client, _packet): _ip = self._clients[_client]['IP'] _port = self._clients[_client]['PORT'] + if _packet[:4] == 'DMRD': + _packet = _packet[:11] + _client + _packet[15:] self.transport.write(_packet, (_ip, _port)) # KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!! #self._logger.debug('(%s) TX Packet to %s on port %s: %s', self._clients[_client]['RADIO_ID'], self._clients[_client]['IP'], self._clients[_client]['PORT'], ahex(_packet))