dstarrepeater support

dev
Tom Early 5 years ago
parent 4eeafa8848
commit 27a1cdf170

@ -264,8 +264,16 @@ bool CQnetRelay::ProcessGateway(const int len, const unsigned char *raw)
}
//memcpy(dsrp.header.flag, dsvt.hdr.flag, 41);
memcpy(dsrp.header.flag, dsvt.hdr.flag, 3);
if (IS_DSTARREPEATER)
{
memcpy(dsrp.header.r1, dsvt.hdr.rpt2, 8);
memcpy(dsrp.header.r2, dsvt.hdr.rpt1, 8);
}
else
{
memcpy(dsrp.header.r1, dsvt.hdr.rpt1, 8);
memcpy(dsrp.header.r2, dsvt.hdr.rpt2, 8);
}
memcpy(dsrp.header.ur, dsvt.hdr.urcall, 8);
memcpy(dsrp.header.my, dsvt.hdr.mycall, 8);
memcpy(dsrp.header.nm, dsvt.hdr.sfx, 4);
@ -426,6 +434,7 @@ bool CQnetRelay::ReadConfig(const char *cfgFile)
cfg.GetValue(mmdvm_path+"_gateway_port", type, i, 10000, 65535);
MMDVM_OUT_PORT = (unsigned short)i;
cfg.GetValue(mmdvm_path+"_is_dstarrepeater", type, IS_DSTARREPEATER);
cfg.GetValue("log_qso", estr, log_qso);
return false;

@ -56,7 +56,7 @@ private:
char RPTR_MOD;
std::string MMDVM_IP;
unsigned short MMDVM_IN_PORT, MMDVM_OUT_PORT;
bool log_qso;
bool log_qso, IS_DSTARREPEATER;
// parameters
int msock;

@ -114,6 +114,7 @@ mmdvmhost_rx_frequency=0 # in Mhz, not required, set in MMDVM.qn in Hz
mmdvmhost_internal_ip='0.0.0.0' # where MMDVMHost will find the QnetRelay program
mmdvmhost_gateway_port=20010 # which port will QnetRelay be sending on
mmdvmhost_local_port=20011 # which port will MMDVMHost be sending on
mmdvmhost_is_dstarrepeater=false # is this a dstarrepeater or MMDVMHost?
##########################################################################################################################
#

@ -394,7 +394,7 @@ ModuleMenu () {
echo "2 : DVRPTR V1"
echo "3 : ICOM Terminal and Access Point Mode"
echo "4 : MMDVM Modem (like DVMega or ZUMspot) D-Star ONLY!"
echo "5 : MMDVMHost-based Sytem - Requires MMDVMHost"
echo "5 : MMDVMHost or DStarRepeater Sytem"
echo
echo " Anything else will return without selecting"
echo
@ -453,11 +453,12 @@ ModuleMenu () {
echo -n "dv : USB device path = "; EvaluateVar {${mod},itap}_device
echo -n "ap : Set to true if using Access Point Mode = "; EvaluateVar {${mod},itap}_ap_mode
elif [[ "${!mod}" == 'mmdvmhost' ]]; then
echo -n "tx : Transmit frequency, in MHz = "; EvaluateVar {${mod},mmdvmhost}_tx_frequency
echo -n "rx : Receive frequency, in MHz = "; EvaluateVar {${mod},mmdvmhost}_rx_frequency
echo -n "dr : System is DStarRepeater, and _NOT_ MMDVMHost = "; EvaluateVar {${mod},mmdvmhost}_is_dstarrepeater
echo -n "ip : Internal IP address = "; EvaluateVar {${mod},mmdvmhost}_internal_ip
echo -n "gp : Gateway port number = "; EvaluateVar {${mod},mmdvmhost}_gateway_port
echo -n "lp : Local port number = "; EvaluateVar {${mod},mmdvmhost}_local_port
echo -n "tx : Transmit frequency, in MHz = "; EvaluateVar {${mod},mmdvmhost}_tx_frequency
echo -n "rx : Receive frequency, in MHz = "; EvaluateVar {${mod},mmdvmhost}_rx_frequency
elif [[ "${!mod}" == 'mmdvmmodem' ]]; then
echo -n "dv : Device path = "; EvaluateVar {${mod},mmdvmmodem}_device
echo -n "tx : Transmit frequency, in MHz = "; EvaluateVar {${mod},mmdvmmodem}_tx_frequency
@ -486,6 +487,7 @@ ModuleMenu () {
elif [[ "$key" == ag* ]]; then eval ${mod}_agl="$value"
elif [[ "$key" == ar* ]]; then SetBooleanValue ${mod}_auto_link "$value"
elif [[ "$key" == cs* ]]; then eval ${mod}_callsign="${value^^}"
elif [[ "$key" == dr* ]]; then SetBooleanValue ${mod}_is_dstarrepeater
elif [[ "$key" == du* ]]; then SetBooleanValue ${mod}_duplex "$value"
elif [[ "$key" == dv* ]]; then
eval ${mod}_device="$value"
@ -531,6 +533,7 @@ ModuleMenu () {
elif [[ "$value" == ar* ]]; then unset ${mod}_auto_link
elif [[ "$value" == ag* ]]; then unset ${mod}_agl
elif [[ "$value" == cs* ]]; then unset ${mod}_callsign
elif [[ "$value" == dr* ]]; then unset ${mod}_is_dstarrepeater
elif [[ "$value" == du* ]]; then unset ${mod}_duplex
elif [[ "$value" == dv* ]]; then unset ${mod}_device
elif [[ "$value" == fr* ]]; then unset ${mod}_frequency
@ -621,6 +624,7 @@ WriteCFGFile () {
q=${p}_device; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_ap_mode; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
elif [[ "${!p}" == "mmdvmhost" ]]; then
q=${p}_is_dstarrepeater; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_tx_frequency; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_rx_frequency; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_internal_ip; [ -z ${!q+x} ] || echo "${q}='${!q}'" >> $outFile

Loading…
Cancel
Save

Powered by TurnKey Linux.