DMRD "repeater id" field always set to the "client"

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.
This commit is contained in:
Cort Buffington 2018-08-02 14:21:51 -05:00
parent 1bf629db2d
commit d633595d5e
1 changed files with 2 additions and 0 deletions

View File

@ -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))