From 52a77a2746433a957d228646898b013ce99d661d Mon Sep 17 00:00:00 2001 From: richonguzman Date: Mon, 22 Jan 2024 08:11:27 -0300 Subject: [PATCH] syslog update --- src/lora_utils.cpp | 4 ++-- src/syslog_utils.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index 1395bdc..8fcd6d9 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -120,7 +120,7 @@ namespace LoRa_Utils { #if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(HELTEC_V3) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) digitalWrite(internalLedPin,LOW); #endif - SYSLOG_Utils::log("LoRa Tx", newPacket,0,0,0); + SYSLOG_Utils::log("Tx", newPacket,0,0,0); Serial.print("---> LoRa Packet Tx : "); Serial.println(newPacket); } @@ -173,7 +173,7 @@ namespace LoRa_Utils { } #endif if (Config.syslog.active && (stationMode==1 || stationMode==2 || (stationMode==5 && WiFi.status()==WL_CONNECTED)) && loraPacket!="") { - SYSLOG_Utils::log("LoRa Rx", loraPacket, rssi, snr, freqError); + SYSLOG_Utils::log("Rx", loraPacket, rssi, snr, freqError); } return loraPacket; } diff --git a/src/syslog_utils.cpp b/src/syslog_utils.cpp index 797edad..1b8a6ab 100644 --- a/src/syslog_utils.cpp +++ b/src/syslog_utils.cpp @@ -12,13 +12,13 @@ WiFiUDP udpClient; namespace SYSLOG_Utils { void log(String type, String packet, int rssi, float snr, int freqError) { - String syslogPacket = "<165>1 - " + Config.callsign + " LoRa" + " - - - "; //RFC5424 The Syslog Protocol + String syslogPacket = "<165>1 - " + Config.callsign + " CA2RXU_LoRa_iGate 1.2" + " - - - "; //RFC5424 The Syslog Protocol if (Config.syslog.active && (stationMode==1 || stationMode==2 || (stationMode==5 && WiFi.status()==WL_CONNECTED))) { if (type == "APRSIS Tx") { if (packet.indexOf(":>") > 10) { syslogPacket += type + " / StartUp STATUS / " + packet.substring(packet.indexOf(":>")+2); } - } else if (type == "LoRa Rx") { + } else if (type == "Rx") { if (packet.indexOf("::") > 10) { syslogPacket += type + " / MESSAGE / " + packet.substring(3,packet.indexOf(">")) + " ---> " + packet.substring(packet.indexOf("::")+2); syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz"; @@ -46,7 +46,7 @@ namespace SYSLOG_Utils { syslogPacket += type + " / " + packet; syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz"; } - } else if (type == "LoRa Tx") { + } else if (type == "Tx") { if (packet.indexOf("RFONLY") > 10) { syslogPacket += type + " / RFONLY / " + packet; } else if (packet.indexOf("::") > 10) {