Compare commits

...

24 Commits

Author SHA1 Message Date
Ricardo Guzman (Richonguzman)
e31dbbf91f testing1 2026-03-08 10:43:51 -03:00
Ricardo Guzman (Richonguzman)
11c36a91fb Safe Poing V3.2.2 2026-03-08 10:32:18 -03:00
Ricardo Guzman (Richonguzman)
a97ffe709f Merge pull request #407 from richonguzman/backBefore-FIX-OTA
Back before fix ota
2026-03-08 10:21:40 -03:00
Ricardo Guzman (Richonguzman)
c80b565730 Merge branch 'main' into backBefore-FIX-OTA 2026-03-08 10:18:44 -03:00
Ricardo Guzman (Richonguzman)
84cbcc30e8 intentando arreglar 2026-03-08 10:12:57 -03:00
Ricardo Guzman (Richonguzman)
11d413cb17 corrigiendo desorden 2026-03-08 10:11:43 -03:00
Ricardo Guzman (Richonguzman)
19d767e3cb corrigiendo desorden 2026-03-08 10:11:10 -03:00
Ricardo Guzman (Richonguzman)
803bde1008 Merge pull request #405 from petrkr/fixconfig
Fix OTA update due bad configuration behaviour
2026-03-08 09:51:40 -03:00
Ricardo Guzman (Richonguzman)
8ab1f5ec24 many more libraries update 2026-03-08 09:21:34 -03:00
Ricardo Guzman (Richonguzman)
cfc9474469 RadioLib 7.6.0 update 2026-03-08 09:12:56 -03:00
Ricardo Guzman (Richonguzman)
949807bc14 Merge pull request #249 from petrkr/updates
Updates
2026-03-08 09:00:06 -03:00
Petr Kracík
35760b74f7 Fix OTA update due bad configuration behaviour 2026-03-06 03:49:11 +01:00
Petr Kracík
b5690a2f37 Updated espressif SDK 2026-03-05 22:06:00 +01:00
Ricardo Guzman (Richonguzman)
b448e2fc6b ADC_CTRL_PIN fix 2026-03-05 10:06:22 -03:00
Ricardo Guzman (Richonguzman)
c33720a5fb VEXT_CTRL_PIN definition missing fix 2026-03-04 12:24:16 -03:00
Ricardo Guzman (Richonguzman)
e57fad6666 aprsis.active update in digi.ecoMode == 1 ? 2026-03-04 11:21:26 -03:00
Ricardo Guzman (Richonguzman)
2418291ac9 digiEcoMode forces APRS.active = false 2026-03-03 11:22:41 -03:00
Ricardo Guzman (Richonguzman)
796ba35357 add new ESP32 device 9M2IBR 2026-02-26 12:28:52 -03:00
Ricardo Guzman (Richonguzman)
57873e4181 readme and date update 2026-02-26 11:51:59 -03:00
Ricardo Guzman (Richonguzman)
453222d69f new board added 9M2IBR 2026-02-26 11:08:49 -03:00
Ricardo Guzman (Richonguzman)
fbb347fb7f new update to kiss utils 2026-02-26 10:31:45 -03:00
Ricardo Guzman (Richonguzman)
50fd831fdb kiss correction of missing new indexOf 2026-02-26 10:23:40 -03:00
Ricardo Guzman (Richonguzman)
3a2c0304d0 status logic improved 2026-02-25 12:25:40 -03:00
Ricardo Guzman (Richonguzman)
b24c2b2527 update build for heltec v2 915 2026-02-25 10:57:07 -03:00
17 changed files with 162 additions and 85 deletions

View File

@@ -19,6 +19,8 @@ jobs:
chip: esp32s3
- name: heltec-lora32-v2
chip: esp32
- name: heltec-lora32-v2_915
chip: esp32
- name: heltec_wifi_lora_32_V3
chip: esp32s3
- name: heltec_wifi_lora_32_V3_2
@@ -96,7 +98,9 @@ jobs:
- name: XIAO_ESP32S3_WIO_SX1262
chip: esp32s3
- name: TROY_LoRa_APRS
chip: esp32
chip: esp32
- name: ESP32_9M2IBR_1W_LoRa_GPS
chip: esp32
steps:
- uses: actions/checkout@v3

View File

@@ -51,6 +51,7 @@ ____________________________________________________
<br />
# Timeline (Versions):
- 2026-02-26 9M2IBR ESP32 1W (400M30S) + GPS board added.
- 2026-02-25 Code Improvements: reduced String comparisons and improved logic for faster code execution.
- 2026-02-15 Digipeater code/logic improved.
- 2026-02-08 Heltec V2 915MHz added.

View File

