syslog update

This commit is contained in:
richonguzman 2023-12-07 01:49:49 -03:00
parent caf4fdfd37
commit ddf0894ded
4 changed files with 24 additions and 3 deletions

View file

@ -51,7 +51,8 @@ ____________________________________________________
____________________________________________________
## Timeline (Versions):
- 2023.12.06 Heltec V2 support added (son Heltec V3)
- 2023.12.07 MIC-E process and syslog added
- 2023.12.06 Heltec V2 support added
- 2023.11.26 Small correction to enable Syslog in stationMode5.
- 2023.10.09 Added "WIDE1-1" to Tx packets from iGate to be *repeated* by Digirepeaters.
- 2023.10.09 Added Support also for BMP280 module.

View file

@ -20,7 +20,7 @@
Configuration Config;
WiFiClient espClient;
String versionDate = "2023.12.06";
String versionDate = "2023.12.07";
int myWiFiAPIndex = 0;
int myWiFiAPSize = Config.wifiAPs.size();
WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex];

View file

@ -21,6 +21,7 @@ void log(String type, String packet, int rssi, float snr, int freqError) {
} else if (type == "LoRa 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";
} else if (packet.indexOf(":!") > 10 || packet.indexOf(":=") > 10) {
syslogPacket += type + " - GPS - " + packet.substring(3,packet.indexOf(">")) + " / ";
if (packet.indexOf("WIDE1-1") > 10) {
@ -29,8 +30,21 @@ void log(String type, String packet, int rssi, float snr, int freqError) {
syslogPacket += packet.substring(packet.indexOf(">")+1,packet.indexOf(":")) + " / _ / ";
}
syslogPacket += String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz / " + GPS_Utils::getDistance(packet);
} else if (packet.indexOf(":>") > 10) {
syslogPacket += type + " - STATUS - " + packet.substring(3,packet.indexOf(">")) + " ---> " + packet.substring(packet.indexOf(":>")+2);
syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz";
} else if (packet.indexOf(":'") > 10) {
syslogPacket += type + " - MIC-E - " + packet.substring(3,packet.indexOf(">")) + " ---> " + packet.substring(packet.indexOf("::")+2);
syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz";
} else if (packet.indexOf(":T#") >= 10 && packet.indexOf(":=/") == -1) {
syslogPacket += type + " - TELEMETRY - " + packet.substring(3,packet.indexOf(">")) + " ---> " + packet.substring(packet.indexOf("::")+2);
syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz";
} else if (packet.indexOf(":;") > 10) {
syslogPacket += type + " - OBJECT - " + packet.substring(3,packet.indexOf(">")) + " ---> " + packet.substring(packet.indexOf("::")+2);
syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz";
} else {
syslogPacket += type + " - " + packet;
syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz";
}
} else if (type == "LoRa Tx") {
if (packet.indexOf("RFONLY") > 10) {

View file

@ -82,7 +82,7 @@ namespace Utils {
setup_display();
digitalWrite(greenLed,HIGH);
Serial.println("\nStarting iGate: " + Config.callsign + " Version: " + versionDate);
show_display(" LoRa APRS", " ( iGate )", "", " Richonguzman", " -- CA2RXU --", "", " " + versionDate, 4000);
show_display(" LoRa APRS", "", " ( iGATE )", "", "", "Richonguzman / CA2RXU", " " + versionDate, 4000);
digitalWrite(greenLed,LOW);
firstLine = Config.callsign;
seventhLine = " listening...";
@ -301,6 +301,12 @@ namespace Utils {
} else if (packet.indexOf(":T#") >= 10 && packet.indexOf(":=/") == -1) {
sixthLine = sender + "> TELEMETRY";
seventhLine = "RSSI:" + String(rssi) + "dBm SNR: " + String(snr) + "dBm";
} else if (packet.indexOf(":'") >= 10) {
sixthLine = sender + "> MIC-E";
seventhLine = "RSSI:" + String(rssi) + "dBm SNR: " + String(snr) + "dBm";
} else if (packet.indexOf(":;") >= 10) {
sixthLine = sender + "> OBJECT";
seventhLine = "RSSI:" + String(rssi) + "dBm SNR: " + String(snr) + "dBm";
} else {
sixthLine = sender + "> ??????????";
seventhLine = "RSSI:" + String(rssi) + "dBm SNR: " + String(snr) + "dBm";