mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-16 10:14:46 +01:00
syslog update
This commit is contained in:
parent
c6929e161a
commit
b2b388da99
|
|
@ -193,9 +193,12 @@ namespace LoRa_Utils {
|
|||
} else if (state == RADIOLIB_ERR_RX_TIMEOUT) {
|
||||
// timeout occurred while waiting for a packet
|
||||
} else if (state == RADIOLIB_ERR_CRC_MISMATCH) {
|
||||
rssi = radio.getRSSI();
|
||||
snr = radio.getSNR();
|
||||
freqError = radio.getFrequencyError();
|
||||
Utils::println(F("CRC error!"));
|
||||
if (Config.syslog.active && WiFi.status() == WL_CONNECTED) {
|
||||
SYSLOG_Utils::log("Rx", "RADIOLIB_ERR_CRC_MISMATCH", 0,0,0);
|
||||
SYSLOG_Utils::log("CRC", loraPacket, rssi, snr, freqError);
|
||||
}
|
||||
loraPacket = "";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ namespace SYSLOG_Utils {
|
|||
} else {
|
||||
syslogPacket += type + " / " + packet;
|
||||
}
|
||||
} else if (type == "CRC") {
|
||||
syslogPacket += type + " / CRC-ERROR / " + packet;
|
||||
syslogPacket += " / " + String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz";
|
||||
} else {
|
||||
syslogPacket = "<165>1 - ERROR LoRa - - - ERROR / Error in Syslog Packet"; //RFC5424 The Syslog Protocol
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue