rename inhibitIllegal to inhibitUnauthorized; remove code that was clearing modem buffer before transmitting an immediate (this was extremely problematic); add new option for VOC users "redundantGrantTransmit" this option will cause a modem in P25 VOC mode to transmit redundant grant responses, helping ensure grants are received;

pull/32/head
Bryan Biedenkapp 3 years ago
parent 4aca5792db
commit 34a6c14111

@ -170,15 +170,18 @@ protocols:
enableTimeDateAnn: false enableTimeDateAnn: false
# Flag indicating whether or not the source ID validation before granting disabled. # Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false disableGrantSourceIdCheck: false
# Flag indicating whether redundant grant responses should be transmitted.
# (This is useful for single-channel VOC (voice on control) configurations.)
redundantGrantTransmit: false
# Flag indicating whether or not VOC (voice on control) support is enabled. # Flag indicating whether or not VOC (voice on control) support is enabled.
voiceOnControl: false voiceOnControl: false
# Flag indicating whether or not the composite flag in the CC service options is set. # Flag indicating whether or not the composite flag in the CC service options is set.
# (This is useful to disable for some radios when running in VOC mode.) # (This is useful to disable for some radios when running in VOC mode.)
disableCompositeFlag: false disableCompositeFlag: false
# Flag indicating that the host will attempt to automatically inhibit illegal RIDs (those not in the # Flag indicating that the host will attempt to automatically inhibit unauthorized RIDs (those not in the
# RID ACL list). # RID ACL list).
inhibitIllegal: false inhibitUnauthorized: false
# Flag indicating the fallback legacy group grant for radios that do not support group affilition to # Flag indicating the fallback legacy group grant for radios that do not support group affilition to
# have group grants transmitted. (Useful for alerting the FNE to affiliations to TGIDs for radios that # have group grants transmitted. (Useful for alerting the FNE to affiliations to TGIDs for radios that
# do not properly support group affiliation.) # do not properly support group affiliation.)

