Closed aviateur17 closed 2 years ago
oop, missed this while I was yapping over in the other topic 😶
Looks good for now. We do need to make them unique, though.
One quick confession: I thought there was a way to tell the compiler to insert a random number into the sketch, like __RANDOM__
or something. I just looked and this does not exist.
__DATE__
and __TIME__
do exist, however and I think we can process those into a unique address.
After some thought and research, I think the best route to take is to borrow the last two digits of the MAC address if it is an ESP. If it is not, I found the ArduinoUniqueID library, which should get us unique addresses for other chipsets.
As a note, ArduinoUniqueID was designed for a library named LoRaNow, which is much like what we're doing. I was made aware of LoRaNow a while back, but it lacks a "sender address" in the packet structure, making it unsuitable for FDRS. Definitely worth looking at, though.
Change READING_ID back to integer and decouple it from the LoRa address.