From a571a497e937d345cb09d72586392643af0ba681 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 7 Mar 2017 07:47:48 +0000 Subject: [PATCH 1/6] Remove end of YSF transmission bleep issue. --- ISSUES.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ISSUES.txt b/ISSUES.txt index 3de40dd..3383a5c 100644 --- a/ISSUES.txt +++ b/ISSUES.txt @@ -3,8 +3,7 @@ D-Star: No obvious issues. DMR: There is an issue where transmitted data (text messages) isn’t picked up as reliably from an MMDVM than (say) a Hytera repeater. In order to address this, I need to see a trace from a Hytera repeater transmitting text, both from cold (no tx) and when already running. The DMRRX receiver from the DV4RX code in my GitHub repository would do the job, provided you have a DV4mini and a repeater within range. YSF: There are a number of issues that need addressing: -1. At the end of a transmission, my radio does a nice bleep when it’s listening to a DR-1X but not when receiving from my MMDVM. I don’t know why. I think the YSFRX from DV4RX may be able to give the answer. -2. The data sent to aprs.fi from southern hemisphere users isn’t always correct. Maybe the GPS format used by YSF still has some secrets to reveal. -3. The last page of Wires-X data doesn’t display. A trace of a complete listing from a “real” Wires-X system, right down to the last page would be useful. Yet again the YSFRX would be useful here. +1. The data sent to aprs.fi from southern hemisphere users isn’t always correct. Maybe the GPS format used by YSF still has some secrets to reveal. +2. The last page of Wires-X data doesn’t display. A trace of a complete listing from a “real” Wires-X system, right down to the last page would be useful. Yet again the YSFRX would be useful here. P25: No obvious issues. From edd6708930b8391bf063c1169d22797b986ce00b Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 7 Mar 2017 13:39:41 +0000 Subject: [PATCH 2/6] Don't send a CW Id at the end of a lockout. --- MMDVMHost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 8389ede..4051ba4 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -1268,7 +1268,7 @@ void CMMDVMHost::setMode(unsigned char mode) m_modem->setMode(MODE_IDLE); if (m_ump != NULL) m_ump->setMode(MODE_IDLE); - if (m_mode == MODE_ERROR || m_mode == MODE_LOCKOUT) { + if (m_mode == MODE_ERROR) { m_modem->sendCWId(m_callsign); m_cwIdTimer.setTimeout(m_cwIdTime); m_cwIdTimer.start(); From 917727602c0f84f7bb8a837eb1c8541e731d67cd Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 7 Mar 2017 20:17:01 +0000 Subject: [PATCH 3/6] Remove another YSF issue. --- ISSUES.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ISSUES.txt b/ISSUES.txt index 3383a5c..9c136d8 100644 --- a/ISSUES.txt +++ b/ISSUES.txt @@ -2,8 +2,6 @@ D-Star: No obvious issues. DMR: There is an issue where transmitted data (text messages) isn’t picked up as reliably from an MMDVM than (say) a Hytera repeater. In order to address this, I need to see a trace from a Hytera repeater transmitting text, both from cold (no tx) and when already running. The DMRRX receiver from the DV4RX code in my GitHub repository would do the job, provided you have a DV4mini and a repeater within range. -YSF: There are a number of issues that need addressing: -1. The data sent to aprs.fi from southern hemisphere users isn’t always correct. Maybe the GPS format used by YSF still has some secrets to reveal. -2. The last page of Wires-X data doesn’t display. A trace of a complete listing from a “real” Wires-X system, right down to the last page would be useful. Yet again the YSFRX would be useful here. +YSF: There is an issue that need addressing: The data sent to aprs.fi from southern hemisphere users isn’t always correct. Maybe the GPS format used by YSF still has some secrets to reveal. P25: No obvious issues. From d51b7261cf250fa7967bc995f3a2186b72021ab9 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 7 Mar 2017 20:38:06 +0000 Subject: [PATCH 4/6] Remove the OscOffset parameter. --- Conf.cpp | 29 ++++++++++++----------------- Conf.h | 2 -- MMDVM.ini | 1 - MMDVMHost.cpp | 4 +--- Modem.cpp | 5 ++--- Modem.h | 3 +-- 6 files changed, 16 insertions(+), 28 deletions(-) diff --git a/Conf.cpp b/Conf.cpp index 32297ca..c100fb6 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -90,7 +90,6 @@ m_modemDStarTXLevel(50U), m_modemDMRTXLevel(50U), m_modemYSFTXLevel(50U), m_modemP25TXLevel(50U), -m_modemOscOffset(0), m_modemRSSIMappingFile(), m_modemSamplesDir(), m_modemDebug(false), @@ -217,9 +216,9 @@ bool CConf::read() section = SECTION_P25; else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0) section = SECTION_DSTAR_NETWORK; - else if (::strncmp(buffer, "[DMR Network]", 13U) == 0) + else if (::strncmp(buffer, "[DMR Network]", 13U) == 0) section = SECTION_DMR_NETWORK; - else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0) + else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0) section = SECTION_FUSION_NETWORK; else if (::strncmp(buffer, "[P25 Network]", 13U) == 0) section = SECTION_P25_NETWORK; @@ -236,15 +235,18 @@ bool CConf::read() else section = SECTION_NONE; - continue; - } + continue; + } - char* key = ::strtok(buffer, " \t=\r\n"); - if (key == NULL) - continue; + char* key = ::strtok(buffer, " \t=\r\n"); + if (key == NULL) + continue; - char* value = ::strtok(NULL, "\r\n"); - if (section == SECTION_GENERAL) { + char* value = ::strtok(NULL, "\r\n"); + if (value == NULL) + value = ""; + + if (section == SECTION_GENERAL) { if (::strcmp(key, "Callsign") == 0) { // Convert the callsign to upper case for (unsigned int i = 0U; value[i] != 0; i++) @@ -329,8 +331,6 @@ bool CConf::read() m_modemYSFTXLevel = (unsigned int)::atoi(value); else if (::strcmp(key, "P25TXLevel") == 0) m_modemP25TXLevel = (unsigned int)::atoi(value); - else if (::strcmp(key, "OscOffset") == 0) - m_modemOscOffset = ::atoi(value); else if (::strcmp(key, "RSSIMappingFile") == 0) m_modemRSSIMappingFile = value; else if (::strcmp(key, "SamplesDir") == 0) @@ -742,11 +742,6 @@ unsigned int CConf::getModemP25TXLevel() const return m_modemP25TXLevel; } -int CConf::getModemOscOffset() const -{ - return m_modemOscOffset; -} - std::string CConf::getModemRSSIMappingFile () const { return m_modemRSSIMappingFile; diff --git a/Conf.h b/Conf.h index 1136a60..57401e2 100644 --- a/Conf.h +++ b/Conf.h @@ -77,7 +77,6 @@ public: unsigned int getModemDMRTXLevel() const; unsigned int getModemYSFTXLevel() const; unsigned int getModemP25TXLevel() const; - int getModemOscOffset() const; std::string getModemRSSIMappingFile() const; std::string getModemSamplesDir() const; bool getModemDebug() const; @@ -230,7 +229,6 @@ private: unsigned int m_modemDMRTXLevel; unsigned int m_modemYSFTXLevel; unsigned int m_modemP25TXLevel; - int m_modemOscOffset; std::string m_modemRSSIMappingFile; std::string m_modemSamplesDir; bool m_modemDebug; diff --git a/MMDVM.ini b/MMDVM.ini index 56f6396..d7a24fb 100644 --- a/MMDVM.ini +++ b/MMDVM.ini @@ -49,7 +49,6 @@ TXLevel=50 # DMRTXLevel=50 # YSFTXLevel=50 # P25TXLevel=50 -OscOffset=0 RSSIMappingFile=RSSI.dat SamplesDir=. Debug=0 diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 4051ba4..cea5c9b 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -796,7 +796,6 @@ bool CMMDVMHost::createModem() unsigned int colorCode = m_conf.getDMRColorCode(); unsigned int rxFrequency = m_conf.getRxFrequency(); unsigned int txFrequency = m_conf.getTxFrequency(); - int oscOffset = m_conf.getModemOscOffset(); std::string samplesDir = m_conf.getModemSamplesDir(); LogInfo("Modem Parameters"); @@ -814,9 +813,8 @@ bool CMMDVMHost::createModem() LogInfo(" P25 TX Level: %u%%", p25TXLevel); LogInfo(" RX Frequency: %uHz", rxFrequency); LogInfo(" TX Frequency: %uHz", txFrequency); - LogInfo(" Osc. Offset: %dppm", oscOffset); - m_modem = new CModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, oscOffset, samplesDir, debug); + m_modem = new CModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, samplesDir, debug); m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled); m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel); m_modem->setRFParams(rxFrequency, txFrequency); diff --git a/Modem.cpp b/Modem.cpp index fffbb86..408b9c6 100644 --- a/Modem.cpp +++ b/Modem.cpp @@ -85,7 +85,7 @@ const unsigned int MAX_RESPONSES = 30U; const unsigned int BUFFER_LENGTH = 2000U; -CModem::CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, int oscOffset, const std::string& samplesDir, bool debug) : +CModem::CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, const std::string& samplesDir, bool debug) : m_port(port), m_colorCode(0U), m_duplex(duplex), @@ -100,7 +100,6 @@ m_dstarTXLevel(0U), m_dmrTXLevel(0U), m_ysfTXLevel(0U), m_p25TXLevel(0U), -m_oscOffset(oscOffset), m_samplesDir(samplesDir), m_debug(debug), m_rxFrequency(0U), @@ -980,7 +979,7 @@ bool CModem::setConfig() buffer[10U] = m_dmrDelay; - buffer[11U] = (unsigned char)(m_oscOffset + 128); + buffer[11U] = 0U; // Was OscOffset buffer[12U] = (m_dstarTXLevel * 255U) / 100U; buffer[13U] = (m_dmrTXLevel * 255U) / 100U; diff --git a/Modem.h b/Modem.h index 6c31992..1ab6b38 100644 --- a/Modem.h +++ b/Modem.h @@ -34,7 +34,7 @@ enum RESP_TYPE_MMDVM { class CModem { public: - CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, int oscOffset, const std::string& samplesDir, bool debug = false); + CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, const std::string& samplesDir, bool debug = false); ~CModem(); void setRFParams(unsigned int rxFrequency, unsigned int txFrequency); @@ -101,7 +101,6 @@ private: unsigned int m_dmrTXLevel; unsigned int m_ysfTXLevel; unsigned int m_p25TXLevel; - int m_oscOffset; std::string m_samplesDir; bool m_debug; unsigned int m_rxFrequency; From f3a589ce56cf5e47ce872f37d076bd7fdf1fbff9 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 8 Mar 2017 13:01:59 +0000 Subject: [PATCH 5/6] Remove compiler warning. --- Conf.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Conf.cpp b/Conf.cpp index c100fb6..a8201b8 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -193,7 +193,7 @@ bool CConf::read() if (buffer[0U] == '[') { if (::strncmp(buffer, "[General]", 9U) == 0) - section = SECTION_GENERAL; + section = SECTION_GENERAL; else if (::strncmp(buffer, "[Info]", 6U) == 0) section = SECTION_INFO; else if (::strncmp(buffer, "[Log]", 5U) == 0) @@ -216,9 +216,9 @@ bool CConf::read() section = SECTION_P25; else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0) section = SECTION_DSTAR_NETWORK; - else if (::strncmp(buffer, "[DMR Network]", 13U) == 0) + else if (::strncmp(buffer, "[DMR Network]", 13U) == 0) section = SECTION_DMR_NETWORK; - else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0) + else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0) section = SECTION_FUSION_NETWORK; else if (::strncmp(buffer, "[P25 Network]", 13U) == 0) section = SECTION_P25_NETWORK; @@ -235,7 +235,7 @@ bool CConf::read() else section = SECTION_NONE; - continue; + continue; } char* key = ::strtok(buffer, " \t=\r\n"); @@ -244,7 +244,7 @@ bool CConf::read() char* value = ::strtok(NULL, "\r\n"); if (value == NULL) - value = ""; + continue; if (section == SECTION_GENERAL) { if (::strcmp(key, "Callsign") == 0) { From 29d0fecbb8808e152f51e7ef5b5c1de1b735c267 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 9 Mar 2017 07:54:32 +0000 Subject: [PATCH 6/6] Fix OscOffset removal bug. --- Modem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modem.cpp b/Modem.cpp index 408b9c6..0c818a6 100644 --- a/Modem.cpp +++ b/Modem.cpp @@ -979,7 +979,7 @@ bool CModem::setConfig() buffer[10U] = m_dmrDelay; - buffer[11U] = 0U; // Was OscOffset + buffer[11U] = 128U; // Was OscOffset buffer[12U] = (m_dstarTXLevel * 255U) / 100U; buffer[13U] = (m_dmrTXLevel * 255U) / 100U;