Compare commits

...

4 Commits

Author SHA1 Message Date
Ricardo Guzman (Richonguzman) 775e08a10a stationCallsignIsValid 2026-02-20 10:03:01 -03:00
Ricardo Guzman (Richonguzman) f9291821d2 2 decimales for QTH query 2026-02-18 11:03:06 -03:00
Ricardo Guzman (Richonguzman) 12d0bb760e version update 2026-02-16 23:46:03 -03:00
Ricardo Guzman (Richonguzman) f020eb7491 update a nombre CPU 2026-02-16 23:01:05 -03:00
56 changed files with 363 additions and 454 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ namespace Utils {
void checkRebootMode();
void checkRebootTime();
void checkSleepByLowBatteryVoltage(uint8_t mode);
bool checkValidCallsign(const String& callsign);
bool callsignIsValid(const String& callsign);
void startupDelay();
}
+1 -1
View File
@@ -67,7 +67,7 @@ ___________________________________________________________________*/
#endif
String versionDate = "2026-01-21";
String versionDate = "2026-02-16";
String versionNumber = "3.2";
Configuration Config;
WiFiClient aprsIsClient;
+1 -1
View File
@@ -204,7 +204,7 @@ namespace APRS_IS_Utils {
int firstColonIndex = packet.indexOf(":");
if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] != '}' && packet.indexOf("TCPIP") == -1) {
const String& Sender = packet.substring(3, packet.indexOf(">"));
if (Sender != Config.callsign && Utils::checkValidCallsign(Sender)) {
if (Sender != Config.callsign && Utils::callsignIsValid(Sender)) {
STATION_Utils::updateLastHeard(Sender);
Utils::typeOfPacket(packet.substring(3), 0); // LoRa-APRS
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
+37 -37
View File
@@ -99,8 +99,8 @@ namespace DIGI_Utils {
} else {
temp = packet.substring(packet.indexOf(">") + 1, packet.indexOf(":"));
}
if (temp.indexOf(",") > 2) { // checks for path
const String& path = temp.substring(temp.indexOf(",") + 1); // after tocall
if (temp.indexOf(",") > 2) { // checks for path in temp
const String& path = temp.substring(temp.indexOf(",") + 1); // extract path after tocall
if (Config.digi.mode == 2 || backupDigiMode) {
if (path.indexOf("WIDE1-1") != - 1) {
return buildPacket(path, packet, thirdParty, false);
@@ -135,45 +135,45 @@ namespace DIGI_Utils {
}
void processLoRaPacket(const String& packet) {
if (packet.indexOf("NOGATE") == -1) {
bool thirdPartyPacket = false;
String temp, Sender;
int firstColonIndex = packet.indexOf(":");
if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] == '}' && packet.indexOf("TCPIP") > 0) { // 3rd Party
thirdPartyPacket = true;
temp = packet.substring(packet.indexOf(":}") + 2);
Sender = temp.substring(0, temp.indexOf(">"));
} else {
temp = packet.substring(3);
Sender = packet.substring(3, packet.indexOf(">"));
}
if (Sender != (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign)) { // Avoid listening to own packets
if (!thirdPartyPacket && Config.tacticalCallsign == "" && !Utils::checkValidCallsign(Sender)) {
return;
if (packet.indexOf("NOGATE") >= 0) return;
bool thirdPartyPacket = false;
String temp, Sender;
int firstColonIndex = packet.indexOf(":");
if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] == '}' && packet.indexOf("TCPIP") > 0) { // 3rd Party
thirdPartyPacket = true;
temp = packet.substring(packet.indexOf(":}") + 2);
Sender = temp.substring(0, temp.indexOf(">"));
} else {
temp = packet.substring(3);
Sender = packet.substring(3, packet.indexOf(">"));
}
if (Sender == (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign)) return; // Avoid listening to self packets
if (!thirdPartyPacket && Config.tacticalCallsign == "" && !Utils::callsignIsValid(Sender)) return; // No thirdParty + no tactical y no valid callsign
if (STATION_Utils::check25SegBuffer(Sender, temp.substring(temp.indexOf(":") + 2))) {
STATION_Utils::updateLastHeard(Sender);
Utils::typeOfPacket(temp, 2); // Digi
bool queryMessage = false;
if (temp.indexOf("::") > 10) { // it's a message
String AddresseeAndMessage = temp.substring(temp.indexOf("::") + 2);
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
Addressee.trim();
if (Addressee == (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign)) { // it's a message for me!
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage, thirdPartyPacket);
}
if (STATION_Utils::check25SegBuffer(Sender, temp.substring(temp.indexOf(":") + 2))) {
STATION_Utils::updateLastHeard(Sender);
Utils::typeOfPacket(temp, 2); // Digi
bool queryMessage = false;
if (temp.indexOf("::") > 10) { // it's a message
String AddresseeAndMessage = temp.substring(temp.indexOf("::") + 2);
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
Addressee.trim();
if (Addressee == (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign)) { // it's a message for me!
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage, thirdPartyPacket);
}
}
if (!queryMessage) {
String loraPacket = generateDigipeatedPacket(packet.substring(3), thirdPartyPacket);
if (loraPacket != "") {
STATION_Utils::addToOutputPacketBuffer(loraPacket);
if (Config.digi.ecoMode != 1) displayToggle(true);
lastScreenOn = millis();
}
}
}
if (!queryMessage) {
String loraPacket = generateDigipeatedPacket(packet.substring(3), thirdPartyPacket);
if (loraPacket != "") {
STATION_Utils::addToOutputPacketBuffer(loraPacket);
if (Config.digi.ecoMode != 1) displayToggle(true);
lastScreenOn = millis();
}
}
}
//}
}
}
+3 -3
View File
@@ -34,7 +34,7 @@
extern Configuration Config;
extern HardwareSerial gpsSerial;
extern TinyGPSPlus gps;
extern bool callsignIsValid;
extern bool stationCallsignIsValid;
String distance, iGateBeaconPacket, iGateLoRaBeaconPacket;
@@ -49,7 +49,7 @@ namespace GPS_Utils {
String encodedGPS = APRSPacketLib::encodeGPSIntoBase91(Config.beacon.latitude, Config.beacon.longitude, 0, 0, Config.beacon.symbol, false, 0, true, Config.beacon.ambiguityLevel);
if (Config.callsign.indexOf("NOCALL-10") != 0) {
if (!callsignIsValid) {
if (!stationCallsignIsValid) {
displayShow("***** ERROR ******", "CALLSIGN = NOT VALID!", "", "Only Rx Mode Active", 3000);
Config.loramodule.txActive = false;
Config.aprs_is.messagesToRF = false;
@@ -57,7 +57,7 @@ namespace GPS_Utils {
Config.beacon.sendViaRF = false;
Config.digi.mode = 0;
Config.digi.backupDigiMode = false;
} else if (callsignIsValid && Config.tacticalCallsign != "") {
} else if (stationCallsignIsValid && Config.tacticalCallsign != "") {
beaconPacket = APRSPacketLib::generateBasePacket(Config.tacticalCallsign, "APLRG1", Config.beacon.path);
Config.aprs_is.active = false;
Config.beacon.sendViaAPRSIS = false;
+2 -2
View File
@@ -44,7 +44,7 @@
#endif
extern Configuration Config;
extern bool callsignIsValid;
extern bool stationCallsignIsValid;
namespace POWER_Utils {
@@ -324,7 +324,7 @@ namespace POWER_Utils {
delay(1000);
BATTERY_Utils::setup();
BATTERY_Utils::startupBatteryHealth();
callsignIsValid = Utils::checkValidCallsign(Config.callsign);
stationCallsignIsValid = Utils::callsignIsValid(Config.callsign);
setCpuFrequencyMhz(80);
}
+2 -2
View File
@@ -49,9 +49,9 @@ namespace QUERY_Utils {
answer.concat(versionDate);
} else if (queryQuestion == "?APRSP") {
answer.concat("iGate QTH: ");
answer.concat(String(Config.beacon.latitude,3));
answer.concat(String(Config.beacon.latitude,2));
answer.concat(" ");
answer.concat(String(Config.beacon.longitude,3));
answer.concat(String(Config.beacon.longitude,2));
} else if (queryQuestion == "?APRSL") {
if (lastHeardStations.size() == 0) {
char answerArray[50];
+4 -3
View File
@@ -51,12 +51,13 @@ namespace SLEEP_Utils {
if (Config.digi.ecoMode == 1) {
pinMode(RADIO_WAKEUP_PIN, INPUT);
attachInterrupt(digitalPinToInterrupt(RADIO_WAKEUP_PIN), wakeUpLoRaPacketReceived, RISING);
#if defined(ESP32) || defined(ESP32_S2) || defined(ESP32_S3)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
esp_sleep_enable_ext1_wakeup(GPIO_WAKEUP_PIN, ESP_EXT1_WAKEUP_ANY_HIGH);
#endif
#if defined(ESP32_C3)
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
esp_deep_sleep_enable_gpio_wakeup(1ULL << GPIO_WAKEUP_PIN, ESP_GPIO_WAKEUP_GPIO_HIGH);
#endif
//#if defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_NRF52)
}
#endif
}
+9 -9
View File
@@ -61,13 +61,13 @@ extern bool passcodeValid;
extern std::vector<LastHeardStation> lastHeardStations;
bool statusAfterBoot = true;
bool sendStartTelemetry = true;
bool beaconUpdate = false;
uint32_t lastBeaconTx = 0;
uint32_t lastScreenOn = millis();
uint32_t lastStatusTx = 0;
bool callsignIsValid = false;
bool statusAfterBoot = true;
bool sendStartTelemetry = true;
bool beaconUpdate = false;
uint32_t lastBeaconTx = 0;
uint32_t lastScreenOn = millis();
uint32_t lastStatusTx = 0;
bool stationCallsignIsValid = false;
String beaconPacket;
String secondaryBeaconPacket;
@@ -198,7 +198,7 @@ namespace Utils {
}
beaconPacket += Config.beacon.comment;
secondaryBeaconPacket += Config.beacon.comment;
if (callsignIsValid && Config.tacticalCallsign != "") {
if (stationCallsignIsValid && Config.tacticalCallsign != "") {
beaconPacket += " de ";
beaconPacket += Config.callsign;
secondaryBeaconPacket += " de ";
@@ -415,7 +415,7 @@ namespace Utils {
}
}
bool checkValidCallsign(const String& callsign) {
bool callsignIsValid(const String& callsign) {
if (callsign == "WLNK-1") return true;
String cleanCallsign;
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_C3
// LoRa Radio
#define HAS_SX1268
#define RADIO_HAS_XTAL
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1262
#define HAS_1W_LORA
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_LLCC68
#define HAS_1W_LORA
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 18
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 18
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 36
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1268
#define RADIO_VCC_PIN 21
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 18
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 15
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S2
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 36
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_C3
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_C3
// LoRa Radio
#define HAS_SX1262
#define HAS_1W_LORA
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_C3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32
// LoRa Radio
#define HAS_SX1268
#define RADIO_SCLK_PIN 5
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO
-2
View File
@@ -19,8 +19,6 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
#define ESP32_S3
// LoRa Radio
#define HAS_SX1262
#define HAS_TCXO