meetjestad / mjs_firmware

8 stars 4 forks source link

Improvement: Support ADR (Adaptive Datarate) #1

Open matthijskooijman opened 6 years ago

matthijskooijman commented 6 years ago

LoRaWAN (and TTN) supports adaptive datarate, where the server looks at RSSI/SNR information on received packets, and if there is sufficient margin, it sends a downlink message to let the node switch to a higer datarate (more bandwidth, less range). The node OTOH periodically requests an ack for a message, and if it receives none, switches to a lower datarate. Together, this should balance to find the highest datarate that works (which means the shortest airtime).

Currently, ADR is disabled, because this sketch was written when TTN did not support ADR yet, and because we cannot go slower than SF9 because of the TTN airtime fair usage policy. To enable DDR:

It is likely good to cover this when also converting to the new packet format we are thinking about.