From 8e78d70f0e09a38cd8ef6eec852a5afdfc523d53 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Sat, 23 Nov 2013 17:30:12 -0600 Subject: [PATCH] THREE PACKET TYPES FIGURED OUT! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0x61, 0x62 and 0x63 have been mostly decoded. Still don’t know what all of the pieces do, but know what they’re for finally! This will mean big things for log.py as I figure out the details. --- README.md | 6 +++--- bridge.py | 6 +++--- dmrlink.py | 24 ++++++++++++------------ ipsc/ipsc_message_types.py | 14 +++++++------- log.py | 12 ++++++------ 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 87ba445..35741e4 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ Each peer will send keep-alives to each other peer in the IPSC network at an int The following sections of this document will include various packet types. This is a list of currently known types and their meanings. Note: The names are arbitrarily chosen with the intention of being descriptive, and each is defined by what they've been "observed" to do in the wild. CALL_CONFIRMATION = 0x05 Confirmation FROM the recipient of a confirmed call. - CALL_CTL_1 = 0x61 | - CALL_CTL_2 = 0x62 | Call control messages, exact use unknown - CALL_CTL_3 = 0x63 | + CALL_MON_ORIGIN = 0x61 Sent to Repeater Call Monitor Peers from repeater originating a call + CALL_MON_RPT = 0x62 Sent to Repeater Call Monitor Peers from all repeaters repeating a call + CALL_MON_NACK = 0x63 Sent to Repeater Call Monitor Peers from repeaters that cannot transmit a call (ie. ID in progress) XCMP_XNL = 0x70 Control protocol messages GROUP_VOICE = 0x80 This is a group voice call PVT_VOICE = 0x81 This is a private voice call diff --git a/bridge.py b/bridge.py index 7e24123..40317da 100755 --- a/bridge.py +++ b/bridge.py @@ -82,13 +82,13 @@ class bridgeIPSC(IPSC): def private_data(self, _network, _src_sub, _dst_sub, _ts, _end, _peerid, _data): pass - def call_ctl_1(self, _network, _data): + def call_mon_origin(self, _network, _data): pass - def call_ctl_2(self, _network, _data): + def call_mon_rpt(self, _network, _data): pass - def call_ctl_3(self, _network, _data): + def call_mon_nack(self, _network, _data): pass def xcmp_xnl(self, _network, _data): diff --git a/dmrlink.py b/dmrlink.py index dde83d3..0fdcd36 100755 --- a/dmrlink.py +++ b/dmrlink.py @@ -416,14 +416,14 @@ class IPSC(DatagramProtocol): # CALLBACK FUNCTIONS FOR USER PACKET TYPES #************************************************ - def call_ctl_1(self, _network, _data): - print('({}) Call Control Type 1 Packet Received: {}' .format(_network, h(_data))) + def call_mon_origin(self, _network, _data): + print('({}) Repeater Call Monitor Origin Packet Received: {}' .format(_network, h(_data))) - def call_ctl_2(self, _network, _data): - print('({}) Call Control Type 2 Packet Received: {}' .format(_network, h(_data))) + def call_mon_rpt(self, _network, _data): + print('({}) Repeater Call Monitor Repeating Packet Received: {}' .format(_network, h(_data))) - def call_ctl_3(self, _network, _data): - print('({}) Call Control Type 3 Packet Received: {}' .format(_network, h(_data))) + def call_mon_nack(self, _network, _data): + print('({}) Repeater Call Monitor NACK Packet Received: {}' .format(_network, h(_data))) def xcmp_xnl(self, _network, _data): #print('({}) XCMP/XNL Packet Received' .format(_network)) @@ -659,16 +659,16 @@ class IPSC(DatagramProtocol): self.xcmp_xnl(self._network, data) return - elif (_packettype == CALL_CTL_1): - self.call_ctl_1(self._network, data) + elif (_packettype == call_mon_origin): + self.call_mon_origin(self._network, data) return - elif (_packettype == CALL_CTL_2): - self.call_ctl_2(self._network, data) + elif (_packettype == call_mon_rpt): + self.call_mon_rpt(self._network, data) return - elif (_packettype == CALL_CTL_3): - self.call_ctl_3(self._network, data) + elif (_packettype == call_mon_nack): + self.call_mon_nack(self._network, data) return # Connection maintenance packets that fall into this category diff --git a/ipsc/ipsc_message_types.py b/ipsc/ipsc_message_types.py index 8796ce9..e60e206 100644 --- a/ipsc/ipsc_message_types.py +++ b/ipsc/ipsc_message_types.py @@ -8,9 +8,9 @@ # Known IPSC Message Types CALL_CONFIRMATION = b'\x05' # Confirmation FROM the recipient of a confirmed call. -CALL_CTL_1 = b'\x61' # | -CALL_CTL_2 = b'\x62' # | Exact meaning unknown -CALL_CTL_3 = b'\x63' # | +CALL_MON_ORIGIN = b'\x61' # | +CALL_MON_RPT = b'\x62' # | Exact meaning unknown +CALL_MON_NACK = b'\x63' # | XCMP_XNL = b'\x70' # XCMP/XNL control message GROUP_VOICE = b'\x80' PVT_VOICE = b'\x81' @@ -47,7 +47,7 @@ LINK_TYPE_IPSC = b'\x04' IPSC_VER = LINK_TYPE_IPSC + IPSC_VER_19 + LINK_TYPE_IPSC + IPSC_VER_17 # Packets that must originate from a peer (or master peer) -ANY_PEER_REQUIRED = [GROUP_VOICE, PVT_VOICE, GROUP_DATA, PVT_DATA, CALL_CTL_1, CALL_CTL_2, CALL_CTL_3, XCMP_XNL, RPT_WAKE_UP, DE_REG_REQ] +ANY_PEER_REQUIRED = [GROUP_VOICE, PVT_VOICE, GROUP_DATA, PVT_DATA, CALL_MON_ORIGIN, CALL_MON_RPT, CALL_MON_NACK, XCMP_XNL, RPT_WAKE_UP, DE_REG_REQ] # Packets that must originate from a non-master peer PEER_REQUIRED = [PEER_ALIVE_REQ, PEER_ALIVE_REPLY, PEER_REG_REQ, PEER_REG_REPLY] @@ -71,9 +71,9 @@ REQ_VALID_MASTER = [ ] REQ_MASTER_CONNECTED = [ - CALL_CTL_1, - CALL_CTL_2, - CALL_CTL_3, + CALL_MON_ORIGIN, + CALL_MON_RPT, + CALL_MON_NACK, XCMP_XNL, GROUP_VOICE, PVT_VOICE, diff --git a/log.py b/log.py index 1614f4e..8b135c7 100644 --- a/log.py +++ b/log.py @@ -28,14 +28,14 @@ class logIPSC(IPSC): # CALLBACK FUNCTIONS FOR USER PACKET TYPES #************************************************ - def call_ctl_1(self, _network, _data): - print('({}) Call Control Type 1 Packet Received From: {}' .format(_network, _src_sub)) + def call_mon_origin(self, _network, _data): + print('({}) Repeater Call Monitor Origin Packet Received From: {}' .format(_network, _src_sub)) - def call_ctl_2(self, _network, _data): - print('({}) Call Control Type 2 Packet Received' .format(_network)) + def call_mon_rpt(self, _network, _data): + print('({}) Repeater Call Monitor Repeating Packet Received' .format(_network)) - def call_ctl_3(self, _network, _data): - print('({}) Call Control Type 3 Packet Received' .format(_network)) + def call_mon_nack(self, _network, _data): + print('({}) Repeater Call Monitor NACK Packet Received' .format(_network)) def xcmp_xnl(self, _network, _data): print('({}) XCMP/XNL Packet Received From: {}' .format(_network, h(_data)))