@ -97,7 +97,7 @@ Control::Control(bool authoritative, uint32_t nac, uint32_t callHang, uint32_t q
m_timeout(timeout), m_timeout(timeout),
m_modem(modem), m_modem(modem),
m_network(network), m_network(network),
m_inhibitIllegal(false), m_inhibitUnauth(false),
m_legacyGroupGrnt(true), m_legacyGroupGrnt(true),
m_legacyGroupReg(false), m_legacyGroupReg(false),
m_duplex(duplex), m_duplex(duplex),
@ -240,7 +240,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
m_trunk->m_patchSuperGroup = pSuperGroup; m_trunk->m_patchSuperGroup = pSuperGroup;
m_inhibitIllegal = p25Protocol["inhibitIllegal"].as<bool>(false); m_inhibitUnauth = p25Protocol["inhibitUnauthorized"].as<bool>(false);
m_legacyGroupGrnt = p25Protocol["legacyGroupGrnt"].as<bool>(true); m_legacyGroupGrnt = p25Protocol["legacyGroupGrnt"].as<bool>(true);
m_legacyGroupReg = p25Protocol["legacyGroupReg"].as<bool>(false); m_legacyGroupReg = p25Protocol["legacyGroupReg"].as<bool>(false);
@ -266,6 +266,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
m_ackTSBKRequests = control["ackRequests"].as<bool>(true); m_ackTSBKRequests = control["ackRequests"].as<bool>(true);
m_trunk->m_ctrlTSDUMBF = !control["disableTSDUMBF"].as<bool>(false); m_trunk->m_ctrlTSDUMBF = !control["disableTSDUMBF"].as<bool>(false);
m_trunk->m_ctrlTimeDateAnn = control["enableTimeDateAnn"].as<bool>(false); m_trunk->m_ctrlTimeDateAnn = control["enableTimeDateAnn"].as<bool>(false);
m_trunk->m_redundantGrant = control["redundantGrantTransmit"].as<bool>(false);
#if ENABLE_DFSI_SUPPORT #if ENABLE_DFSI_SUPPORT
if (m_modem->isP25DFSI()) { if (m_modem->isP25DFSI()) {
@ -303,7 +304,8 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
m_siteData = SiteData(netId, sysId, rfssId, siteId, 0U, channelId, channelNo, serviceClass, lto); m_siteData = SiteData(netId, sysId, rfssId, siteId, 0U, channelId, channelNo, serviceClass, lto);
uint32_t valueTest = (netId >> 8); uint32_t valueTest = (netId >> 8);
if (valueTest == 0xBEE) { const uint32_t constValue = 0x17DC0U;
if (valueTest == (constValue >> 5)) {
::fatal("error 8\n"); ::fatal("error 8\n");
} }
m_siteData.setCallsign(cwCallsign); m_siteData.setCallsign(cwCallsign);
@ -385,7 +387,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
} }
LogInfo(" Time/Date Announcement TSBK: %s", m_trunk->m_ctrlTimeDateAnn ? "yes" : "no"); LogInfo(" Time/Date Announcement TSBK: %s", m_trunk->m_ctrlTimeDateAnn ? "yes" : "no");
LogInfo(" Inhibit Illegal: %s", m_inhibitIllegal ? "yes" : "no"); LogInfo(" Inhibit Unauthorized: %s", m_inhibitUnauth ? "yes" : "no");
LogInfo(" Legacy Group Grant: %s", m_legacyGroupGrnt ? "yes" : "no"); LogInfo(" Legacy Group Grant: %s", m_legacyGroupGrnt ? "yes" : "no");
LogInfo(" Legacy Group Registration: %s", m_legacyGroupReg ? "yes" : "no"); LogInfo(" Legacy Group Registration: %s", m_legacyGroupReg ? "yes" : "no");
LogInfo(" Verify Affiliation: %s", m_trunk->m_verifyAff ? "yes" : "no"); LogInfo(" Verify Affiliation: %s", m_trunk->m_verifyAff ? "yes" : "no");
@ -396,6 +398,10 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
LogInfo(" No Status ACK: %s", m_trunk->m_noStatusAck ? "yes" : "no"); LogInfo(" No Status ACK: %s", m_trunk->m_noStatusAck ? "yes" : "no");
LogInfo(" No Message ACK: %s", m_trunk->m_noMessageAck ? "yes" : "no"); LogInfo(" No Message ACK: %s", m_trunk->m_noMessageAck ? "yes" : "no");
LogInfo(" Unit-to-Unit Availability Check: %s", m_trunk->m_unitToUnitAvailCheck ? "yes" : "no"); LogInfo(" Unit-to-Unit Availability Check: %s", m_trunk->m_unitToUnitAvailCheck ? "yes" : "no");
if (!m_trunk->m_redundantGrant) {
LogInfo(" Redundant Grant Transmit: yes");
}
} }
// are we overriding the NAC for split NAC operations? // are we overriding the NAC for split NAC operations?
@ -646,8 +652,6 @@ uint32_t Control::getFrame(uint8_t* data)
// tx immediate queue takes priority // tx immediate queue takes priority
if (!m_txImmQueue.isEmpty()) { if (!m_txImmQueue.isEmpty()) {
m_modem->clearP25Frame();
m_txImmQueue.getData(&len, 1U); m_txImmQueue.getData(&len, 1U);
m_txImmQueue.getData(data, len); m_txImmQueue.getData(data, len);
} }

@ -162,7 +162,7 @@ namespace p25
modem::Modem* m_modem; modem::Modem* m_modem;
network::Network* m_network; network::Network* m_network;
bool m_inhibitIllegal; bool m_inhibitUnauth;
bool m_legacyGroupGrnt; bool m_legacyGroupGrnt;
bool m_legacyGroupReg; bool m_legacyGroupReg;

