[LoRaWAN] Added MIC mismatch debug message

This commit is contained in:
jgromes 2023-08-20 19:16:07 +02:00
parent 3e8636b1f2
commit b2b176f1c3

View file

@ -778,6 +778,7 @@ bool LoRaWANNode::verifyMIC(uint8_t* msg, size_t len, uint8_t* key) {
// calculate the expected value and compare
uint32_t micCalculated = generateMIC(msg, len - sizeof(uint32_t), key);
if(micCalculated != micReceived) {
RADIOLIB_DEBUG_PRINTLN("MIC mismatch, expected %08x, got %08x", micCalculated, micReceived);
return(false);
}