Closed aviateur17 closed 1 year ago
I think I resolved the conflicts correctly. That's probably my mistake for merging another PR a bit ago.
Better than me. I'm just getting the hang of all this git stuff. Should have another improvement on CRC soon.
Just added commit to enhance LoRa packet validation. Instead of sending fixed CRC when sensor does not want an ACK the sensor will add a known byte to the CRC calculation in the case that it does not want the ACK and therefore including the CRC with the data. The gateway will check the CRC without that known byte and if there is mismatch then add that known byte to the CRC calculation and if that matches will assume that the sensor does not want an ACK. If that still does not match then the packet is not valid and will be discarded by the gateway. That way the CRC is still calculated for packets where the sensor does not want a return ACK reply.
Just added commit to enhance LoRa packet validation. Instead of sending fixed CRC when sensor does not want an ACK the sensor will add a known byte to the CRC calculation in the case that it does not want the ACK and therefore including the CRC with the data. The gateway will check the CRC without that known byte and if there is mismatch then add that known byte to the CRC calculation and if that matches will assume that the sensor does not want an ACK. If that still does not match then the packet is not valid and will be discarded by the gateway. That way the CRC is still calculated for packets where the sensor does not want a return ACK reply.
I see the conundrum here and that's a clever way to fix it.
There might be a code issue with #endif between the two fdrs_functions.h files, one in the root and one in the FDRS_Gateway folder. I'm gonna fix that today if there is an issue.
Code submission per discussion #54