From 8f0ba240593891100c57fb976a3aadbfb591d57c Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 23 Mar 2026 16:56:54 -0400 Subject: [PATCH] you know how some parents need to best effort child proof electrical sockets to prevent shocks? yea lets at least *try* to child proof 700mhz; --- configs/iden_table.example.dat | 1 - src/host/Host.Config.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configs/iden_table.example.dat b/configs/iden_table.example.dat index a34c0446..43ffe9ac 100644 --- a/configs/iden_table.example.dat +++ b/configs/iden_table.example.dat @@ -5,7 +5,6 @@ # # ChId,Base Freq,Spacing (khz),Input Offset (mhz),Bandwidth (khz), 0,851006250,6.25,-45.000,12.5, -1,762006250,6.25,30.000,12.5, 15,935001250,6.25,-39.00000,12.5, 2,450000000,6.25,5.000,12.5, 3,146000000,6.25,1.000,12.5, diff --git a/src/host/Host.Config.cpp b/src/host/Host.Config.cpp index 72c21218..618a80e1 100644 --- a/src/host/Host.Config.cpp +++ b/src/host/Host.Config.cpp @@ -170,6 +170,10 @@ bool Host::readParams() return false; } + if (entry.baseFrequency() > 762000000U && entry.baseFrequency() < 804000000U) { + ::fatal("I would bet real money, that you aren't licensed for this -- error 70"); + } + m_channelNo = (uint32_t)::strtoul(rfssConfig["channelNo"].as("1").c_str(), NULL, 16); if (m_channelNo == 0U) { // clamp to 1 m_channelNo = 1U; @@ -189,6 +193,14 @@ bool Host::readParams() m_txFrequency = (uint32_t)((entry.baseFrequency() + ((calcSpace * 125) * m_channelNo))); m_rxFrequency = (uint32_t)(m_txFrequency + (int32_t)calcTxOffset); + if (m_txFrequency >= 762000000U && m_txFrequency <= 775000000U) { + ::fatal("error 70"); + } + + if (m_rxFrequency >= 797000000U && m_rxFrequency <= 805000000U) { + ::fatal("error 70"); + } + if (calcTxOffset < 0.0f && m_rxFrequency < entry.baseFrequency()) { ::LogWarning(LOG_HOST, "Channel Id %u Channel No $%04X has an invalid frequency. Rx Frequency (%u) is less then the base frequency (%u), this may result in incorrect trunking behavior.", m_channelId, m_channelNo, m_rxFrequency, entry.baseFrequency());