mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-01-28 19:34:35 +01:00
test Beta
This commit is contained in:
parent
3858d39e8a
commit
72204cb6fd
|
|
@ -42,7 +42,7 @@
|
|||
},
|
||||
"syslog": {
|
||||
"active": true,
|
||||
"server": "0.0.0.0",
|
||||
"server": "192.168.20.10",
|
||||
"port": 514
|
||||
},
|
||||
"other": {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@
|
|||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
|
||||
[env:ttgo-lora32-v21]
|
||||
platform = espressif32 @ 6.2.0
|
||||
platform = espressif32 @ 6.3.1
|
||||
board = ttgo-lora32-v21
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
lib_deps =
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@^6.20.2
|
||||
sandeepmistry/LoRa@^0.8.0
|
||||
adafruit/Adafruit GFX Library @ 1.11.5
|
||||
|
|
@ -23,3 +22,4 @@ lib_deps =
|
|||
ottowinter/ESPAsyncWebServer-esphome@^3.0.0
|
||||
esphome/AsyncTCP-esphome@^2.0.0
|
||||
mikalhart/TinyGPSPlus @ 1.0.3
|
||||
peterus/esp-logger @ 1.0.0
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
#include "configuration.h"
|
||||
#include "aprs_is_utils.h"
|
||||
#include "station_utils.h"
|
||||
#include "syslog_utils.h"
|
||||
#include "pins_config.h"
|
||||
#include "query_utils.h"
|
||||
#include "lora_utils.h"
|
||||
|
|
@ -12,12 +13,16 @@
|
|||
#include "digi_utils.h"
|
||||
#include "gps_utils.h"
|
||||
#include "display.h"
|
||||
#include "logger.h"
|
||||
#include "utils.h"
|
||||
|
||||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
|
||||
String versionDate = "2023.06.11";
|
||||
logging::Logger logger;
|
||||
|
||||
|
||||
String versionDate = "2023.06.12";
|
||||
int myWiFiAPIndex = 0;
|
||||
int myWiFiAPSize = Config.wifiAPs.size();
|
||||
WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex];
|
||||
|
|
@ -40,12 +45,13 @@ void setup() {
|
|||
Serial.begin(115200);
|
||||
pinMode(greenLed, OUTPUT);
|
||||
delay(1000);
|
||||
utils::setupDiplay();
|
||||
Utils::setupDiplay();
|
||||
WIFI_Utils::setup();
|
||||
LoRa_Utils::setup();
|
||||
utils::validateDigiFreqs();
|
||||
Utils::validateDigiFreqs();
|
||||
iGateBeaconPacket = GPS_Utils::generateBeacon();
|
||||
utils::startOTAServer();
|
||||
Utils::startOTAServer();
|
||||
SYSLOG_Utils::setup();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
|
@ -57,8 +63,8 @@ void loop() {
|
|||
secondLine = APRS_IS_Utils::checkStatus();
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, 0);
|
||||
while (espClient.connected()) {
|
||||
utils::checkDisplayInterval();
|
||||
utils::checkBeaconInterval();
|
||||
Utils::checkDisplayInterval();
|
||||
Utils::checkBeaconInterval();
|
||||
APRS_IS_Utils::processLoRaPacket(LoRa_Utils::receivePacket());
|
||||
if (espClient.available()) {
|
||||
String aprsisPacket;
|
||||
|
|
@ -67,8 +73,8 @@ void loop() {
|
|||
}
|
||||
}
|
||||
} else if (stationMode==3 || stationMode==4) { // DigiRepeater (3 RxFreq=TxFreq / 4 RxFreq!=TxFreq)
|
||||
utils::checkDisplayInterval();
|
||||
utils::checkBeaconInterval();
|
||||
Utils::checkDisplayInterval();
|
||||
Utils::checkBeaconInterval();
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, 0);
|
||||
DIGI_Utils::processPacket(LoRa_Utils::receivePacket());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ void processLoRaPacket(String packet) {
|
|||
espClient.write(aprsPacket.c_str());
|
||||
Serial.println(" ---> Uploaded to APRS-IS");
|
||||
STATION_Utils::updateLastHeard(Sender);
|
||||
utils::typeOfPacket(aprsPacket);
|
||||
Utils::typeOfPacket(aprsPacket);
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@ void processAPRSISPacket(String packet) {
|
|||
LoRa_Utils::sendNewPacket("APRS", LoRa_Utils::generatePacket(packet));
|
||||
display_toggle(true);
|
||||
lastScreenOn = millis();
|
||||
utils::typeOfPacket(packet);
|
||||
Utils::typeOfPacket(packet);
|
||||
show_display(firstLine, secondLine, Sender + " -> " + Addressee, fourthLine, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ void processPacket(String packet) {
|
|||
if ((packet.substring(0, 3) == "\x3c\xff\x01") && (packet.indexOf("NOGATE") == -1)) {
|
||||
Serial.println(" ---> APRS LoRa Packet");
|
||||
if ((stationMode==3) && (packet.indexOf("WIDE1-1") > 10)) {
|
||||
utils::typeOfPacket(packet);
|
||||
Utils::typeOfPacket(packet);
|
||||
loraPacket = packet.substring(3);
|
||||
loraPacket.replace("WIDE1-1", Config.callsign + "*");
|
||||
delay(500);
|
||||
|
|
@ -25,7 +25,7 @@ void processPacket(String packet) {
|
|||
display_toggle(true);
|
||||
lastScreenOn = millis();
|
||||
} else if (stationMode ==4){
|
||||
utils::typeOfPacket(packet);
|
||||
Utils::typeOfPacket(packet);
|
||||
if (packet.indexOf("WIDE1-1") == -1) {
|
||||
loraPacket = packet.substring(3,packet.indexOf(":")) + "," + Config.callsign + "*" + packet.indexOf(":");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
#include "configuration.h"
|
||||
#include "syslog_utils.h"
|
||||
#include "gps_utils.h"
|
||||
#include "logger.h"
|
||||
|
||||
extern Configuration Config;
|
||||
extern logging::Logger logger;
|
||||
|
||||
namespace SYSLOG_Utils {
|
||||
|
||||
|
|
@ -13,8 +18,14 @@ void processPacket(String packet, int rssi, float snr, int freqError) {
|
|||
syslogPacket += " _ / ";
|
||||
}
|
||||
syslogPacket += String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz / ";
|
||||
// Callsign / Time / Destination / Path / RSSI / SNR / FreqError /gpsLat / gpsLon / Distance
|
||||
Serial.println(syslogPacket + GPS_Utils::getDistance(packet));
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", (syslogPacket + GPS_Utils::getDistance(packet)).c_str());
|
||||
}
|
||||
|
||||
void setup() {
|
||||
if (Config.syslog.active) {
|
||||
logger.setSyslogServer(Config.syslog.server, Config.syslog.port, "ESP32 LoRa APRS iGate");
|
||||
Serial.println("Syslog Server (" + Config.syslog.server + ") connected!\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
namespace SYSLOG_Utils {
|
||||
|
||||
void processPacket(String packet, int rssi, float snr, int freqError) ;
|
||||
void setup();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ extern bool beacon_update;
|
|||
extern int stationMode;
|
||||
extern String iGateBeaconPacket;
|
||||
|
||||
namespace utils {
|
||||
namespace Utils {
|
||||
|
||||
void processStatus() {
|
||||
String status = Config.callsign + ">APLRG1";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <Arduino.h>
|
||||
|
||||
namespace utils {
|
||||
namespace Utils {
|
||||
|
||||
void processStatus();
|
||||
void setupDiplay();
|
||||
|
|
|
|||
Loading…
Reference in a new issue