mirror of
https://github.com/ShaYmez/MMDVM_CM.git
synced 2025-05-24 10:12:27 -04:00
Merge pull request #49 from nostar/master
Add XLXHosts support to P252DMR and re-link to XLX after DMR timeout
This commit is contained in:
commit
b9c3c3fc96
@ -4,7 +4,7 @@ This is the source code of DMR2P25, a software for digital voice conversion from
|
|||||||
|
|
||||||
You can use this software with MMDVMHost and P25Gateway, with the default UDP ports:
|
You can use this software with MMDVMHost and P25Gateway, with the default UDP ports:
|
||||||
|
|
||||||
MMDVMHost <-> DMR2P25 <-> P25Gateway
|
MMDVMHost(DMR Mode):62032 <-> 62037:DMR2P25:32010 <-> 42020:P25Gateway:42010 <-> (P25Reflector)
|
||||||
|
|
||||||
Program your DMR radio with P25 TG numbers.
|
Program your DMR radio with P25 TG numbers.
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ This software is licenced under the GPL v2 and is intended for amateur and educa
|
|||||||
This utility is not built with the other cross mode ulitities, and has 2 external dependencies:
|
This utility is not built with the other cross mode ulitities, and has 2 external dependencies:
|
||||||
|
|
||||||
imbe_vocoder https://github.com/nostar/imbe_vocoder
|
imbe_vocoder https://github.com/nostar/imbe_vocoder
|
||||||
|
|
||||||
md380_vocoder https://github.com/nostar/md380_vocoder
|
md380_vocoder https://github.com/nostar/md380_vocoder
|
||||||
|
|
||||||
With these dependencies installed, run 'make' from the source directory.
|
With these dependencies installed, run 'make' from the source directory.
|
||||||
|
@ -329,8 +329,9 @@ void CDMRNetwork::close()
|
|||||||
m_timeoutTimer.stop();
|
m_timeoutTimer.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDMRNetwork::clock(unsigned int ms)
|
bool CDMRNetwork::clock(unsigned int ms)
|
||||||
{
|
{
|
||||||
|
bool r = false;
|
||||||
m_delayBuffers[1U]->clock(ms);
|
m_delayBuffers[1U]->clock(ms);
|
||||||
m_delayBuffers[2U]->clock(ms);
|
m_delayBuffers[2U]->clock(ms);
|
||||||
|
|
||||||
@ -341,7 +342,7 @@ void CDMRNetwork::clock(unsigned int ms)
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
ret = writeLogin();
|
ret = writeLogin();
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
m_status = WAITING_LOGIN;
|
m_status = WAITING_LOGIN;
|
||||||
m_timeoutTimer.start();
|
m_timeoutTimer.start();
|
||||||
@ -350,7 +351,7 @@ void CDMRNetwork::clock(unsigned int ms)
|
|||||||
m_retryTimer.start();
|
m_retryTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
in_addr address;
|
in_addr address;
|
||||||
@ -360,7 +361,7 @@ void CDMRNetwork::clock(unsigned int ms)
|
|||||||
LogError("DMR, Socket has failed, retrying connection to the master");
|
LogError("DMR, Socket has failed, retrying connection to the master");
|
||||||
close();
|
close();
|
||||||
open();
|
open();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (m_debug && length > 0)
|
// if (m_debug && length > 0)
|
||||||
@ -386,7 +387,7 @@ void CDMRNetwork::clock(unsigned int ms)
|
|||||||
LogError("DMR, Login to the master has failed, retrying network ...");
|
LogError("DMR, Login to the master has failed, retrying network ...");
|
||||||
close();
|
close();
|
||||||
open();
|
open();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (::memcmp(m_buffer, "RPTACK", 6U) == 0) {
|
} else if (::memcmp(m_buffer, "RPTACK", 6U) == 0) {
|
||||||
switch (m_status) {
|
switch (m_status) {
|
||||||
@ -430,6 +431,7 @@ void CDMRNetwork::clock(unsigned int ms)
|
|||||||
LogError("DMR, Master is closing down");
|
LogError("DMR, Master is closing down");
|
||||||
close();
|
close();
|
||||||
open();
|
open();
|
||||||
|
r = true;
|
||||||
} else if (::memcmp(m_buffer, "MSTPONG", 7U) == 0) {
|
} else if (::memcmp(m_buffer, "MSTPONG", 7U) == 0) {
|
||||||
m_timeoutTimer.start();
|
m_timeoutTimer.start();
|
||||||
} else if (::memcmp(m_buffer, "RPTSBKN", 7U) == 0) {
|
} else if (::memcmp(m_buffer, "RPTSBKN", 7U) == 0) {
|
||||||
@ -469,7 +471,9 @@ void CDMRNetwork::clock(unsigned int ms)
|
|||||||
LogError("DMR, Connection to the master has timed out, retrying connection");
|
LogError("DMR, Connection to the master has timed out, retrying connection");
|
||||||
close();
|
close();
|
||||||
open();
|
open();
|
||||||
|
r = true;
|
||||||
}
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDMRNetwork::reset(unsigned int slotNo)
|
void CDMRNetwork::reset(unsigned int slotNo)
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
bool wantsBeacon();
|
bool wantsBeacon();
|
||||||
|
|
||||||
void clock(unsigned int ms);
|
bool clock(unsigned int ms);
|
||||||
|
|
||||||
void reset(unsigned int slotNo);
|
void reset(unsigned int slotNo);
|
||||||
|
|
||||||
|
@ -299,6 +299,10 @@ int CP252DMR::run()
|
|||||||
unsigned int p25_localPort = m_conf.getP25LocalPort();
|
unsigned int p25_localPort = m_conf.getP25LocalPort();
|
||||||
bool p25_debug = m_conf.getP25NetworkDebug();
|
bool p25_debug = m_conf.getP25NetworkDebug();
|
||||||
|
|
||||||
|
std::string fileName = m_conf.getDMRXLXFile();
|
||||||
|
m_xlxReflectors = new CReflectors(fileName, 60U);
|
||||||
|
m_xlxReflectors->load();
|
||||||
|
|
||||||
m_p25Network = new CP25Network(p25_localAddress, p25_localPort, p25_dstAddress, p25_dstPort, m_callsign, p25_debug);
|
m_p25Network = new CP25Network(p25_localAddress, p25_localPort, p25_dstAddress, p25_dstPort, m_callsign, p25_debug);
|
||||||
|
|
||||||
|
|
||||||
@ -788,7 +792,9 @@ int CP252DMR::run()
|
|||||||
pollTimer.start();
|
pollTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dmrNetwork->clock(ms);
|
if(m_dmrNetwork->clock(ms)){
|
||||||
|
m_xlxConnected = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_xlxReflectors != NULL)
|
if (m_xlxReflectors != NULL)
|
||||||
m_xlxReflectors->clock(ms);
|
m_xlxReflectors->clock(ms);
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
This is the source code of P252DMR, a software for digital voice conversion from P25 to DMR digital mode, based on Jonathan G4KLX's [MMDVM](https://github.com/g4klx) software. Unlike the other cross mode utilities upon which this is based, this utility performs software transcoding between IMBE 4400x2800(P25) and AMBE+2 2450x1150(DMR).
|
This is the source code of P252DMR, a software for digital voice conversion from P25 to DMR digital mode, based on Jonathan G4KLX's [MMDVM](https://github.com/g4klx) software. Unlike the other cross mode utilities upon which this is based, this utility performs software transcoding between IMBE 4400x2800(P25) and AMBE+2 2450x1150(DMR).
|
||||||
|
|
||||||
|
You can use this software with MMDVMHost and P25Gateway, with the default UDP ports:
|
||||||
|
|
||||||
|
MMDVMHost(P25 Mode):32010 <-> 42020:P25Gateway:42010 <-> 42012:P252DMR <-> (DMR Master server)
|
||||||
|
|
||||||
If you want to connect directly to a XLX reflector (with DMR support), you only need to uncomment ([DMR Network] section):
|
If you want to connect directly to a XLX reflector (with DMR support), you only need to uncomment ([DMR Network] section):
|
||||||
|
|
||||||
XLXFile=XLXHosts.txt
|
XLXFile=XLXHosts.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user