From cf97dc3096bb99986d69df464f2ec5e1aee84403 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 26 Aug 2025 15:14:00 +0100 Subject: [PATCH] Remove AX.25 --- AX25Control.cpp | 252 -------------------------------------- AX25Control.h | 50 -------- AX25Defines.h | 39 ------ AX25Network.cpp | 183 --------------------------- AX25Network.h | 62 ---------- Conf.cpp | 100 +-------------- Conf.h | 28 ----- MMDVM.ini | 15 --- MMDVMHost.cpp | 157 ++---------------------- MMDVMHost.h | 8 +- MMDVMHost.vcxproj | 5 - MMDVMHost.vcxproj.filters | 15 --- Makefile | 2 +- Makefile.Pi.Adafruit | 2 +- Makefile.Pi.HD44780 | 2 +- Makefile.Pi.I2C | 2 +- Makefile.Pi.OLED | 2 +- Makefile.Pi.PCF8574 | 2 +- Modem.cpp | 127 ++----------------- Modem.h | 18 +-- RemoteControl.cpp | 4 - RemoteControl.h | 2 - Version.h | 2 +- 23 files changed, 27 insertions(+), 1052 deletions(-) delete mode 100644 AX25Control.cpp delete mode 100644 AX25Control.h delete mode 100644 AX25Defines.h delete mode 100644 AX25Network.cpp delete mode 100644 AX25Network.h diff --git a/AX25Control.cpp b/AX25Control.cpp deleted file mode 100644 index bcb5587..0000000 --- a/AX25Control.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (C) 2020,2025 Jonathan Naylor, G4KLX - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include "AX25Control.h" -#include "AX25Defines.h" -#include "Utils.h" -#include "Log.h" - -#include -#include -#include -#include - -// #define DUMP_AX25 - -const unsigned char BIT_MASK_TABLE[] = { 0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U }; - -#define WRITE_BIT1(p,i,b) p[(i)>>3] = (b) ? (p[(i)>>3] | BIT_MASK_TABLE[(i)&7]) : (p[(i)>>3] & ~BIT_MASK_TABLE[(i)&7]) -#define READ_BIT1(p,i) (p[(i)>>3] & BIT_MASK_TABLE[(i)&7]) - -CAX25Control::CAX25Control(CAX25Network* network, bool trace) : -m_network(network), -m_trace(trace), -m_enabled(true), -m_fp(nullptr) -{ -} - -CAX25Control::~CAX25Control() -{ -} - -bool CAX25Control::writeModem(unsigned char *data, unsigned int len) -{ - assert(data != nullptr); - - if (!m_enabled) - return false; - - if (m_trace) - decode(data, len); - - CUtils::dump(1U, "AX.25 received packet", data, len); - - if (m_network == nullptr) - return true; - - return m_network->write(data, len); -} - -unsigned int CAX25Control::readModem(unsigned char* data) -{ - assert(data != nullptr); - - if (m_network == nullptr) - return 0U; - - if (!m_enabled) - return 0U; - - unsigned int length = m_network->read(data, 500U); - - if (length > 0U) - CUtils::dump(1U, "AX.25 transmitted packet", data, length); - - return length; -} - -bool CAX25Control::openFile() -{ - if (m_fp != nullptr) - return true; - - time_t t; - ::time(&t); - - struct tm* tm = ::localtime(&t); - - char name[100U]; - ::sprintf(name, "AX25_%04d%02d%02d_%02d%02d%02d.ambe", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); - - m_fp = ::fopen(name, "wb"); - if (m_fp == nullptr) - return false; - - ::fwrite("AX25", 1U, 4U, m_fp); - - return true; -} - -bool CAX25Control::writeFile(const unsigned char* data, unsigned int length) -{ - if (m_fp == nullptr) - return false; - - ::fwrite(&length, 1U, sizeof(unsigned int), m_fp); - ::fwrite(data, 1U, length, m_fp); - - return true; -} - -void CAX25Control::closeFile() -{ - if (m_fp != nullptr) { - ::fclose(m_fp); - m_fp = nullptr; - } -} - -void CAX25Control::enable(bool enabled) -{ - m_enabled = enabled; -} - -void CAX25Control::decode(const unsigned char* data, unsigned int length) -{ - assert(data != nullptr); - assert(length >= 15U); - - std::string text; - - bool more = decodeAddress(data + 7U, text); - - text += '>'; - - decodeAddress(data + 0U, text); - - unsigned int n = 14U; - while (more && n < length) { - text += ','; - more = decodeAddress(data + n, text, true); - n += 7U; - } - - text += ' '; - - if ((data[n] & 0x01U) == 0x00U) { - // I frame - char t[20U]; - ::sprintf(t, "", (data[n] >> 1) & 0x07U, (data[n] >> 5) & 0x07U); - text += t; - } else { - if ((data[n] & 0x02U) == 0x00U) { - // S frame - char t[20U]; - switch (data[n] & 0x0FU) { - case 0x01U: - sprintf(t, "", (data[n] >> 5) & 0x07U); - break; - case 0x05U: - sprintf(t, "", (data[n] >> 5) & 0x07U); - break; - case 0x09U: - sprintf(t, "", (data[n] >> 5) & 0x07U); - break; - case 0x0DU: - sprintf(t, "", (data[n] >> 5) & 0x07U); - break; - default: - sprintf(t, "", (data[n] >> 5) & 0x07U); - break; - } - - text += t; - LogMessage("AX.25, %s", text.c_str()); - return; - } else { - // U frame - switch (data[n] & 0xEFU) { - case 0x6FU: - text += ""; - break; - case 0x2FU: - text += ""; - break; - case 0x43U: - text += ""; - break; - case 0x0FU: - text += ""; - break; - case 0x63U: - text += ""; - break; - case 0x87U: - text += ""; - break; - case 0x03U: - text += ""; - break; - case 0xAFU: - text += ""; - break; - case 0xE3U: - text += ""; - break; - default: - text += ""; - break; - } - - if ((data[n] & 0xEFU) != 0x03U) { - LogMessage("AX.25, %s", text.c_str()); - return; - } - } - } - - n += 2U; - - LogMessage("AX.25, %s %.*s", text.c_str(), length - n, data + n); -} - -bool CAX25Control::decodeAddress(const unsigned char* data, std::string& text, bool isDigi) const -{ - assert(data != nullptr); - - for (unsigned int i = 0U; i < 6U; i++) { - char c = data[i] >> 1; - if (c != ' ') - text += c; - } - - unsigned char ssid = (data[6U] >> 1) & 0x0FU; - if (ssid > 0U) { - text += '-'; - if (ssid >= 10U) { - text += '1'; - text += '0' + ssid - 10U; - } - else { - text += '0' + ssid; - } - } - - if (isDigi) { - if ((data[6U] & 0x80U) == 0x80U) - text += '*'; - } - - return (data[6U] & 0x01U) == 0x00U; -} diff --git a/AX25Control.h b/AX25Control.h deleted file mode 100644 index b4fed2a..0000000 --- a/AX25Control.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2020 by Jonathan Naylor G4KLX - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#if !defined(AX25Control_H) -#define AX25Control_H - -#include "AX25Network.h" - -#include - -class CAX25Control { -public: - CAX25Control(CAX25Network* network, bool trace); - ~CAX25Control(); - - bool writeModem(unsigned char* data, unsigned int len); - - unsigned int readModem(unsigned char* data); - - void enable(bool enabled); - -private: - CAX25Network* m_network; - bool m_trace; - bool m_enabled; - FILE* m_fp; - - void decode(const unsigned char* data, unsigned int length); - bool decodeAddress(const unsigned char* data, std::string& text, bool isDigi = false) const; - bool openFile(); - bool writeFile(const unsigned char* data, unsigned int length); - void closeFile(); -}; - -#endif diff --git a/AX25Defines.h b/AX25Defines.h deleted file mode 100644 index a0f4c80..0000000 --- a/AX25Defines.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2020 by Jonathan Naylor G4KLX - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#if !defined(AX25Defines_H) -#define AX25Defines_H - -const unsigned int AX25_CALLSIGN_TEXT_LENGTH = 6U; -const unsigned int AX25_SSID_LENGTH = 1U; -const unsigned int AX25_CALLSIGN_LENGTH = 7U; - -const unsigned int AX25_MAX_DIGIPEATERS = 6U; - -const unsigned char AX25_PID_NOL3 = 0xF0U; - -const unsigned int AX25_MAX_FRAME_LENGTH_BYTES = 330U; // Callsign (7) + Callsign (7) + 8 Digipeaters (56) + - // Control (1) + PID (1) + Data (256) + Checksum (2) -const unsigned char AX25_KISS_DATA = 0x00U; - -const unsigned char AX25_FEND = 0xC0U; -const unsigned char AX25_FESC = 0xDBU; -const unsigned char AX25_TFEND = 0xDCU; -const unsigned char AX25_TFESC = 0xDDU; - -#endif diff --git a/AX25Network.cpp b/AX25Network.cpp deleted file mode 100644 index 36c84e5..0000000 --- a/AX25Network.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2020,2025 by Jonathan Naylor G4KLX - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "AX25Network.h" -#include "AX25Defines.h" -#include "Defines.h" -#include "Utils.h" -#include "Log.h" - -#include -#include -#include - -const unsigned int BUFFER_LENGTH = 500U; - - -CAX25Network::CAX25Network(const std::string& port, unsigned int speed, bool debug) : -m_serial(port, speed, false), -m_txData(nullptr), -m_rxData(nullptr), -m_rxLength(0U), -m_rxLastChar(0U), -m_debug(debug), -m_enabled(false) -{ - assert(!port.empty()); - assert(speed > 0U); - - m_txData = new unsigned char[BUFFER_LENGTH]; - m_rxData = new unsigned char[BUFFER_LENGTH]; -} - -CAX25Network::~CAX25Network() -{ - delete[] m_txData; - delete[] m_rxData; -} - -bool CAX25Network::open() -{ - LogMessage("Opening AX25 network connection"); - - return m_serial.open(); -} - -bool CAX25Network::write(const unsigned char* data, unsigned int length) -{ - assert(data != nullptr); - - if (!m_enabled) - return true; - - unsigned int txLength = 0U; - - m_txData[txLength++] = AX25_FEND; - m_txData[txLength++] = AX25_KISS_DATA; - - for (unsigned int i = 0U; i < length; i++) { - unsigned char c = data[i]; - - switch (c) { - case AX25_FEND: - m_txData[txLength++] = AX25_FESC; - m_txData[txLength++] = AX25_TFEND; - break; - case AX25_FESC: - m_txData[txLength++] = AX25_FESC; - m_txData[txLength++] = AX25_TFESC; - break; - default: - m_txData[txLength++] = c; - break; - } - } - - m_txData[txLength++] = AX25_FEND; - - if (m_debug) - CUtils::dump(1U, "AX25 Network Data Sent", m_txData, txLength); - - return m_serial.write(m_txData, txLength); -} - -unsigned int CAX25Network::read(unsigned char* data, unsigned int length) -{ - assert(data != nullptr); - - bool complete = false; - - unsigned char c; - while (m_serial.read(&c, 1U) > 0) { - if (m_rxLength == 0U && c == AX25_FEND) - m_rxData[m_rxLength++] = c; - else if (m_rxLength > 0U) - m_rxData[m_rxLength++] = c; - - if (m_rxLength > 1U && c == AX25_FEND) { - complete = true; - break; - } - } - - if (!m_enabled) - return 0U; - - if (!complete) - return 0U; - - if (m_rxLength == 0U) - return 0U; - - if (m_rxData[1U] != AX25_KISS_DATA) { - m_rxLength = 0U; - return 0U; - } - - complete = false; - - unsigned int dataLen = 0U; - for (unsigned int i = 2U; i < m_rxLength; i++) { - unsigned char c = m_rxData[i]; - - if (c == AX25_FEND) { - complete = true; - break; - } else if (c == AX25_TFEND && m_rxLastChar == AX25_FESC) { - data[dataLen++] = AX25_FEND; - } else if (c == AX25_TFESC && m_rxLastChar == AX25_FESC) { - data[dataLen++] = AX25_FESC; - } else { - data[dataLen++] = c; - } - - m_rxLastChar = c; - } - - if (!complete) - return 0U; - - if (m_debug) - CUtils::dump(1U, "AX25 Network Data Received", m_rxData, m_rxLength); - - m_rxLength = 0U; - m_rxLastChar = 0U; - - return dataLen; -} - -void CAX25Network::reset() -{ -} - -void CAX25Network::close() -{ - m_serial.close(); - - LogMessage("Closing AX25 network connection"); -} - -void CAX25Network::enable(bool enabled) -{ - m_enabled = enabled; - - if (enabled != m_enabled) { - m_rxLastChar = 0U; - m_rxLength = 0U; - } -} diff --git a/AX25Network.h b/AX25Network.h deleted file mode 100644 index c972ccb..0000000 --- a/AX25Network.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2020,2021 by Jonathan Naylor G4KLX - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef AX25Network_H -#define AX25Network_H - -#if defined(_WIN32) || defined(_WIN64) -#include "UARTController.h" -#else -#include "PseudoTTYController.h" -#endif - -#include -#include - -class CAX25Network { -public: - CAX25Network(const std::string& port, unsigned int speed, bool debug); - ~CAX25Network(); - - bool open(); - - void enable(bool enabled); - - bool write(const unsigned char* data, unsigned int length); - - unsigned int read(unsigned char* data, unsigned int length); - - void reset(); - - void close(); - -private: -#if defined(_WIN32) || defined(_WIN64) - CUARTController m_serial; -#else - CPseudoTTYController m_serial; -#endif - unsigned char* m_txData; - unsigned char* m_rxData; - unsigned int m_rxLength; - unsigned char m_rxLastChar; - bool m_debug; - bool m_enabled; -}; - -#endif diff --git a/Conf.cpp b/Conf.cpp index 409ec1c..52a93a2 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -44,7 +44,6 @@ enum class SECTION { NXDN, POCSAG, FM, - AX25, DSTAR_NETWORK, DMR_NETWORK, FUSION_NETWORK, @@ -52,7 +51,6 @@ enum class SECTION { NXDN_NETWORK, POCSAG_NETWORK, FM_NETWORK, - AX25_NETWORK, TFTSERIAL_DISPLAY, HD44780_DISPLAY, NEXTION_DISPLAY, @@ -119,7 +117,6 @@ m_modemP25TXLevel(50.0F), m_modemNXDNTXLevel(50.0F), m_modemPOCSAGTXLevel(50.0F), m_modemFMTXLevel(50.0F), -m_modemAX25TXLevel(50.0F), m_modemRSSIMappingFile(), m_modemUseCOSAsLockout(false), m_modemTrace(false), @@ -218,12 +215,6 @@ m_fmRFAudioBoost(1U), m_fmMaxDevLevel(90.0F), m_fmExtAudioBoost(1U), m_fmModeHang(10U), -m_ax25Enabled(false), -m_ax25TXDelay(300U), -m_ax25RXTwist(6), -m_ax25SlotTime(30U), -m_ax25PPersist(128U), -m_ax25Trace(false), m_dstarNetworkEnabled(false), m_dstarGatewayAddress(), m_dstarGatewayPort(0U), @@ -287,10 +278,6 @@ m_fmTXAudioGain(1.0F), m_fmRXAudioGain(1.0F), m_fmNetworkModeHang(3U), m_fmNetworkDebug(false), -m_ax25NetworkEnabled(false), -m_ax25NetworkPort(), -m_ax25NetworkSpeed(9600U), -m_ax25NetworkDebug(false), m_tftSerialPort("/dev/ttyAMA0"), m_tftSerialBrightness(50U), m_tftSerialScreenLayout(0U), @@ -383,8 +370,6 @@ bool CConf::read() section = SECTION::POCSAG; else if (::strncmp(buffer, "[FM]", 4U) == 0) section = SECTION::FM; - else if (::strncmp(buffer, "[AX.25]", 7U) == 0) - section = SECTION::AX25; else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0) section = SECTION::DSTAR_NETWORK; else if (::strncmp(buffer, "[DMR Network]", 13U) == 0) @@ -399,8 +384,6 @@ bool CConf::read() section = SECTION::POCSAG_NETWORK; else if (::strncmp(buffer, "[FM Network]", 12U) == 0) section = SECTION::FM_NETWORK; - else if (::strncmp(buffer, "[AX.25 Network]", 15U) == 0) - section = SECTION::AX25_NETWORK; else if (::strncmp(buffer, "[TFT Serial]", 12U) == 0) section = SECTION::TFTSERIAL_DISPLAY; else if (::strncmp(buffer, "[HD44780]", 9U) == 0) @@ -546,7 +529,7 @@ bool CConf::read() else if (::strcmp(key, "PTTInvert") == 0) m_modemPTTInvert = ::atoi(value) == 1; else if (::strcmp(key, "TXDelay") == 0) - m_ax25TXDelay = m_modemTXDelay = (unsigned int)::atoi(value); + m_modemTXDelay = (unsigned int)::atoi(value); else if (::strcmp(key, "DMRDelay") == 0) m_modemDMRDelay = (unsigned int)::atoi(value); else if (::strcmp(key, "RXOffset") == 0) @@ -562,7 +545,7 @@ bool CConf::read() else if (::strcmp(key, "RXLevel") == 0) m_modemRXLevel = float(::atof(value)); else if (::strcmp(key, "TXLevel") == 0) - m_modemAX25TXLevel = m_modemFMTXLevel = m_modemCWIdTXLevel = m_modemDStarTXLevel = m_modemDMRTXLevel = m_modemYSFTXLevel = m_modemP25TXLevel = m_modemNXDNTXLevel = m_modemPOCSAGTXLevel = float(::atof(value)); + m_modemFMTXLevel = m_modemCWIdTXLevel = m_modemDStarTXLevel = m_modemDMRTXLevel = m_modemYSFTXLevel = m_modemP25TXLevel = m_modemNXDNTXLevel = m_modemPOCSAGTXLevel = float(::atof(value)); else if (::strcmp(key, "CWIdTXLevel") == 0) m_modemCWIdTXLevel = float(::atof(value)); else if (::strcmp(key, "D-StarTXLevel") == 0) @@ -579,8 +562,6 @@ bool CConf::read() m_modemPOCSAGTXLevel = float(::atof(value)); else if (::strcmp(key, "FMTXLevel") == 0) m_modemFMTXLevel = float(::atof(value)); - else if (::strcmp(key, "AX25TXLevel") == 0) - m_modemAX25TXLevel = float(::atof(value)); else if (::strcmp(key, "RSSIMappingFile") == 0) m_modemRSSIMappingFile = value; else if (::strcmp(key, "UseCOSAsLockout") == 0) @@ -870,19 +851,6 @@ bool CConf::read() m_fmExtAudioBoost = (unsigned int)::atoi(value); else if (::strcmp(key, "ModeHang") == 0) m_fmModeHang = (unsigned int)::atoi(value); - } else if (section == SECTION::AX25) { - if (::strcmp(key, "Enable") == 0) - m_ax25Enabled = ::atoi(value) == 1; - else if (::strcmp(key, "TXDelay") == 0) - m_ax25TXDelay = (unsigned int)::atoi(value); - else if (::strcmp(key, "RXTwist") == 0) - m_ax25RXTwist = ::atoi(value); - else if (::strcmp(key, "SlotTime") == 0) - m_ax25SlotTime = (unsigned int)::atoi(value); - else if (::strcmp(key, "PPersist") == 0) - m_ax25PPersist = (unsigned int)::atoi(value); - else if (::strcmp(key, "Trace") == 0) - m_ax25Trace = ::atoi(value) == 1; } else if (section == SECTION::DSTAR_NETWORK) { if (::strcmp(key, "Enable") == 0) m_dstarNetworkEnabled = ::atoi(value) == 1; @@ -1016,15 +984,6 @@ bool CConf::read() m_fmNetworkModeHang = (unsigned int)::atoi(value); else if (::strcmp(key, "Debug") == 0) m_fmNetworkDebug = ::atoi(value) == 1; - } else if (section == SECTION::AX25_NETWORK) { - if (::strcmp(key, "Enable") == 0) - m_ax25NetworkEnabled = ::atoi(value) == 1; - else if (::strcmp(key, "Port") == 0) - m_ax25NetworkPort = value; - else if (::strcmp(key, "Speed") == 0) - m_ax25NetworkSpeed = (unsigned int)::atoi(value); - else if (::strcmp(key, "Debug") == 0) - m_ax25NetworkDebug = ::atoi(value) == 1; } else if (section == SECTION::TFTSERIAL_DISPLAY) { if (::strcmp(key, "Port") == 0) m_tftSerialPort = value; @@ -1397,11 +1356,6 @@ float CConf::getModemFMTXLevel() const return m_modemFMTXLevel; } -float CConf::getModemAX25TXLevel() const -{ - return m_modemAX25TXLevel; -} - std::string CConf::getModemRSSIMappingFile () const { return m_modemRSSIMappingFile; @@ -1892,36 +1846,6 @@ unsigned int CConf::getFMModeHang() const return m_fmModeHang; } -bool CConf::getAX25Enabled() const -{ - return m_ax25Enabled; -} - -unsigned int CConf::getAX25TXDelay() const -{ - return m_ax25TXDelay; -} - -int CConf::getAX25RXTwist() const -{ - return m_ax25RXTwist; -} - -unsigned int CConf::getAX25SlotTime() const -{ - return m_ax25SlotTime; -} - -unsigned int CConf::getAX25PPersist() const -{ - return m_ax25PPersist; -} - -bool CConf::getAX25Trace() const -{ - return m_ax25Trace; -} - bool CConf::getDStarNetworkEnabled() const { return m_dstarNetworkEnabled; @@ -2237,26 +2161,6 @@ bool CConf::getFMNetworkDebug() const return m_fmNetworkDebug; } -bool CConf::getAX25NetworkEnabled() const -{ - return m_ax25NetworkEnabled; -} - -std::string CConf::getAX25NetworkPort() const -{ - return m_ax25NetworkPort; -} - -unsigned int CConf::getAX25NetworkSpeed() const -{ - return m_ax25NetworkSpeed; -} - -bool CConf::getAX25NetworkDebug() const -{ - return m_ax25NetworkDebug; -} - std::string CConf::getTFTSerialPort() const { return m_tftSerialPort; diff --git a/Conf.h b/Conf.h index 30ea50c..e45c934 100644 --- a/Conf.h +++ b/Conf.h @@ -98,7 +98,6 @@ public: float getModemNXDNTXLevel() const; float getModemPOCSAGTXLevel() const; float getModemFMTXLevel() const; - float getModemAX25TXLevel() const; std::string getModemRSSIMappingFile() const; bool getModemUseCOSAsLockout() const; bool getModemTrace() const; @@ -176,14 +175,6 @@ public: bool getPOCSAGEnabled() const; unsigned int getPOCSAGFrequency() const; - // The AX.25 section - bool getAX25Enabled() const; - unsigned int getAX25TXDelay() const; - int getAX25RXTwist() const; - unsigned int getAX25SlotTime() const; - unsigned int getAX25PPersist() const; - bool getAX25Trace() const; - // The FM Section bool getFMEnabled() const; std::string getFMCallsign() const; @@ -299,12 +290,6 @@ public: unsigned int getFMNetworkModeHang() const; bool getFMNetworkDebug() const; - // The AX.25 Network section - bool getAX25NetworkEnabled() const; - std::string getAX25NetworkPort() const; - unsigned int getAX25NetworkSpeed() const; - bool getAX25NetworkDebug() const; - // The TFTSERIAL section std::string getTFTSerialPort() const; unsigned int getTFTSerialBrightness() const; @@ -421,7 +406,6 @@ private: float m_modemNXDNTXLevel; float m_modemPOCSAGTXLevel; float m_modemFMTXLevel; - float m_modemAX25TXLevel; std::string m_modemRSSIMappingFile; bool m_modemUseCOSAsLockout; bool m_modemTrace; @@ -529,13 +513,6 @@ private: unsigned int m_fmExtAudioBoost; unsigned int m_fmModeHang; - bool m_ax25Enabled; - unsigned int m_ax25TXDelay; - int m_ax25RXTwist; - unsigned int m_ax25SlotTime; - unsigned int m_ax25PPersist; - bool m_ax25Trace; - bool m_dstarNetworkEnabled; std::string m_dstarGatewayAddress; unsigned short m_dstarGatewayPort; @@ -606,11 +583,6 @@ private: unsigned int m_fmNetworkModeHang; bool m_fmNetworkDebug; - bool m_ax25NetworkEnabled; - std::string m_ax25NetworkPort; - unsigned int m_ax25NetworkSpeed; - bool m_ax25NetworkDebug; - std::string m_tftSerialPort; unsigned int m_tftSerialBrightness; unsigned int m_tftSerialScreenLayout; diff --git a/MMDVM.ini b/MMDVM.ini index d77181f..9b199c4 100644 --- a/MMDVM.ini +++ b/MMDVM.ini @@ -79,7 +79,6 @@ RFLevel=100 # NXDNTXLevel=50 # POCSAGTXLevel=50 # FMTXLevel=50 -# AX25TXLevel=50 RSSIMappingFile=RSSI.dat UseCOSAsLockout=0 Trace=0 @@ -197,14 +196,6 @@ MaxDevLevel=90 ExtAudioBoost=1 # ModeHang=10 -[AX.25] -Enable=1 -TXDelay=300 -RXTwist=6 -SlotTime=30 -PPersist=128 -Trace=1 - [D-Star Network] Enable=1 LocalAddress=127.0.0.1 @@ -287,12 +278,6 @@ RXAudioGain=1.0 # ModeHang=3 Debug=0 -[AX.25 Network] -Enable=1 -Port=/dev/ttyp7 -Speed=9600 -Debug=0 - [TFT Serial] # Port=modem Port=/dev/ttyAMA0 diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 436f6ac..10fb079 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -141,7 +141,6 @@ m_p25(nullptr), m_nxdn(nullptr), m_pocsag(nullptr), m_fm(nullptr), -m_ax25(nullptr), m_dstarNetwork(nullptr), m_dmrNetwork(nullptr), m_ysfNetwork(nullptr), @@ -149,7 +148,6 @@ m_p25Network(nullptr), m_nxdnNetwork(nullptr), m_pocsagNetwork(nullptr), m_fmNetwork(nullptr), -m_ax25Network(nullptr), m_display(nullptr), m_mode(MODE_IDLE), m_dstarRFModeHang(10U), @@ -177,7 +175,6 @@ m_p25Enabled(false), m_nxdnEnabled(false), m_pocsagEnabled(false), m_fmEnabled(false), -m_ax25Enabled(false), m_cwIdTime(0U), m_dmrLookup(nullptr), m_nxdnLookup(nullptr), @@ -331,11 +328,6 @@ int CMMDVMHost::run() m_pocsagEnabled = false; } - if (m_ax25Enabled && !m_modem->hasAX25()) { - LogWarning("AX.25 enabled in the host but not in the modem firmware, disabling"); - m_ax25Enabled = false; - } - m_display = CDisplay::createDisplay(m_conf, m_modem); LogInfo("Opening network connections"); @@ -382,12 +374,6 @@ int CMMDVMHost::run() return 1; } - if (m_ax25Enabled && m_conf.getAX25NetworkEnabled()) { - ret = createAX25Network(); - if (!ret) - return 1; - } - sockaddr_storage transparentAddress; unsigned int transparentAddrLen; CUDPSocket* transparentSocket = nullptr; @@ -688,23 +674,6 @@ int CMMDVMHost::run() pocsagTimer.start(); } - if (m_ax25Enabled) { - unsigned int txDelay = m_conf.getAX25TXDelay(); - int rxTwist = m_conf.getAX25RXTwist(); - unsigned int slotTime = m_conf.getAX25SlotTime(); - unsigned int pPersist = m_conf.getAX25PPersist(); - bool trace = m_conf.getAX25Trace(); - - LogInfo("AX.25 RF Parameters"); - LogInfo(" TX Delay: %ums", txDelay); - LogInfo(" RX Twist: %d", rxTwist); - LogInfo(" Slot Time: %ums", slotTime); - LogInfo(" P-Persist: %u", pPersist); - LogInfo(" Trace: %s", trace ? "yes" : "no"); - - m_ax25 = new CAX25Control(m_ax25Network, trace); - } - if (m_fmEnabled) { bool preEmphasis = m_conf.getFMPreEmphasis(); bool deEmphasis = m_conf.getFMDeEmphasis(); @@ -914,15 +883,6 @@ int CMMDVMHost::run() } } - len = m_modem->readAX25Data(data); - if (m_ax25 != nullptr && m_ax25Enabled && len > 0U) { - if (m_mode == MODE_IDLE || m_mode == MODE_FM) { - m_ax25->writeModem(data, len); - } else if (m_mode != MODE_LOCKOUT) { - LogWarning("NXDN modem data received when in mode %u", m_mode); - } - } - len = m_modem->readTransparentData(data); if (transparentSocket != nullptr && len > 0U) transparentSocket->write(data, len, transparentAddress, transparentAddrLen); @@ -1092,21 +1052,6 @@ int CMMDVMHost::run() } } - if (m_ax25 != nullptr && m_ax25Enabled) { - ret = m_modem->hasAX25Space(); - if (ret) { - len = m_ax25->readModem(data); - if (len > 0U) { - if (m_mode == MODE_IDLE || m_mode == MODE_FM) { - m_modem->writeAX25Data(data, len); - } - else if (m_mode != MODE_LOCKOUT) { - LogWarning("AX.25 data received when in mode %u", m_mode); - } - } - } - } - if (transparentSocket != nullptr) { sockaddr_storage address; unsigned int addrlen; @@ -1280,11 +1225,6 @@ int CMMDVMHost::run() delete m_fmNetwork; } - if (m_ax25Network != nullptr) { - m_ax25Network->close(); - delete m_ax25Network; - } - if (transparentSocket != nullptr) { transparentSocket->close(); delete transparentSocket; @@ -1304,7 +1244,6 @@ int CMMDVMHost::run() delete m_nxdn; delete m_pocsag; delete m_fm; - delete m_ax25; LogInfo("MMDVMHost-%s has stopped", VERSION); @@ -1344,7 +1283,6 @@ bool CMMDVMHost::createModem() float nxdnTXLevel = m_conf.getModemNXDNTXLevel(); float pocsagTXLevel = m_conf.getModemPOCSAGTXLevel(); float fmTXLevel = m_conf.getModemFMTXLevel(); - float ax25TXLevel = m_conf.getModemAX25TXLevel(); bool trace = m_conf.getModemTrace(); bool debug = m_conf.getModemDebug(); unsigned int colorCode = m_conf.getDMRColorCode(); @@ -1360,10 +1298,6 @@ bool CMMDVMHost::createModem() int rxDCOffset = m_conf.getModemRXDCOffset(); int txDCOffset = m_conf.getModemTXDCOffset(); float rfLevel = m_conf.getModemRFLevel(); - int rxTwist = m_conf.getAX25RXTwist(); - unsigned int ax25TXDelay = m_conf.getAX25TXDelay(); - unsigned int ax25SlotTime = m_conf.getAX25SlotTime(); - unsigned int ax25PPersist = m_conf.getAX25PPersist(); bool useCOSAsLockout = m_conf.getModemUseCOSAsLockout(); LogInfo("Modem Parameters"); @@ -1404,7 +1338,6 @@ bool CMMDVMHost::createModem() LogInfo(" NXDN TX Level: %.1f%%", nxdnTXLevel); LogInfo(" POCSAG TX Level: %.1f%%", pocsagTXLevel); LogInfo(" FM TX Level: %.1f%%", fmTXLevel); - LogInfo(" AX.25 TX Level: %.1f%%", ax25TXLevel); LogInfo(" TX Frequency: %uHz (%uHz)", txFrequency, txFrequency + txOffset); LogInfo(" Use COS as Lockout: %s", useCOSAsLockout ? "yes" : "no"); @@ -1425,14 +1358,13 @@ bool CMMDVMHost::createModem() return false; m_modem->setPort(port); - m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled, m_ax25Enabled); - m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, fmTXLevel, ax25TXLevel); + m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled); + m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, fmTXLevel); m_modem->setRFParams(rxFrequency, rxOffset, txFrequency, txOffset, txDCOffset, rxDCOffset, rfLevel, pocsagFrequency); m_modem->setDMRParams(colorCode); m_modem->setYSFParams(lowDeviation, ysfTXHang); m_modem->setP25Params(p25TXHang); m_modem->setNXDNParams(nxdnTXHang); - m_modem->setAX25Params(rxTwist, ax25TXDelay, ax25SlotTime, ax25PPersist); if (m_fmEnabled) { std::string callsign = m_conf.getFMCallsign(); @@ -1818,30 +1750,6 @@ bool CMMDVMHost::createFMNetwork() return true; } -bool CMMDVMHost::createAX25Network() -{ - std::string port = m_conf.getAX25NetworkPort(); - unsigned int speed = m_conf.getAX25NetworkSpeed(); - bool debug = m_conf.getAX25NetworkDebug(); - - LogInfo("AX.25 Network Parameters"); - LogInfo(" Port: %s", port.c_str()); - LogInfo(" Speed: %u", speed); - - m_ax25Network = new CAX25Network(port, speed, debug); - - bool ret = m_ax25Network->open(); - if (!ret) { - delete m_ax25Network; - m_ax25Network = nullptr; - return false; - } - - m_ax25Network->enable(true); - - return true; -} - void CMMDVMHost::readParams() { m_dstarEnabled = m_conf.getDStarEnabled(); @@ -1851,7 +1759,6 @@ void CMMDVMHost::readParams() m_nxdnEnabled = m_conf.getNXDNEnabled(); m_pocsagEnabled = m_conf.getPOCSAGEnabled(); m_fmEnabled = m_conf.getFMEnabled(); - m_ax25Enabled = m_conf.getAX25Enabled(); m_duplex = m_conf.getDuplex(); m_callsign = m_conf.getCallsign(); m_id = m_conf.getId(); @@ -1869,7 +1776,6 @@ void CMMDVMHost::readParams() LogInfo(" NXDN: %s", m_nxdnEnabled ? "enabled" : "disabled"); LogInfo(" POCSAG: %s", m_pocsagEnabled ? "enabled" : "disabled"); LogInfo(" FM: %s", m_fmEnabled ? "enabled" : "disabled"); - LogInfo(" AX.25: %s", m_ax25Enabled ? "enabled" : "disabled"); } void CMMDVMHost::enableModemMode(bool& mode, bool enabled) @@ -1878,12 +1784,12 @@ void CMMDVMHost::enableModemMode(bool& mode, bool enabled) mode = enabled; - m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled, m_ax25Enabled); + m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled); if (!m_modem->writeConfig()) LogError("Cannot write Config to MMDVM"); } -void CMMDVMHost::processEnableModeCommand(unsigned char mode, bool hasController, bool& modeEnabled, bool enableMode, bool isAX25) +void CMMDVMHost::processEnableModeCommand(unsigned char mode, bool hasController, bool& modeEnabled, bool enableMode) { if (hasController && (modeEnabled != enableMode)) { unsigned char data[500U]; @@ -1920,10 +1826,9 @@ void CMMDVMHost::processEnableModeCommand(unsigned char mode, bool hasController m_nxdn->enable(enableMode); break; case MODE_FM: - if (isAX25) - m_ax25->enable(enableMode); - else - m_fm->enable(enableMode); + if (m_fmNetwork != nullptr) + m_fmNetwork->enable(enableMode); + m_fm->enable(enableMode); break; default: break; @@ -1948,7 +1853,7 @@ void CMMDVMHost::processEnableModeCommand(unsigned char mode, bool hasController while (m_modem->readNXDNData(data) > 0U); break; case MODE_FM: - while ((isAX25 ? m_modem->readAX25Data(data) : m_modem->readFMData(data)) > 0U); + while (m_modem->readFMData(data) > 0U); break; default: break; @@ -1982,8 +1887,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr && m_dstarEnabled) m_dstar->enable(true); if (m_dmr != nullptr) @@ -1998,8 +1901,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_dstarEnabled) { m_modem->setMode(MODE_DSTAR); m_mode = MODE_DSTAR; @@ -2025,8 +1926,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr && m_dmrEnabled) @@ -2041,8 +1940,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_dmrEnabled) { m_modem->setMode(MODE_DMR); if (m_duplex) { @@ -2072,8 +1969,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2088,8 +1983,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_ysfEnabled) { m_modem->setMode(MODE_YSF); m_mode = MODE_YSF; @@ -2115,8 +2008,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2131,8 +2022,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_p25Enabled) { m_modem->setMode(MODE_P25); m_mode = MODE_P25; @@ -2158,8 +2047,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2174,8 +2061,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_nxdnEnabled) { m_modem->setMode(MODE_NXDN); m_mode = MODE_NXDN; @@ -2201,8 +2086,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(true); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2217,8 +2100,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(true); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); m_modem->setMode(MODE_POCSAG); m_mode = MODE_POCSAG; m_modeTimer.start(); @@ -2242,8 +2123,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr && m_fmEnabled) m_fmNetwork->enable(true); - if (m_ax25Network != nullptr && m_ax25Enabled) - m_ax25Network->enable(true); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2258,8 +2137,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr && m_fmEnabled) m_fm->enable(true); - if (m_ax25 != nullptr && m_ax25Enabled) - m_ax25->enable(true); if (m_mode == MODE_DMR && m_duplex && m_modem->hasTX()) { m_modem->writeDMRStart(false); m_dmrTXTimer.stop(); @@ -2290,8 +2167,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2306,8 +2181,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_mode == MODE_DMR && m_duplex && m_modem->hasTX()) { m_modem->writeDMRStart(false); m_dmrTXTimer.stop(); @@ -2337,8 +2210,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(false); if (m_fmNetwork != nullptr) m_fmNetwork->enable(false); - if (m_ax25Network != nullptr) - m_ax25Network->enable(false); if (m_dstar != nullptr) m_dstar->enable(false); if (m_dmr != nullptr) @@ -2353,8 +2224,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(false); if (m_fm != nullptr) m_fm->enable(false); - if (m_ax25 != nullptr) - m_ax25->enable(false); if (m_mode == MODE_DMR && m_duplex && m_modem->hasTX()) { m_modem->writeDMRStart(false); m_dmrTXTimer.stop(); @@ -2382,8 +2251,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsagNetwork->enable(true); if (m_fmNetwork != nullptr && m_fmEnabled) m_fmNetwork->enable(true); - if (m_ax25Network != nullptr && m_fmEnabled) - m_ax25Network->enable(true); if (m_dstar != nullptr && m_dstarEnabled) m_dstar->enable(true); if (m_dmr != nullptr && m_dmrEnabled) @@ -2398,8 +2265,6 @@ void CMMDVMHost::setMode(unsigned char mode) m_pocsag->enable(true); if (m_fm != nullptr && m_fmEnabled) m_fm->enable(true); - if (m_ax25 != nullptr && m_fmEnabled) - m_ax25->enable(true); if (m_mode == MODE_DMR && m_duplex && m_modem->hasTX() && m_dmrEnabled) { m_modem->writeDMRStart(false); m_dmrTXTimer.stop(); @@ -2498,9 +2363,6 @@ void CMMDVMHost::remoteControl() case REMOTE_COMMAND::ENABLE_FM: processEnableModeCommand(MODE_FM, (m_fm != nullptr), m_fmEnabled, true); break; - case REMOTE_COMMAND::ENABLE_AX25: - processEnableModeCommand(MODE_FM, (m_ax25 != nullptr), m_ax25Enabled, true, true); - break; case REMOTE_COMMAND::DISABLE_DSTAR: processEnableModeCommand(MODE_DSTAR, (m_dstar != nullptr), m_dstarEnabled, false); break; @@ -2519,9 +2381,6 @@ void CMMDVMHost::remoteControl() case REMOTE_COMMAND::DISABLE_FM: processEnableModeCommand(MODE_FM, (m_fm != nullptr), m_fmEnabled, false); break; - case REMOTE_COMMAND::DISABLE_AX25: - processEnableModeCommand(MODE_FM, (m_ax25 != nullptr), m_ax25Enabled, false, true); - break; case REMOTE_COMMAND::PAGE: if (m_pocsag != nullptr) { unsigned int ric = m_remoteControl->getArgUInt(0U); diff --git a/MMDVMHost.h b/MMDVMHost.h index c3a1dc7..2c9cbb7 100644 --- a/MMDVMHost.h +++ b/MMDVMHost.h @@ -23,10 +23,8 @@ #include "POCSAGNetwork.h" #include "POCSAGControl.h" #include "DStarNetwork.h" -#include "AX25Network.h" #include "NXDNNetwork.h" #include "DStarControl.h" -#include "AX25Control.h" #include "DMRControl.h" #include "YSFControl.h" #include "P25Control.h" @@ -67,7 +65,6 @@ private: CNXDNControl* m_nxdn; CPOCSAGControl* m_pocsag; CFMControl* m_fm; - CAX25Control* m_ax25; CDStarNetwork* m_dstarNetwork; IDMRNetwork* m_dmrNetwork; CYSFNetwork* m_ysfNetwork; @@ -75,7 +72,6 @@ private: INXDNNetwork* m_nxdnNetwork; CPOCSAGNetwork* m_pocsagNetwork; CFMNetwork* m_fmNetwork; - CAX25Network* m_ax25Network; CDisplay* m_display; unsigned char m_mode; unsigned int m_dstarRFModeHang; @@ -103,7 +99,6 @@ private: bool m_nxdnEnabled; bool m_pocsagEnabled; bool m_fmEnabled; - bool m_ax25Enabled; unsigned int m_cwIdTime; CDMRLookup* m_dmrLookup; CNXDNLookup* m_nxdnLookup; @@ -124,14 +119,13 @@ private: bool createNXDNNetwork(); bool createPOCSAGNetwork(); bool createFMNetwork(); - bool createAX25Network(); void remoteControl(); void processModeCommand(unsigned char mode, unsigned int timeout); void setMode(unsigned char mode); void enableModemMode(bool& mode, bool enabled); - void processEnableModeCommand(unsigned char mode, bool hasController, bool& modeEnabled, bool enableMode, bool isAX25 = false); + void processEnableModeCommand(unsigned char mode, bool hasController, bool& modeEnabled, bool enableMode); void createLockFile(const char* mode) const; void removeLockFile() const; diff --git a/MMDVMHost.vcxproj b/MMDVMHost.vcxproj index 642202d..7e8a4fb 100644 --- a/MMDVMHost.vcxproj +++ b/MMDVMHost.vcxproj @@ -165,9 +165,6 @@ - - - @@ -274,8 +271,6 @@ - - diff --git a/MMDVMHost.vcxproj.filters b/MMDVMHost.vcxproj.filters index ac785b8..2670f71 100644 --- a/MMDVMHost.vcxproj.filters +++ b/MMDVMHost.vcxproj.filters @@ -272,21 +272,12 @@ Header Files - - Header Files - - - Header Files - Header Files Header Files - - Header Files - Header Files @@ -568,12 +559,6 @@ Source Files - - Source Files - - - Source Files - Source Files diff --git a/Makefile b/Makefile index 47ac0cc..3eed7a8 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ LIBS = -lpthread -lutil LDFLAGS = -g -L/usr/local/lib OBJECTS = \ - AMBEFEC.o BCH.o AX25Control.o AX25Network.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ + AMBEFEC.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ DMRDirectNetwork.o DMREMB.o DMREmbeddedData.o DMRFullLC.o DMRGatewayNetwork.o DMRLookup.o DMRLC.o DMRNetwork.o DMRShortLC.o DMRSlot.o DMRSlotType.o \ DMRAccessControl.o DMRTA.o DMRTrellis.o DStarControl.o DStarHeader.o DStarNetwork.o DStarSlowData.o FMControl.o FMNetwork.o Golay2087.o Golay24128.o \ Hamming.o I2CController.o IIRDirectForm1Filter.o LCDproc.o Log.o MMDVMHost.o \ diff --git a/Makefile.Pi.Adafruit b/Makefile.Pi.Adafruit index 599b40f..72f46cf 100644 --- a/Makefile.Pi.Adafruit +++ b/Makefile.Pi.Adafruit @@ -10,7 +10,7 @@ LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil LDFLAGS = -g -L/usr/local/lib OBJECTS = \ - AMBEFEC.o AX25Control.o AX25Network.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ + AMBEFEC.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ DMRDirectNetwork.o DMREMB.o DMREmbeddedData.o DMRFullLC.o DMRGatewayNetwork.o DMRLookup.o DMRLC.o DMRNetwork.o DMRShortLC.o DMRSlot.o DMRSlotType.o \ DMRAccessControl.o DMRTA.o DMRTrellis.o DStarControl.o DStarHeader.o DStarNetwork.o DStarSlowData.o FMControl.o FMNetwork.o Golay2087.o Golay24128.o \ Hamming.o HD44780.o I2CController.o IIRDirectForm1Filter.o LCDproc.o Log.o \ diff --git a/Makefile.Pi.HD44780 b/Makefile.Pi.HD44780 index 28cb3fe..26755d2 100644 --- a/Makefile.Pi.HD44780 +++ b/Makefile.Pi.HD44780 @@ -9,7 +9,7 @@ LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil LDFLAGS = -g -L/usr/local/lib OBJECTS = \ - AMBEFEC.o AX25Control.o AX25Network.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ + AMBEFEC.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ DMRDirectNetwork.o DMREMB.o DMREmbeddedData.o DMRFullLC.o DMRGatewayNetwork.o DMRLookup.o DMRLC.o DMRNetwork.o DMRShortLC.o DMRSlot.o DMRSlotType.o \ DMRAccessControl.o DMRTA.o DMRTrellis.o DStarControl.o DStarHeader.o DStarNetwork.o DStarSlowData.o FMControl.o FMNetwork.o Golay2087.o Golay24128.o \ Hamming.o HD44780.o I2CController.o IIRDirectForm1Filter.o LCDproc.o Log.o \ diff --git a/Makefile.Pi.I2C b/Makefile.Pi.I2C index a50d8c1..762b5f7 100644 --- a/Makefile.Pi.I2C +++ b/Makefile.Pi.I2C @@ -9,7 +9,7 @@ LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil LDFLAGS = -g -L/usr/local/lib OBJECTS = \ - AMBEFEC.o AX25Control.o AX25Network.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ + AMBEFEC.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ DMRDirectNetwork.o DMREMB.o DMREmbeddedData.o DMRFullLC.o DMRGatewayNetwork.o DMRLookup.o DMRLC.o DMRNetwork.o DMRShortLC.o DMRSlot.o DMRSlotType.o \ DMRAccessControl.o DMRTA.o DMRTrellis.o DStarControl.o DStarHeader.o DStarNetwork.o DStarSlowData.o FMControl.o FMNetwork.o Golay2087.o Golay24128.o \ Hamming.o I2CController.o IIRDirectForm1Filter.o LCDproc.o Log.o MMDVMHost.o \ diff --git a/Makefile.Pi.OLED b/Makefile.Pi.OLED index 2efb630..3e96989 100644 --- a/Makefile.Pi.OLED +++ b/Makefile.Pi.OLED @@ -13,7 +13,7 @@ LIBS = -lArduiPi_OLED -lpthread -lutil LDFLAGS = -g -L/usr/local/lib OBJECTS = \ - AMBEFEC.o AX25Control.o AX25Network.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ + AMBEFEC.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ DMRDirectNetwork.o DMREMB.o DMREmbeddedData.o DMRFullLC.o DMRGatewayNetwork.o DMRLookup.o DMRLC.o DMRNetwork.o DMRShortLC.o DMRSlot.o DMRSlotType.o \ DMRAccessControl.o DMRTA.o DMRTrellis.o DStarControl.o DStarHeader.o DStarNetwork.o DStarSlowData.o FMControl.o FMNetwork.o Golay2087.o Golay24128.o \ Hamming.o I2CController.o IIRDirectForm1Filter.o LCDproc.o Log.o MMDVMHost.o \ diff --git a/Makefile.Pi.PCF8574 b/Makefile.Pi.PCF8574 index 7f060d9..7a86500 100644 --- a/Makefile.Pi.PCF8574 +++ b/Makefile.Pi.PCF8574 @@ -10,7 +10,7 @@ LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil LDFLAGS = -g -L/usr/local/lib OBJECTS = \ - AMBEFEC.o AX25Control.o AX25Network.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ + AMBEFEC.o BCH.o BPTC19696.o CASTInfo.o Conf.o CRC.o Display.o DMRControl.o DMRCSBK.o DMRData.o DMRDataHeader.o \ DMRDirectNetwork.o DMREMB.o DMREmbeddedData.o DMRFullLC.o DMRGatewayNetwork.o DMRLookup.o DMRLC.o DMRNetwork.o DMRShortLC.o DMRSlot.o DMRSlotType.o \ DMRAccessControl.o DMRTA.o DMRTrellis.o DStarControl.o DStarHeader.o DStarNetwork.o DStarSlowData.o FMControl.o FMNetwork.o Golay2087.o Golay24128.o \ Hamming.o HD44780.o I2CController.o IIRDirectForm1Filter.o LCDproc.o Log.o \ diff --git a/Modem.cpp b/Modem.cpp index fe32382..d182f52 100644 --- a/Modem.cpp +++ b/Modem.cpp @@ -21,7 +21,6 @@ #include "YSFDefines.h" #include "P25Defines.h" #include "NXDNDefines.h" -#include "AX25Defines.h" #include "POCSAGDefines.h" #include "Thread.h" #include "Modem.h" @@ -75,8 +74,6 @@ const unsigned char MMDVM_NXDN_LOST = 0x41U; const unsigned char MMDVM_POCSAG_DATA = 0x50U; -const unsigned char MMDVM_AX25_DATA = 0x55U; - const unsigned char MMDVM_FM_PARAMS1 = 0x60U; const unsigned char MMDVM_FM_PARAMS2 = 0x61U; const unsigned char MMDVM_FM_PARAMS3 = 0x62U; @@ -111,7 +108,6 @@ const unsigned char CAP1_P25 = 0x08U; const unsigned char CAP1_NXDN = 0x10U; const unsigned char CAP1_FM = 0x40U; const unsigned char CAP2_POCSAG = 0x01U; -const unsigned char CAP2_AX25 = 0x02U; CModem::CModem(bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug) : @@ -136,7 +132,6 @@ m_p25TXLevel(0.0F), m_nxdnTXLevel(0.0F), m_pocsagTXLevel(0.0F), m_fmTXLevel(0.0F), -m_ax25TXLevel(0.0F), m_rfLevel(0.0F), m_useCOSAsLockout(useCOSAsLockout), m_trace(trace), @@ -151,7 +146,6 @@ m_p25Enabled(false), m_nxdnEnabled(false), m_pocsagEnabled(false), m_fmEnabled(false), -m_ax25Enabled(false), m_rxDCOffset(0), m_txDCOffset(0), m_port(nullptr), @@ -175,8 +169,6 @@ m_txNXDNData(1000U, "Modem TX NXDN"), m_txPOCSAGData(1000U, "Modem TX POCSAG"), m_rxFMData(5000U, "Modem RX FM"), m_txFMData(5000U, "Modem TX FM"), -m_rxAX25Data(1000U, "Modem RX AX.25"), -m_txAX25Data(1000U, "Modem TX AX.25"), m_rxSerialData(1000U, "Modem RX Serial"), m_txSerialData(1000U, "Modem TX Serial"), m_rxTransparentData(1000U, "Modem RX Transparent"), @@ -193,17 +185,12 @@ m_p25Space(0U), m_nxdnSpace(0U), m_pocsagSpace(0U), m_fmSpace(0U), -m_ax25Space(0U), m_tx(false), m_cd(false), m_lockout(false), m_error(false), m_mode(MODE_IDLE), m_hwType(HW_TYPE::UNKNOWN), -m_ax25RXTwist(0), -m_ax25TXDelay(300U), -m_ax25SlotTime(30U), -m_ax25PPersist(128U), m_fmCallsign(), m_fmCallsignSpeed(20U), m_fmCallsignFrequency(1000U), @@ -268,7 +255,7 @@ void CModem::setRFParams(unsigned int rxFrequency, int rxOffset, unsigned int tx m_pocsagFrequency = pocsagFrequency + txOffset; } -void CModem::setModeParams(bool dstarEnabled, bool dmrEnabled, bool ysfEnabled, bool p25Enabled, bool nxdnEnabled, bool pocsagEnabled, bool fmEnabled, bool ax25Enabled) +void CModem::setModeParams(bool dstarEnabled, bool dmrEnabled, bool ysfEnabled, bool p25Enabled, bool nxdnEnabled, bool pocsagEnabled, bool fmEnabled) { m_dstarEnabled = dstarEnabled; m_dmrEnabled = dmrEnabled; @@ -277,10 +264,9 @@ void CModem::setModeParams(bool dstarEnabled, bool dmrEnabled, bool ysfEnabled, m_nxdnEnabled = nxdnEnabled; m_pocsagEnabled = pocsagEnabled; m_fmEnabled = fmEnabled; - m_ax25Enabled = ax25Enabled; } -void CModem::setLevels(float rxLevel, float cwIdTXLevel, float dstarTXLevel, float dmrTXLevel, float ysfTXLevel, float p25TXLevel, float nxdnTXLevel, float pocsagTXLevel, float fmTXLevel, float ax25TXLevel) +void CModem::setLevels(float rxLevel, float cwIdTXLevel, float dstarTXLevel, float dmrTXLevel, float ysfTXLevel, float p25TXLevel, float nxdnTXLevel, float pocsagTXLevel, float fmTXLevel) { m_rxLevel = rxLevel; m_cwIdTXLevel = cwIdTXLevel; @@ -291,7 +277,6 @@ void CModem::setLevels(float rxLevel, float cwIdTXLevel, float dstarTXLevel, flo m_nxdnTXLevel = nxdnTXLevel; m_pocsagTXLevel = pocsagTXLevel; m_fmTXLevel = fmTXLevel; - m_ax25TXLevel = ax25TXLevel; } void CModem::setDMRParams(unsigned int colorCode) @@ -317,14 +302,6 @@ void CModem::setNXDNParams(unsigned int txHang) m_nxdnTXHang = txHang; } -void CModem::setAX25Params(int rxTwist, unsigned int txDelay, unsigned int slotTime, unsigned int pPersist) -{ - m_ax25RXTwist = rxTwist; - m_ax25TXDelay = txDelay; - m_ax25SlotTime = slotTime; - m_ax25PPersist = pPersist; -} - void CModem::setTransparentDataParams(unsigned int sendFrameType) { m_sendTransparentDataFrameType = sendFrameType; @@ -685,17 +662,6 @@ void CModem::clock(unsigned int ms) } break; - case MMDVM_AX25_DATA: { - if (m_trace) - CUtils::dump(1U, "RX AX.25 Data", m_buffer, m_length); - - unsigned int data = m_length - m_offset; - m_rxAX25Data.addData((unsigned char*)&data, sizeof(unsigned int)); - - m_rxAX25Data.addData(m_buffer + m_offset, m_length - m_offset); - } - break; - case MMDVM_GET_STATUS: // if (m_trace) // CUtils::dump(1U, "GET_STATUS", m_buffer, m_length); @@ -724,7 +690,6 @@ void CModem::clock(unsigned int ms) m_nxdnSpace = 0U; m_pocsagSpace = 0U; m_fmSpace = 0U; - m_ax25Space = 0U; m_dstarSpace = m_buffer[m_offset + 3U]; m_dmrSpace1 = m_buffer[m_offset + 4U]; @@ -768,7 +733,6 @@ void CModem::clock(unsigned int ms) m_nxdnSpace = m_buffer[m_offset + 8U]; m_fmSpace = m_buffer[m_offset + 10U]; m_pocsagSpace = m_buffer[m_offset + 11U]; - m_ax25Space = m_buffer[m_offset + 12U]; } break; @@ -781,7 +745,6 @@ void CModem::clock(unsigned int ms) m_nxdnSpace = 0U; m_pocsagSpace = 0U; m_fmSpace = 0U; - m_ax25Space = 0U; break; } @@ -1002,23 +965,6 @@ void CModem::clock(unsigned int ms) m_fmSpace--; } - if (m_ax25Space > 0U && !m_txAX25Data.isEmpty()) { - unsigned int len = 0U; - m_txAX25Data.getData((unsigned char*)&len, sizeof(unsigned int)); - m_txAX25Data.getData(m_buffer, len); - - if (m_trace) - CUtils::dump(1U, "TX AX.25 Data", m_buffer, len); - - int ret = m_port->write(m_buffer, len); - if (ret != int(len)) - LogWarning("Error when writing AX.25 data to the MMDVM"); - - m_playoutTimer.start(); - - m_ax25Space = 0U; - } - if (!m_txTransparentData.isEmpty()) { unsigned char len = 0U; m_txTransparentData.getData(&len, 1U); @@ -1153,20 +1099,6 @@ unsigned int CModem::readFMData(unsigned char* data) return len; } -unsigned int CModem::readAX25Data(unsigned char* data) -{ - assert(data != nullptr); - - if (m_rxAX25Data.isEmpty()) - return 0U; - - unsigned int len = 0U; - m_rxAX25Data.getData((unsigned char*)&len, sizeof(unsigned int)); - m_rxAX25Data.getData(data, len); - - return len; -} - unsigned int CModem::readTransparentData(unsigned char* data) { assert(data != nullptr); @@ -1447,42 +1379,6 @@ bool CModem::writeFMData(const unsigned char* data, unsigned int length) return true; } -bool CModem::hasAX25Space() const -{ - unsigned int space = m_txAX25Data.freeSpace() / (AX25_MAX_FRAME_LENGTH_BYTES + 5U); - - return space > 1U; -} - -bool CModem::writeAX25Data(const unsigned char* data, unsigned int length) -{ - assert(data != nullptr); - assert(length > 0U); - - unsigned char buffer[500U]; - - unsigned int len; - if (length > 252U) { - buffer[0U] = MMDVM_FRAME_START; - buffer[1U] = 0U; - buffer[2U] = (length + 4U) - 255U; - buffer[3U] = MMDVM_AX25_DATA; - ::memcpy(buffer + 4U, data, length); - len = length + 4U; - } else { - buffer[0U] = MMDVM_FRAME_START; - buffer[1U] = length + 3U; - buffer[2U] = MMDVM_AX25_DATA; - ::memcpy(buffer + 3U, data, length); - len = length + 3U; - } - - m_txAX25Data.addData((unsigned char*)&len, sizeof(unsigned int)); - m_txAX25Data.addData(buffer, len); - - return true; -} - bool CModem::writeTransparentData(const unsigned char* data, unsigned int length) { assert(data != nullptr); @@ -1770,11 +1666,6 @@ bool CModem::hasPOCSAG() const return (m_capabilities2 & CAP2_POCSAG) == CAP2_POCSAG; } -bool CModem::hasAX25() const -{ - return (m_capabilities2 & CAP2_AX25) == CAP2_AX25; -} - unsigned int CModem::getVersion() const { return m_protocolVersion; @@ -1875,8 +1766,6 @@ bool CModem::readVersion() ::strcat(modeText, " FM"); if (hasPOCSAG()) ::strcat(modeText, " POCSAG"); - if (hasAX25()) - ::strcat(modeText, " AX.25"); LogInfo(modeText); return true; @@ -2082,8 +1971,6 @@ bool CModem::setConfig2() buffer[5U] = 0x00U; if (m_pocsagEnabled) buffer[5U] |= 0x01U; - if (m_ax25Enabled) - buffer[5U] |= 0x02U; buffer[6U] = m_txDelay / 10U; // In 10ms units @@ -2103,7 +1990,7 @@ bool CModem::setConfig2() buffer[17U] = 0x00U; buffer[18U] = (unsigned char)(m_pocsagTXLevel * 2.55F + 0.5F); buffer[19U] = (unsigned char)(m_fmTXLevel * 2.55F + 0.5F); - buffer[20U] = (unsigned char)(m_ax25TXLevel * 2.55F + 0.5F); + buffer[20U] = 0x00U; buffer[21U] = 0x00U; buffer[22U] = 0x00U; @@ -2117,10 +2004,10 @@ bool CModem::setConfig2() buffer[29U] = m_dmrColorCode; buffer[30U] = m_dmrDelay; - buffer[31U] = (unsigned char)(m_ax25RXTwist + 128); - buffer[32U] = m_ax25TXDelay / 10U; // In 10ms units - buffer[33U] = m_ax25SlotTime / 10U; // In 10ms units - buffer[34U] = m_ax25PPersist; + buffer[31U] = 0x00U; + buffer[32U] = 0x00U; + buffer[33U] = 0x00U; + buffer[34U] = 0x00U; buffer[35U] = 0x00U; buffer[36U] = 0x00U; diff --git a/Modem.h b/Modem.h index 082ccf9..24cd4b2 100644 --- a/Modem.h +++ b/Modem.h @@ -47,13 +47,12 @@ public: void setPort(IModemPort* port); void setRFParams(unsigned int rxFrequency, int rxOffset, unsigned int txFrequency, int txOffset, int txDCOffset, int rxDCOffset, float rfLevel, unsigned int pocsagFrequency); - void setModeParams(bool dstarEnabled, bool dmrEnabled, bool ysfEnabled, bool p25Enabled, bool nxdnEnabled, bool pocsagEnabled, bool fmEnabled, bool ax25Enabled); - void setLevels(float rxLevel, float cwIdTXLevel, float dstarTXLevel, float dmrTXLevel, float ysfTXLevel, float p25TXLevel, float nxdnTXLevel, float pocsagLevel, float fmTXLevel, float ax25TXLevel); + void setModeParams(bool dstarEnabled, bool dmrEnabled, bool ysfEnabled, bool p25Enabled, bool nxdnEnabled, bool pocsagEnabled, bool fmEnabled); + void setLevels(float rxLevel, float cwIdTXLevel, float dstarTXLevel, float dmrTXLevel, float ysfTXLevel, float p25TXLevel, float nxdnTXLevel, float pocsagLevel, float fmTXLevel); void setDMRParams(unsigned int colorCode); void setYSFParams(bool loDev, unsigned int txHang); void setP25Params(unsigned int txHang); void setNXDNParams(unsigned int txHang); - void setAX25Params(int rxTwist, unsigned int txDelay, unsigned int slotTime, unsigned int pPersist); void setTransparentDataParams(unsigned int sendFrameType); void setFMCallsignParams(const std::string& callsign, unsigned int callsignSpeed, unsigned int callsignFrequency, unsigned int callsignTime, unsigned int callsignHoldoff, float callsignHighLevel, float callsignLowLevel, bool callsignAtStart, bool callsignAtEnd, bool callsignAtLatch); @@ -70,7 +69,6 @@ public: bool hasNXDN() const; bool hasPOCSAG() const; bool hasFM() const; - bool hasAX25() const; unsigned int getVersion() const; @@ -81,7 +79,6 @@ public: unsigned int readP25Data(unsigned char* data); unsigned int readNXDNData(unsigned char* data); unsigned int readFMData(unsigned char* data); - unsigned int readAX25Data(unsigned char* data); bool hasDStarSpace() const; bool hasDMRSpace1() const; @@ -91,7 +88,6 @@ public: bool hasNXDNSpace() const; bool hasPOCSAGSpace() const; unsigned int getFMSpace() const; - bool hasAX25Space() const; bool hasTX() const; bool hasCD() const; @@ -108,7 +104,6 @@ public: bool writeNXDNData(const unsigned char* data, unsigned int length); bool writePOCSAGData(const unsigned char* data, unsigned int length); bool writeFMData(const unsigned char* data, unsigned int length); - bool writeAX25Data(const unsigned char* data, unsigned int length); bool writeDStarInfo(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); bool writeDMRInfo(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type); @@ -161,7 +156,6 @@ private: float m_nxdnTXLevel; float m_pocsagTXLevel; float m_fmTXLevel; - float m_ax25TXLevel; float m_rfLevel; bool m_useCOSAsLockout; bool m_trace; @@ -176,7 +170,6 @@ private: bool m_nxdnEnabled; bool m_pocsagEnabled; bool m_fmEnabled; - bool m_ax25Enabled; int m_rxDCOffset; int m_txDCOffset; IModemPort* m_port; @@ -200,8 +193,6 @@ private: CRingBuffer m_txPOCSAGData; CRingBuffer m_rxFMData; CRingBuffer m_txFMData; - CRingBuffer m_rxAX25Data; - CRingBuffer m_txAX25Data; CRingBuffer m_rxSerialData; CRingBuffer m_txSerialData; CRingBuffer m_rxTransparentData; @@ -218,17 +209,12 @@ private: unsigned int m_nxdnSpace; unsigned int m_pocsagSpace; unsigned int m_fmSpace; - unsigned int m_ax25Space; bool m_tx; bool m_cd; bool m_lockout; bool m_error; unsigned char m_mode; HW_TYPE m_hwType; - int m_ax25RXTwist; - unsigned int m_ax25TXDelay; - unsigned int m_ax25SlotTime; - unsigned int m_ax25PPersist; std::string m_fmCallsign; unsigned int m_fmCallsignSpeed; diff --git a/RemoteControl.cpp b/RemoteControl.cpp index 478375d..6eaf2c3 100644 --- a/RemoteControl.cpp +++ b/RemoteControl.cpp @@ -117,8 +117,6 @@ REMOTE_COMMAND CRemoteControl::getCommand() m_command = REMOTE_COMMAND::ENABLE_NXDN; else if (m_args.at(1U) == "fm") m_command = REMOTE_COMMAND::ENABLE_FM; - else if (m_args.at(1U) == "ax25") - m_command = REMOTE_COMMAND::ENABLE_AX25; else replyStr = "KO"; } else if (m_args.at(0U) == "disable" && m_args.size() >= DISABLE_ARGS) { @@ -134,8 +132,6 @@ REMOTE_COMMAND CRemoteControl::getCommand() m_command = REMOTE_COMMAND::DISABLE_NXDN; else if (m_args.at(1U) == "fm") m_command = REMOTE_COMMAND::DISABLE_FM; - else if (m_args.at(1U) == "ax25") - m_command = REMOTE_COMMAND::DISABLE_AX25; else replyStr = "KO"; } else if (m_args.at(0U) == "page" && m_args.size() >= PAGE_ARGS) { diff --git a/RemoteControl.h b/RemoteControl.h index 675a58c..edf6e01 100644 --- a/RemoteControl.h +++ b/RemoteControl.h @@ -42,14 +42,12 @@ enum class REMOTE_COMMAND { ENABLE_P25, ENABLE_NXDN, ENABLE_FM, - ENABLE_AX25, DISABLE_DSTAR, DISABLE_DMR, DISABLE_YSF, DISABLE_P25, DISABLE_NXDN, DISABLE_FM, - DISABLE_AX25, PAGE, PAGE_BCD, PAGE_A1, diff --git a/Version.h b/Version.h index d589832..e6314a6 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20250709"; +const char* VERSION = "20250826"; #endif