diff --git a/configs/config.example.yml b/configs/config.example.yml index 0a760902..5ba696e2 100644 --- a/configs/config.example.yml +++ b/configs/config.example.yml @@ -196,6 +196,8 @@ protocols: legacyGroupGrnt: true # Flag indicating the fallback legacy group registration. (Same as above except for group affiliations.) legacyGroupReg: false + # Flag indicating the host should send a network grant demand TDU for conventional traffic. + convNetGrantDemand: false # Flag indicating the host should verify group affiliation. verifyAff: false # Flag indicating the host should verify unit registration. diff --git a/src/HostMain.cpp b/src/HostMain.cpp index 4c7bc75e..485b52b3 100644 --- a/src/HostMain.cpp +++ b/src/HostMain.cpp @@ -148,7 +148,7 @@ void fatal(const char* msg, ...) void usage(const char* message, const char* arg) { ::fprintf(stdout, __PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)\n", __VER__, __BUILD__); - ::fprintf(stdout, "Copyright (c) 2017-2023 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors.\n"); + ::fprintf(stdout, "Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors.\n"); ::fprintf(stdout, "Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others\n\n"); if (message != nullptr) { ::fprintf(stderr, "%s: ", g_progExe.c_str()); @@ -157,8 +157,12 @@ void usage(const char* message, const char* arg) } ::fprintf(stdout, - "usage: %s [-vhf]" + "usage: %s [-vhdf]" +#if defined(ENABLE_SETUP_TUI) "[--setup]" +#else + "[--cal]" +#endif "[--fne]" "[-c ]" "[--remote [-a
] [-p ]]" @@ -168,7 +172,11 @@ void usage(const char* message, const char* arg) " -d force modem debug\n" " -f foreground mode\n" "\n" +#if defined(ENABLE_SETUP_TUI) " --setup setup and calibration mode\n" +#else + " --cal old calibration mode\n" +#endif "\n" " --fne fixed network equipment mode (conference bridge)\n" "\n" diff --git a/src/Utils.cpp b/src/Utils.cpp index 52f77b24..8d76b873 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -12,7 +12,7 @@ // /* * Copyright (C) 2009,2014,2015,2016 Jonathan Naylor, G4KLX -* Copyright (C) 2018-2023 Bryan Biedenkapp N2PLL +* Copyright (C) 2018-2024 Bryan Biedenkapp N2PLL * * 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 @@ -50,7 +50,7 @@ const uint8_t BITS_TABLE[] = { void getHostVersion() { LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); - LogInfo("Copyright (c) 2017-2023 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); } diff --git a/src/p25/Control.cpp b/src/p25/Control.cpp index 6b8a2e2d..c455d6d1 100644 --- a/src/p25/Control.cpp +++ b/src/p25/Control.cpp @@ -12,7 +12,7 @@ // /* * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX -* Copyright (C) 2017-2023 by Bryan Biedenkapp N2PLL +* Copyright (C) 2017-2024 by Bryan Biedenkapp N2PLL * * 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 @@ -106,6 +106,8 @@ Control::Control(bool authoritative, uint32_t nac, uint32_t callHang, uint32_t q m_ackTSBKRequests(true), m_disableNetworkGrant(false), m_disableNetworkHDU(false), + m_allowExplicitSourceId(true), + m_convNetGrantDemand(false), m_idenTable(idenTable), m_ridLookup(ridLookup), m_tidLookup(tidLookup), @@ -300,6 +302,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw m_enableControl = control["enable"].as(false); if (m_enableControl) { m_dedicatedControl = control["dedicated"].as(false); + m_convNetGrantDemand = false; } else { m_dedicatedControl = false; @@ -330,6 +333,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw m_control->m_redundantGrant = control["redundantGrantTransmit"].as(false); m_allowExplicitSourceId = p25Protocol["allowExplicitSourceId"].as(true); + m_convNetGrantDemand = p25Protocol["convNetGrantDemand"].as(false); uint32_t ccBcstInterval = p25Protocol["control"]["interval"].as(300U); m_control->m_adjSiteUpdateInterval += ccBcstInterval; @@ -497,6 +501,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw LogInfo(" No Message ACK: %s", m_control->m_noMessageAck ? "yes" : "no"); LogInfo(" Unit-to-Unit Availability Check: %s", m_control->m_unitToUnitAvailCheck ? "yes" : "no"); LogInfo(" Explicit Source ID Support: %s", m_allowExplicitSourceId ? "yes" : "no"); + LogInfo(" Conventional Network Grant Demand: %s", m_convNetGrantDemand ? "yes" : "no"); LogInfo(" Redundant Immediate: %s", m_control->m_redundantImmediate ? "yes" : "no"); if (m_control->m_redundantGrant) { diff --git a/src/p25/Control.h b/src/p25/Control.h index 4fdc5221..e2db6a68 100644 --- a/src/p25/Control.h +++ b/src/p25/Control.h @@ -12,7 +12,7 @@ // /* * Copyright (C) 2016,2017 by Jonathan Naylor G4KLX -* Copyright (C) 2017-2023 by Bryan Biedenkapp N2PLL +* Copyright (C) 2017-2024 by Bryan Biedenkapp N2PLL * * 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 @@ -174,7 +174,7 @@ namespace p25 bool m_disableNetworkGrant; bool m_disableNetworkHDU; bool m_allowExplicitSourceId; - + bool m_convNetGrantDemand; ::lookups::IdenTableLookup* m_idenTable; ::lookups::RadioIdLookup* m_ridLookup; diff --git a/src/p25/packet/Voice.cpp b/src/p25/packet/Voice.cpp index 9c5fb8bb..72a63a19 100644 --- a/src/p25/packet/Voice.cpp +++ b/src/p25/packet/Voice.cpp @@ -12,7 +12,7 @@ // /* * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX -* Copyright (C) 2017-2023 by Bryan Biedenkapp N2PLL +* Copyright (C) 2017-2024 by Bryan Biedenkapp N2PLL * * 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 @@ -390,6 +390,12 @@ bool Voice::process(uint8_t* data, uint32_t len) } } + // send network grant demand TDU + if (!m_p25->m_control && m_p25->m_convNetGrantDemand) { + uint8_t controlByte = 0x80U | (group) ? 0x00U : 0x01U; + m_p25->m_network->writeP25TDU(lc, m_rfLSD, controlByte); + } + m_rfLC = lc; m_rfLastLDU1 = m_rfLC;