@@ -23,20 +23,20 @@ build_flags =
-D RADIOLIB_EXCLUDE_SSTV=1
-I variants/${PIOENV}
lib_deps =
adafruit/Adafruit Unified Sensor @ 1.1.14
adafruit/Adafruit AHTX0 @ 2.0.5
adafruit/Adafruit BME280 Library @ 2.2.4
adafruit/Adafruit BMP280 Library @ 2.6.8
adafruit/Adafruit BME680 Library @ 2.0.4
adafruit/Adafruit Unified Sensor @ 1.1.15
adafruit/Adafruit AHTX0 @ 2.0.6
adafruit/Adafruit BME280 Library @ 2.3.0
adafruit/Adafruit BMP280 Library @ 3.0.0
adafruit/Adafruit BME680 Library @ 2.0.6
adafruit/Adafruit INA219 @ 1.2.3
adafruit/Adafruit Si7021 Library @ 1.5.3
arduino-libraries/NTPClient @ 3.2.1
ayushsharma82/ElegantOTA @ 3.1.7
bblanchon/ArduinoJson @ 6.21.3
jgromes/RadioLib @ 7.1.0
jgromes/RadioLib @ 7.6.0
knolleary/PubSubClient @ 2.8
ESP32Async/AsyncTCP @ 3.4.9
ESP32Async/ESPAsyncWebServer @ 3.9.3
ESP32Async/AsyncTCP @ 3.4.10
ESP32Async/ESPAsyncWebServer @ 3.10.0
mikalhart/TinyGPSPlus @ 1.0.3
richonguzman/APRSPacketLib @ 1.0.4
display_libs =
@@ -44,4 +44,4 @@ display_libs =
adafruit/Adafruit SSD1306 @ 2.5.10
usb_flags=
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_CDC_ON_BOOT=1

View File

@@ -195,13 +195,13 @@ public:
REMOTE_MANAGEMENT remoteManagement;
MQTT mqtt;
void setup();
void setDefaultValues();
bool writeFile();
Configuration();
private:
bool readFile();
String _filePath;
};
#endif
#endif

View File

@@ -34,7 +34,7 @@ namespace POWER_Utils {
void vext_ctrl_OFF();
#endif
#ifdef ADC_CTRL
#ifdef ADC_CTRL_PIN
void adc_ctrl_ON();
void adc_ctrl_OFF();
#endif

View File

@@ -16,7 +16,7 @@ extra_configs =
variants/*/platformio.ini
[env]
platform = espressif32 @ 6.7.0
platform = espressif32 @ 6.12.0
board_build.partitions = min_spiffs.csv
framework = arduino
monitor_speed = 115200

View File

@@ -67,8 +67,8 @@ ___________________________________________________________________*/
#endif
String versionDate = "2026-02-25";
String versionNumber = "3.2";
String versionDate = "2026-03-08";
String versionNumber = "3.2.103";
Configuration Config;
WiFiClient aprsIsClient;
WiFiClient mqttClient;
@@ -101,6 +101,7 @@ String firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seven
void setup() {
Serial.begin(115200);
Config.setup();
POWER_Utils::setup();
Utils::setupDisplay();
LoRa_Utils::setup();
@@ -216,4 +217,4 @@ void loop() {
Utils::checkRebootTime();
Utils::checkSleepByLowBatteryVoltage(1);
}
}
}

View File

@@ -154,7 +154,7 @@ namespace BATTERY_Utils {
}
#else
#ifdef ADC_CTRL
#ifdef ADC_CTRL_PIN
POWER_Utils::adc_ctrl_ON();
#endif
@@ -180,7 +180,7 @@ namespace BATTERY_Utils {
delay(3);
}
#ifdef ADC_CTRL
#ifdef ADC_CTRL_PIN
POWER_Utils::adc_ctrl_OFF();
#ifdef HELTEC_WP_V1

View File