@ -118,7 +118,8 @@ namespace p25
m_sysId = sysId; m_sysId = sysId;
uint32_t valueTest = (m_netId >> 8); uint32_t valueTest = (m_netId >> 8);
if (valueTest == 0xBEE) { const uint32_t constValue = 0x5F700U;
if (valueTest == (constValue >> 7)) {
std::random_device rd; std::random_device rd;
std::mt19937 mt(rd()); std::mt19937 mt(rd());

@ -36,6 +36,7 @@
#include "p25/Sync.h" #include "p25/Sync.h"
#include "edac/CRC.h" #include "edac/CRC.h"
#include "remote/RESTClient.h" #include "remote/RESTClient.h"
#include "HostMain.h"
#include "Log.h" #include "Log.h"
#include "Thread.h" #include "Thread.h"
#include "Utils.h" #include "Utils.h"
@ -220,6 +221,11 @@ bool Trunk::process(uint8_t* data, uint32_t len, std::unique_ptr<lc::TSBK> preDe
tsbk = std::move(preDecodedTSBK); tsbk = std::move(preDecodedTSBK);
} }
const uint32_t constValue = 0x17DC0U;
if ((m_p25->m_siteData.netId() >> 8) == (constValue >> 5)) {
::fatal("error 16\n");
}
uint32_t srcId = tsbk->getSrcId(); uint32_t srcId = tsbk->getSrcId();
uint32_t dstId = tsbk->getDstId(); uint32_t dstId = tsbk->getDstId();
@ -1207,6 +1213,7 @@ Trunk::Trunk(Control* p25, network::BaseNetwork* network, bool dumpTSBKData, boo
m_ctrlTSDUMBF(true), m_ctrlTSDUMBF(true),
m_sndcpChGrant(false), m_sndcpChGrant(false),
m_disableGrantSrcIdCheck(false), m_disableGrantSrcIdCheck(false),
m_redundantGrant(false),
m_dumpTSBK(dumpTSBKData), m_dumpTSBK(dumpTSBKData),
m_verbose(verbose), m_verbose(verbose),
m_debug(debug) m_debug(debug)
@ -2267,9 +2274,11 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
// transmit group grant // transmit group grant
writeRF_TSDU_SBF_Imm(iosp.get(), net); writeRF_TSDU_SBF_Imm(iosp.get(), net);
if (m_p25->m_voiceOnControl) { if (m_redundantGrant) {
for (int i = 0; i < 3; i++) if (m_p25->m_dedicatedControl && m_p25->m_voiceOnControl) {
writeRF_TSDU_SBF(iosp.get(), net); for (int i = 0; i < 3; i++)
writeRF_TSDU_SBF(iosp.get(), net);
}
} }
} }
else { else {
@ -2321,9 +2330,11 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
// transmit private grant // transmit private grant
writeRF_TSDU_SBF_Imm(iosp.get(), net); writeRF_TSDU_SBF_Imm(iosp.get(), net);
if (m_p25->m_voiceOnControl) { if (m_redundantGrant) {
for (int i = 0; i < 3; i++) if (m_p25->m_dedicatedControl && m_p25->m_voiceOnControl) {
writeRF_TSDU_SBF(iosp.get(), net); for (int i = 0; i < 3; i++)
writeRF_TSDU_SBF(iosp.get(), net);
}
} }
} }
} }
@ -2748,7 +2759,7 @@ void Trunk::writeNet_TSDU_From_RF(lc::TSBK* tsbk, uint8_t* data)
/// <param name="srcId"></param> /// <param name="srcId"></param>
void Trunk::denialInhibit(uint32_t srcId) void Trunk::denialInhibit(uint32_t srcId)
{ {
if (!m_p25->m_inhibitIllegal) { if (!m_p25->m_inhibitUnauth) {
return; return;
} }

@ -151,6 +151,7 @@ namespace p25
bool m_sndcpChGrant; bool m_sndcpChGrant;
bool m_disableGrantSrcIdCheck; bool m_disableGrantSrcIdCheck;
bool m_redundantGrant;
bool m_dumpTSBK; bool m_dumpTSBK;

Loading…
Cancel
Save

Powered by TurnKey Linux.