Skip to main content

IPSC

https://github.com/gunjubas/ipsc/blob/main/242.py

# Known IPSC Message Types
CALL_CONFIRMATION     = b'\x05' # Confirmation FROM the recipient of a confirmed call.
TXT_MESSAGE_ACK       = b'\x54' # Doesn't seem to mean success, though. This code is sent success or failure
CALL_MON_STATUS       = 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'
GROUP_DATA            = b'\x83'
PVT_DATA              = b'\x84'
RPT_WAKE_UP           = b'\x85' # Similar to OTA DMR "wake up"
UNKNOWN_COLLISION     = b'\x86' # Seen when two dmrlinks try to transmit at once
MASTER_REG_REQ        = b'\x90' # FROM peer TO master
MASTER_REG_REPLY      = b'\x91' # FROM master TO peer
PEER_LIST_REQ         = b'\x92' # From peer TO master
PEER_LIST_REPLY       = b'\x93' # From master TO peer
PEER_REG_REQ          = b'\x94' # Peer registration request
PEER_REG_REPLY        = b'\x95' # Peer registration reply
MASTER_ALIVE_REQ      = b'\x96' # FROM peer TO master
MASTER_ALIVE_REPLY    = b'\x97' # FROM master TO peer
PEER_ALIVE_REQ        = b'\x98' # Peer keep alive request
PEER_ALIVE_REPLY      = b'\x99' # Peer keep alive reply
DE_REG_REQ            = b'\x9A' # Request de-registration from system
DE_REG_REPLY          = b'\x9B' # De-registration reply

PEER_OP_MSK       = 0b01000000
PEER_MODE_MSK     = 0b00110000
PEER_MODE_ANALOG  = 0b00010000
PEER_MODE_DIGITAL = 0b00100000
IPSC_TS1_MSK      = 0b00001100
IPSC_TS2_MSK      = 0b00000011

LINK_TYPE_IPSC        = b'\x04'
# IPSC Version Information
IPSC_VER_14           = b'\x00'
IPSC_VER_15           = b'\x00'
IPSC_VER_15A          = b'\x00'
IPSC_VER_16           = b'\x01'
IPSC_VER_17           = b'\x02'
IPSC_VER_18           = b'\x02'
IPSC_VER_19           = b'\x03'
IPSC_VER_22           = b'\x04'

IPSC_VER              = LINK_TYPE_IPSC + IPSC_VER_17 + LINK_TYPE_IPSC + IPSC_VER_16

BURST_DATA_TYPE = {
    'VOICE_HEAD':  b'\x01',
    'VOICE_TERM':  b'\x02',
    'SLOT1_VOICE': b'\x0a',
    'SLOT2_VOICE': b'\x8a'   
}