@@ -26,6 +26,25 @@
bool shouldSleepStop = true;
void Configuration::setup() {
if (!SPIFFS.begin(false)) {
Serial.println("SPIFFS Mount Failed");
return;
} else {
Serial.println("SPIFFS Mounted");
}
bool exists = SPIFFS.exists("/igate_conf.json");
if (!exists) {
setDefaultValues();
writeFile();
delay(1000);
ESP.restart();
}
readFile();
}
bool Configuration::writeFile() {
Serial.println("Saving configuration...");
@@ -87,6 +106,7 @@ bool Configuration::writeFile() {
data["digi"]["mode"] = digi.mode;
data["digi"]["ecoMode"] = digi.ecoMode;
if (digi.ecoMode == 1) data["aprs_is"]["active"] = false;
#if defined(HAS_A7670)
if (digi.ecoMode == 1) data["digi"]["ecoMode"] = 2;
#endif
@@ -556,23 +576,4 @@ void Configuration::setDefaultValues() {
rememberStationTime = 30;
Serial.println("New Data Created... All is Written!");
}
Configuration::Configuration() {
if (!SPIFFS.begin(false)) {
Serial.println("SPIFFS Mount Failed");
return;
} else {
Serial.println("SPIFFS Mounted");
}
bool exists = SPIFFS.exists("/igate_conf.json");
if (!exists) {
setDefaultValues();
writeFile();
delay(1000);
ESP.restart();
}
readFile();
}

View File

@@ -57,7 +57,7 @@
String lastEpaperText;
#else
#include <Adafruit_GFX.h>
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
#include <Adafruit_SH110X.h>
Adafruit_SH1106G display(128, 64, &Wire, OLED_RST);
#else
@@ -117,7 +117,7 @@ void displaySetup() {
digitalWrite(OLED_RST, HIGH);
#endif
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
if (display.begin(0x3c, false)) {
displayFound = true;
if (Config.display.turn180) display.setRotation(2);
@@ -157,7 +157,7 @@ void displayToggle(bool toggle) {
display.printCenter("EPAPER Display Disabled by toggle...");
display.update();
#else
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
if (displayFound) display.oled_command(SH110X_DISPLAYON);
#else
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYON);
@@ -171,7 +171,7 @@ void displayToggle(bool toggle) {
#ifdef HAS_EPAPER
display.update();
#else
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
if (displayFound) display.oled_command(SH110X_DISPLAYOFF);
#else
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYOFF);
@@ -222,7 +222,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
#else
if (displayFound) {
display.clearDisplay();
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
display.setTextColor(SH110X_WHITE);
#else
display.setTextColor(WHITE);
@@ -234,7 +234,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
display.setCursor(0, 8 + (8 * i));
display.println(*lines[i]);
}
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
display.setContrast(1);
#else
display.ssd1306_command(SSD1306_SETCONTRAST);
@@ -288,7 +288,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
#else
if (displayFound) {
display.clearDisplay();
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
display.setTextColor(SH110X_WHITE);
#else
display.setTextColor(WHITE);
@@ -301,7 +301,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
display.setCursor(0, 16 + (8 * i));
display.println(*lines[i]);
}
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef HAS_SH1106
display.setContrast(1);
#else
display.ssd1306_command(SSD1306_SETCONTRAST);

View File

@@ -29,29 +29,20 @@ bool validateKISSFrame(const String& kissFormattedFrame) {
}
String encodeAddressAX25(String tnc2Address) {
bool hasBeenDigipited = tnc2Address.indexOf('*') != -1;
int tnc2AddressIndex = tnc2Address.indexOf('-');
if (tnc2AddressIndex == -1) {
if (hasBeenDigipited) {
tnc2Address = tnc2Address.substring(0, tnc2Address.length() - 1);
}
bool hasBeenDigipited = tnc2Address.indexOf('*') != -1;
if (tnc2Address.indexOf('-') == -1) {
if (hasBeenDigipited) tnc2Address = tnc2Address.substring(0, tnc2Address.length() - 1);
tnc2Address += "-0";
}
int separatorIndex = tnc2AddressIndex;
int ssid = tnc2Address.substring(separatorIndex + 1).toInt();
int separatorIndex = tnc2Address.indexOf('-');;
int ssid = tnc2Address.substring(separatorIndex + 1).toInt();
String kissAddress = "";
for (int i = 0; i < 6; ++i) {
char addressChar;
if (tnc2Address.length() > i && i < separatorIndex) {
addressChar = tnc2Address.charAt(i);
} else {
addressChar = ' ';
}
char addressChar = ' ';
if (tnc2Address.length() > i && i < separatorIndex) addressChar = tnc2Address.charAt(i);
kissAddress += (char)(addressChar << 1);
}
kissAddress += (char)((ssid << 1) | 0b01100000 | (hasBeenDigipited ? HAS_BEEN_DIGIPITED_MASK : 0));
return kissAddress;
}

View File

@@ -263,8 +263,8 @@ namespace POWER_Utils {
pinMode(Config.battery.externalVoltagePin, INPUT);
}
#ifdef VEXT_CTRL
pinMode(VEXT_CTRL,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
#ifdef VEXT_CTRL_PIN
pinMode(VEXT_CTRL_PIN,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
vext_ctrl_ON();
#endif
@@ -272,8 +272,8 @@ namespace POWER_Utils {
if (Config.beacon.gpsActive && Config.digi.ecoMode != 1) activateGPS();
#endif
#ifdef ADC_CTRL
pinMode(ADC_CTRL, OUTPUT);
#ifdef ADC_CTRL_PIN
pinMode(ADC_CTRL_PIN, OUTPUT);
adc_ctrl_OFF();
#endif

View File

@@ -62,8 +62,7 @@ extern bool sendEUP; // Equations Units Parameters
extern std::vector<LastHeardStation> lastHeardStations;
bool statusAfterBoot = true;
bool statusUpdate = true;
bool beaconUpdate = false;
uint32_t lastBeaconTx = 0;
uint32_t lastScreenOn = millis();
@@ -76,26 +75,30 @@ String secondaryBeaconPacket;
namespace Utils {
void processStatus() {
String status = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
bool sendOverAPRSIS = Config.beacon.sendViaAPRSIS && Config.aprs_is.active && WiFi.status() == WL_CONNECTED;
bool sendOverRF = !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF;
if (WiFi.status() == WL_CONNECTED && Config.aprs_is.active && Config.beacon.sendViaAPRSIS) {
delay(1000);
status.concat(",qAC:>");
status.concat(Config.beacon.statusPacket);
APRS_IS_Utils::upload(status);
SYSLOG_Utils::log(2, status, 0, 0.0, 0); // APRSIS TX
if (!sendOverAPRSIS && !sendOverRF) {
statusUpdate = false;
return;
}
if (statusAfterBoot && !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF) {
status.concat(":>");
status.concat(Config.beacon.statusPacket);
STATION_Utils::addToOutputPacketBuffer(status, true); // treated also as beacon on Tx Freq
String statusPacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
statusPacket += sendOverAPRSIS ? ",qAC:>" : ":>";
statusPacket += Config.beacon.statusPacket;
if (sendOverAPRSIS) {
APRS_IS_Utils::upload(statusPacket);
SYSLOG_Utils::log(2, statusPacket, 0, 0.0, 0); // APRSIS TX
} else {
STATION_Utils::addToOutputPacketBuffer(statusPacket, true); // treated also as beacon on Tx Freq
}
statusAfterBoot = false;
statusUpdate = false;
lastStatusTx = millis();
}
void checkStatusInterval() {
if (lastStatusTx == 0 || millis() - lastStatusTx > DAY_MS) statusAfterBoot = true;
if (lastStatusTx == 0 || millis() - lastStatusTx > DAY_MS) statusUpdate = true;
}
String getLocalIP() {
@@ -292,7 +295,7 @@ namespace Utils {
}
checkStatusInterval();
if (statusAfterBoot && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) processStatus();
if (statusUpdate && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) processStatus();
}
void checkDisplayInterval() {
@@ -405,9 +408,9 @@ namespace Utils {
if (mode == 1) { // low voltage detected after a while
displayToggle(false);
}
#ifdef VEXT_CTRL
#ifdef VEXT_CTRL_PIN
#ifndef HELTEC_WSL_V3
digitalWrite(VEXT_CTRL, LOW);
digitalWrite(VEXT_CTRL_PIN, LOW);
#endif
#endif
LoRa_Utils::sleepRadio();

View File

@@ -0,0 +1,63 @@
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
*
* This file is part of LoRa APRS iGate.
*
* LoRa APRS iGate 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 3 of the License, or
* (at your option) any later version.
*
* LoRa APRS iGate 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 LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
#define HAS_TCXO
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 12
#define RADIO_BUSY_PIN 14
#define RADIO_RXEN 32
#define RADIO_TXEN 25
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
#define GPIO_WAKEUP_PIN GPIO_SEL_12
// I2C
#define USE_WIRE_WITH_OLED_PINS
// Display
#define HAS_DISPLAY
#define HAS_SH1106
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// GPS
#define HAS_GPS
#define GPS_BAUDRATE 9600
#define GPS_RX 17
#define GPS_TX 16
// Aditional Config
#define INTERNAL_LED_PIN 2
#define BATTERY_PIN 35
#endif

View File

@@ -0,0 +1,12 @@
[env:ESP32_9M2IBR_1W_LoRa_GPS]
board = esp32dev
build_flags =
${common.build_flags}
-D RADIOLIB_EXCLUDE_LR11X0=1
-D RADIOLIB_EXCLUDE_SX127X=1
-D RADIOLIB_EXCLUDE_SX128X=1
-D ESP32_9M2IBR_1W_LoRa_GPS
lib_deps =
${common.lib_deps}
${common.display_libs}
adafruit/Adafruit SH110X @ 2.1.10

View File

@@ -49,7 +49,7 @@
#define INTERNAL_LED_PIN 25
#define BATTERY_PIN 37
#define ADC_CTRL 21
#define ADC_CTRL_PIN 21
#define ADC_CTRL_ON_STATE LOW
#endif

View File

@@ -35,6 +35,7 @@
// Display
#define HAS_DISPLAY
#define HAS_SH1106
#undef OLED_SDA
#undef OLED_SCL