Nat work
This commit is contained in:
parent
b0175dbbbf
commit
056e55823e
@ -19,6 +19,8 @@ import binascii
|
|||||||
import dmrlink
|
import dmrlink
|
||||||
from dmrlink import IPSC, UnauthIPSC, NETWORK, networks, int_id, send_to_ipsc, dmr_nat, logger
|
from dmrlink import IPSC, UnauthIPSC, NETWORK, networks, int_id, send_to_ipsc, dmr_nat, logger
|
||||||
|
|
||||||
|
NAT = True
|
||||||
|
|
||||||
# Notes and pieces of next steps...
|
# Notes and pieces of next steps...
|
||||||
# RPT_WAKE_UP = b'\x85' + NETWORK[_network]['LOCAL']['RADIO_ID] + b'\x00\x00\x00\x01' + b'\x01' + b'\x01'
|
# RPT_WAKE_UP = b'\x85' + NETWORK[_network]['LOCAL']['RADIO_ID] + b'\x00\x00\x00\x01' + b'\x01' + b'\x01'
|
||||||
# TS1 = 0, TS2 = 1
|
# TS1 = 0, TS2 = 1
|
||||||
@ -43,6 +45,7 @@ class bridgeIPSC(IPSC):
|
|||||||
#************************************************
|
#************************************************
|
||||||
|
|
||||||
def group_voice(self, _network, _src_sub, _dst_sub, _ts, _end, _peerid, _data):
|
def group_voice(self, _network, _src_sub, _dst_sub, _ts, _end, _peerid, _data):
|
||||||
|
print('packet ', h(_src_sub))
|
||||||
if (_ts not in self.ACTIVE_CALLS):
|
if (_ts not in self.ACTIVE_CALLS):
|
||||||
self.ACTIVE_CALLS.append(_ts)
|
self.ACTIVE_CALLS.append(_ts)
|
||||||
# send repeater wake up, but send them when a repeater is likely not TXing check time since end (see below)
|
# send repeater wake up, but send them when a repeater is likely not TXing check time since end (see below)
|
||||||
@ -115,4 +118,4 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
networks[ipsc_network] = bridgeUnauthIPSC(ipsc_network)
|
networks[ipsc_network] = bridgeUnauthIPSC(ipsc_network)
|
||||||
reactor.listenUDP(NETWORK[ipsc_network]['LOCAL']['PORT'], networks[ipsc_network])
|
reactor.listenUDP(NETWORK[ipsc_network]['LOCAL']['PORT'], networks[ipsc_network])
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
@ -490,8 +490,8 @@ class IPSC(DatagramProtocol):
|
|||||||
|
|
||||||
def reporting_loop(self):
|
def reporting_loop(self):
|
||||||
# Right now, without this, we really dont' know anything is happening.
|
# Right now, without this, we really dont' know anything is happening.
|
||||||
print_master(self._network)
|
#print_master(self._network)
|
||||||
print_peer_list(self._network)
|
#print_peer_list(self._network)
|
||||||
logger.debug('(%s) Periodic Connection Maintenance Loop Started', self._network)
|
logger.debug('(%s) Periodic Connection Maintenance Loop Started', self._network)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -791,4 +791,4 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
networks[ipsc_network] = UnauthIPSC(ipsc_network)
|
networks[ipsc_network] = UnauthIPSC(ipsc_network)
|
||||||
reactor.listenUDP(NETWORK[ipsc_network]['LOCAL']['PORT'], networks[ipsc_network])
|
reactor.listenUDP(NETWORK[ipsc_network]['LOCAL']['PORT'], networks[ipsc_network])
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user