diff --git a/README.md b/README.md index 0ec6c94..7beb802 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,16 @@ Instrucctions (add your information into the '/data/igate_conf.json'): 5.- Change "passcode" from "XYZVW" to yours (remember that is 5 digits integer) +__________________________________________ +Versions: +2023.02.10 - First Beta (receiving LoRa Beacon/Packets and uploading to APRS-IS). +2023.02.17 - Receiving Feed from APRS-IS. +2023.03.01 - Tx Packet from APRS-IS to nearby LoRa Stations. +2023.05.12 - Tx Packet from APRS-IS format Correction. +2023.05.19 - Saving Last-Heard Stations for validating Tx Responses +__________________________________________ + + Enjoy!!! # Hope You Enjoy this, 73 !! CD2RXU , Valparaiso, Chile diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index d8a571f..6f1bea6 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "pins_config.h" #include "igate_config.h" @@ -27,7 +28,9 @@ static int myWiFiAPIndex = 0; int myWiFiAPSize = Config.wifiAPs.size(); WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex]; -//static bool LoRaTransmiting = false; +std::vector lastHeardStation; +std::vector lastHeardStation2; +static uint32_t startUpTime = millis(); String firstLine, secondLine, thirdLine, fourthLine; @@ -109,11 +112,29 @@ String createAPRSPacket(String unprocessedPacket) { return processedPacket; } +void updateLastHeardStationList(String station) { + Serial.println(station); + bool stationHeard = false; + for (int i=0; i Valid LoRa Packet!"); + aprsPacket = createAPRSPacket(packet); if (!Config.display.always_on) { display_toggle(true); @@ -121,12 +142,14 @@ void validate_and_upload(String packet) { lastRxTxTime = millis(); espClient.write(aprsPacket.c_str()); Serial.println(" ---> Message uploaded!\n"); + Station = aprsPacket.substring(0,aprsPacket.indexOf(">")); + updateLastHeardStationList(Station); if (aprsPacket.indexOf("::") >= 10) { - show_display("LoRa iGate: " + Config.callsign, secondLine, "Callsign = " + String(aprsPacket.substring(0,aprsPacket.indexOf(">"))), "Type --> MESSAGE", 1000); + show_display("LoRa iGate: " + Config.callsign, secondLine, "Callsign = " + Station, "Type --> MESSAGE", 1000); } else if (aprsPacket.indexOf(":>") >= 10) { - show_display("LoRa iGate: " + Config.callsign, secondLine, "Callsign = " + String(aprsPacket.substring(0,aprsPacket.indexOf(">"))), "Type --> NEW STATUS", 1000); + show_display("LoRa iGate: " + Config.callsign, secondLine, "Callsign = " + Station, "Type --> NEW STATUS", 1000); } else { - show_display("LoRa iGate: " + Config.callsign, secondLine, "Callsign = " + String(aprsPacket.substring(0,aprsPacket.indexOf(">"))), "Type --> GPS BEACON", 1000); + show_display("LoRa iGate: " + Config.callsign, secondLine, "Callsign = " + Station, "Type --> GPS BEACON", 1000); } } else { @@ -304,7 +327,6 @@ void loop() { beacon_update = false; } - //if (!LoRaTransmiting) { String loraPacket = ""; int packetSize = LoRa.parsePacket(); if (packetSize) { @@ -322,12 +344,10 @@ void loop() { aprsisPacket.concat(aprsisData); if (!aprsisPacket.startsWith("#")){ if (aprsisPacket.indexOf("::")>0) { - //LoRaTransmiting = true; newLoraMessage = process_aprsisPacket(aprsisPacket); sendNewLoraPacket("APRS", newLoraMessage); display_toggle(true); lastRxTxTime = millis(); - //LoRaTransmiting = false; Sender = newLoraMessage.substring(1,newLoraMessage.indexOf(">")); AddresseAndMessage = newLoraMessage.substring(newLoraMessage.indexOf("::")+2); Addressee = AddresseAndMessage.substring(0, AddresseAndMessage.indexOf(":"));