mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-18 07:32:49 +02:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4349019f7b | |||
| 411753c0aa | |||
| ad6aed7f0d | |||
| f325c54fc3 | |||
| 1a3966eadc | |||
| ffd3eaeb49 | |||
| df03a49123 | |||
| 58d647bad1 | |||
| 59988fbaf1 | |||
| 1ad13e3c09 | |||
| ffe1a2f830 | |||
| a0fdd78cb1 |
@@ -21,6 +21,8 @@ jobs:
|
|||||||
chip: esp32
|
chip: esp32
|
||||||
- name: heltec_wifi_lora_32_V3
|
- name: heltec_wifi_lora_32_V3
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
|
- name: heltec_wifi_lora_32_V3_2
|
||||||
|
chip: esp32s3
|
||||||
- name: heltec_wireless_stick
|
- name: heltec_wireless_stick
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
- name: heltec_wireless_stick_lite_v3
|
- name: heltec_wireless_stick_lite_v3
|
||||||
@@ -78,7 +80,9 @@ jobs:
|
|||||||
- name: QRPLabs_LightGateway_1_0
|
- name: QRPLabs_LightGateway_1_0
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
- name: XIAO_ESP32S3_WIO_SX1262
|
- name: XIAO_ESP32S3_WIO_SX1262
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
|
- name: TROY_LoRa_APRS
|
||||||
|
chip: esp32
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ ____________________________________________________
|
|||||||
|
|
||||||
## Timeline (Versions):
|
## Timeline (Versions):
|
||||||
|
|
||||||
|
- 2025.01.11 Added HELTEC V3.2 board support.
|
||||||
|
- 2025.01.07 TROY_LoRa_APRS board added. GMT in quarter hour fix and Beacon fix for TNC.
|
||||||
- 2025.01.02 Callsign Black List added.
|
- 2025.01.02 Callsign Black List added.
|
||||||
- 2024.12.30 Fixed missing validation for correct Digipeater mode when not connected to APRS-IS.
|
- 2024.12.30 Fixed missing validation for correct Digipeater mode when not connected to APRS-IS.
|
||||||
- 2024.12.06 APRS-IS connnection and passcode validation added.
|
- 2024.12.06 APRS-IS connnection and passcode validation added.
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
"password": ""
|
"password": ""
|
||||||
},
|
},
|
||||||
"ntp": {
|
"ntp": {
|
||||||
"gmtCorrection": 0
|
"gmtCorrection": 0.0
|
||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"rememberStationTime": 30,
|
"rememberStationTime": 30,
|
||||||
|
|||||||
@@ -1744,9 +1744,9 @@
|
|||||||
id="ntp.gmtCorrection"
|
id="ntp.gmtCorrection"
|
||||||
placeholder="0"
|
placeholder="0"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
step="1"
|
step="0.25"
|
||||||
min="-23"
|
min="-23.75"
|
||||||
max="23"
|
max="23.75"
|
||||||
/>
|
/>
|
||||||
<span class="input-group-text"
|
<span class="input-group-text"
|
||||||
>hours</span
|
>hours</span
|
||||||
|
|||||||
@@ -119,11 +119,10 @@ public:
|
|||||||
|
|
||||||
class NTP {
|
class NTP {
|
||||||
public:
|
public:
|
||||||
int gmtCorrection;
|
float gmtCorrection;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Configuration {
|
class Configuration {
|
||||||
public:
|
public:
|
||||||
String callsign;
|
String callsign;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ ___________________________________________________________________*/
|
|||||||
#include "A7670_utils.h"
|
#include "A7670_utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String versionDate = "2025.01.02";
|
String versionDate = "2025.01.11";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
#ifdef HAS_GPS
|
#ifdef HAS_GPS
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace BATTERY_Utils {
|
|||||||
int sample;
|
int sample;
|
||||||
int sampleSum = 0;
|
int sampleSum = 0;
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2)
|
||||||
digitalWrite(ADC_CTRL, HIGH);
|
digitalWrite(ADC_CTRL, HIGH);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP)
|
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP)
|
||||||
@@ -132,7 +132,7 @@ namespace BATTERY_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2)
|
||||||
digitalWrite(ADC_CTRL, LOW);
|
digitalWrite(ADC_CTRL, LOW);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP)
|
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP)
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ bool Configuration::readFile() {
|
|||||||
webadmin.username = data["webadmin"]["username"] | "admin";
|
webadmin.username = data["webadmin"]["username"] | "admin";
|
||||||
webadmin.password = data["webadmin"]["password"] | "";
|
webadmin.password = data["webadmin"]["password"] | "";
|
||||||
|
|
||||||
ntp.gmtCorrection = data["ntp"]["gmtCorrection"] | 0;
|
ntp.gmtCorrection = data["ntp"]["gmtCorrection"] | 0.0;
|
||||||
|
|
||||||
lowPowerMode = data["other"]["lowPowerMode"] | false;
|
lowPowerMode = data["other"]["lowPowerMode"] | false;
|
||||||
lowVoltageCutOff = data["other"]["lowVoltageCutOff"] | 0;
|
lowVoltageCutOff = data["other"]["lowVoltageCutOff"] | 0;
|
||||||
@@ -337,7 +337,7 @@ void Configuration::init() {
|
|||||||
webadmin.username = "admin";
|
webadmin.username = "admin";
|
||||||
webadmin.password = "";
|
webadmin.password = "";
|
||||||
|
|
||||||
ntp.gmtCorrection = 0;
|
ntp.gmtCorrection = 0.0;
|
||||||
|
|
||||||
Serial.println("All is Written!");
|
Serial.println("All is Written!");
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -181,10 +181,10 @@ namespace POWER_Utils {
|
|||||||
|
|
||||||
#ifdef VEXT_CTRL
|
#ifdef VEXT_CTRL
|
||||||
pinMode(VEXT_CTRL,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
|
pinMode(VEXT_CTRL,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
|
||||||
#ifndef HELTEC_WSL_V3
|
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
||||||
digitalWrite(VEXT_CTRL, HIGH);
|
digitalWrite(VEXT_CTRL, HIGH);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HELTEC_WP
|
#if defined(HELTEC_WP) || defined(HELTEC_WS) || defined(HELTEC_V3_2)
|
||||||
digitalWrite(VEXT_CTRL, LOW);
|
digitalWrite(VEXT_CTRL, LOW);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -201,13 +201,13 @@ namespace POWER_Utils {
|
|||||||
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_WP) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WS) || defined(LIGHTGATEWAY_1_0) || defined(TTGO_LORA32_T3S3_V1_2) || defined(HELTEC_V2)
|
||||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_WS) || defined(LIGHTGATEWAY_1_0) || defined(TTGO_LORA32_T3S3_V1_2) || defined(HELTEC_V2)
|
|
||||||
Wire.begin(OLED_SDA, OLED_SCL);
|
Wire.begin(OLED_SDA, OLED_SCL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WP) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||||
|
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||||
|
#endif
|
||||||
|
|
||||||
delay(1000);
|
delay(1000);
|
||||||
BATTERY_Utils::setup();
|
BATTERY_Utils::setup();
|
||||||
|
|||||||
+3
-5
@@ -186,7 +186,7 @@ namespace Utils {
|
|||||||
|
|
||||||
void checkBeaconInterval() {
|
void checkBeaconInterval() {
|
||||||
uint32_t lastTx = millis() - lastBeaconTx;
|
uint32_t lastTx = millis() - lastBeaconTx;
|
||||||
if (((Config.aprs_is.active && passcodeValid) || Config.digi.mode != 0) && (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000)) {
|
if (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000) {
|
||||||
beaconUpdate = true;
|
beaconUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,9 +198,7 @@ namespace Utils {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (beaconUpdate) {
|
if (beaconUpdate) {
|
||||||
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
|
if (!Config.display.alwaysOn && Config.display.timeout != 0) displayToggle(true);
|
||||||
displayToggle(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sendStartTelemetry && Config.battery.sendVoltageAsTelemetry && !Config.wxsensor.active && (Config.battery.sendInternalVoltage || Config.battery.sendExternalVoltage)) {
|
if (sendStartTelemetry && Config.battery.sendVoltageAsTelemetry && !Config.wxsensor.active && (Config.battery.sendInternalVoltage || Config.battery.sendExternalVoltage)) {
|
||||||
sendInitialTelemetryPackets();
|
sendInitialTelemetryPackets();
|
||||||
@@ -289,7 +287,7 @@ namespace Utils {
|
|||||||
secondaryBeaconPacket += encodedTelemetry;
|
secondaryBeaconPacket += encodedTelemetry;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS && !backUpDigiMode) {
|
if (Config.beacon.sendViaAPRSIS && Config.aprs_is.active && passcodeValid && !backUpDigiMode) {
|
||||||
Utils::println("-- Sending Beacon to APRSIS --");
|
Utils::println("-- Sending Beacon to APRSIS --");
|
||||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
|
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
|
||||||
seventhLine = " listening...";
|
seventhLine = " listening...";
|
||||||
|
|||||||
+1
-1
@@ -214,7 +214,7 @@ namespace WEB_Utils {
|
|||||||
Config.webadmin.password = request->getParam("webadmin.password", true)->value();
|
Config.webadmin.password = request->getParam("webadmin.password", true)->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toInt();
|
Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toFloat();
|
||||||
|
|
||||||
Config.writeFile();
|
Config.writeFile();
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -16,7 +16,7 @@ float newHum, newTemp, newPress, newGas;
|
|||||||
|
|
||||||
|
|
||||||
Adafruit_BME280 bme280;
|
Adafruit_BME280 bme280;
|
||||||
#ifdef HELTEC_V3
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2)
|
||||||
Adafruit_BMP280 bmp280(&Wire1);
|
Adafruit_BMP280 bmp280(&Wire1);
|
||||||
Adafruit_Si7021 sensor = Adafruit_Si7021();
|
Adafruit_Si7021 sensor = Adafruit_Si7021();
|
||||||
#else
|
#else
|
||||||
@@ -32,7 +32,7 @@ namespace WX_Utils {
|
|||||||
void getWxModuleAddres() {
|
void getWxModuleAddres() {
|
||||||
uint8_t err, addr;
|
uint8_t err, addr;
|
||||||
for(addr = 1; addr < 0x7F; addr++) {
|
for(addr = 1; addr < 0x7F; addr++) {
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||||
Wire1.beginTransmission(addr);
|
Wire1.beginTransmission(addr);
|
||||||
err = Wire1.endTransmission();
|
err = Wire1.endTransmission();
|
||||||
#else
|
#else
|
||||||
@@ -58,7 +58,7 @@ namespace WX_Utils {
|
|||||||
if (wxModuleAddress != 0x00) {
|
if (wxModuleAddress != 0x00) {
|
||||||
bool wxModuleFound = false;
|
bool wxModuleFound = false;
|
||||||
if (wxModuleAddress == 0x76 || wxModuleAddress == 0x77) {
|
if (wxModuleAddress == 0x76 || wxModuleAddress == 0x77) {
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||||
if (bme280.begin(wxModuleAddress, &Wire1)) {
|
if (bme280.begin(wxModuleAddress, &Wire1)) {
|
||||||
Serial.println("BME280 sensor found");
|
Serial.println("BME280 sensor found");
|
||||||
wxModuleType = 1;
|
wxModuleType = 1;
|
||||||
@@ -115,7 +115,7 @@ namespace WX_Utils {
|
|||||||
Serial.println("BMP280 Module init done!");
|
Serial.println("BMP280 Module init done!");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
#ifndef HELTEC_V3
|
#if !defined(HELTEC_V3) && !defined(HELTEC_V3_2)
|
||||||
bme680.setTemperatureOversampling(BME680_OS_1X);
|
bme680.setTemperatureOversampling(BME680_OS_1X);
|
||||||
bme680.setHumidityOversampling(BME680_OS_1X);
|
bme680.setHumidityOversampling(BME680_OS_1X);
|
||||||
bme680.setPressureOversampling(BME680_OS_1X);
|
bme680.setPressureOversampling(BME680_OS_1X);
|
||||||
@@ -195,7 +195,7 @@ namespace WX_Utils {
|
|||||||
newHum = 0;
|
newHum = 0;
|
||||||
break;
|
break;
|
||||||
case 3: // BME680
|
case 3: // BME680
|
||||||
#ifndef HELTEC_V3
|
#if !defined(HELTEC_V3) && !defined(HELTEC_V3_2)
|
||||||
bme680.performReading();
|
bme680.performReading();
|
||||||
delay(50);
|
delay(50);
|
||||||
if (bme680.endReading()) {
|
if (bme680.endReading()) {
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1278
|
||||||
|
#define RADIO_SCLK_PIN 5
|
||||||
|
#define RADIO_MISO_PIN 19
|
||||||
|
#define RADIO_MOSI_PIN 27
|
||||||
|
#define RADIO_CS_PIN 18
|
||||||
|
#define RADIO_RST_PIN 23
|
||||||
|
#define RADIO_BUSY_PIN 26
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
|
||||||
|
#undef OLED_SDA
|
||||||
|
#undef OLED_SCL
|
||||||
|
#undef OLED_RST
|
||||||
|
|
||||||
|
#define OLED_SDA 21
|
||||||
|
#define OLED_SCL 22
|
||||||
|
#define OLED_RST -1
|
||||||
|
|
||||||
|
// GPS
|
||||||
|
#define HAS_GPS
|
||||||
|
#define GPS_RX 12
|
||||||
|
#define GPS_TX 34
|
||||||
|
|
||||||
|
// OTHER
|
||||||
|
#define INTERNAL_LED_PIN 2
|
||||||
|
#define BATTERY_PIN 35
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[env:TROY_LoRa_APRS]
|
||||||
|
board = esp32dev
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D TROY_LoRa_APRS
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
${common.display_libs}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1262
|
||||||
|
#define RADIO_SCLK_PIN 9
|
||||||
|
#define RADIO_MISO_PIN 11
|
||||||
|
#define RADIO_MOSI_PIN 10
|
||||||
|
#define RADIO_CS_PIN 8
|
||||||
|
#define RADIO_RST_PIN 12
|
||||||
|
#define RADIO_DIO1_PIN 14
|
||||||
|
#define RADIO_BUSY_PIN 13
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
|
||||||
|
#undef OLED_SDA
|
||||||
|
#undef OLED_SCL
|
||||||
|
#undef OLED_RST
|
||||||
|
|
||||||
|
#define OLED_SDA 17
|
||||||
|
#define OLED_SCL 18
|
||||||
|
#define OLED_RST 21
|
||||||
|
#define OLED_DISPLAY_HAS_RST_PIN
|
||||||
|
|
||||||
|
// Aditional Config
|
||||||
|
#define INTERNAL_LED_PIN 35
|
||||||
|
#define BATTERY_PIN 1
|
||||||
|
#define VEXT_CTRL 36
|
||||||
|
#define ADC_CTRL 37
|
||||||
|
#define BOARD_I2C_SDA 41
|
||||||
|
#define BOARD_I2C_SCL 42
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[env:heltec_wifi_lora_32_V3_2]
|
||||||
|
board = heltec_wifi_lora_32_V3
|
||||||
|
board_build.mcu = esp32s3
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D HELTEC_V3_2
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
${common.display_libs}
|
||||||
@@ -18,9 +18,9 @@
|
|||||||
#undef OLED_SCL
|
#undef OLED_SCL
|
||||||
#undef OLED_RST
|
#undef OLED_RST
|
||||||
|
|
||||||
#define OLED_SDA 4
|
#define OLED_SDA 17
|
||||||
#define OLED_SCL 15
|
#define OLED_SCL 18
|
||||||
#define OLED_RST 16
|
#define OLED_RST 21
|
||||||
#define OLED_DISPLAY_HAS_RST_PIN
|
#define OLED_DISPLAY_HAS_RST_PIN
|
||||||
|
|
||||||
// Aditional Config
|
// Aditional Config
|
||||||
|
|||||||
Reference in New Issue
Block a user