Data backup on Gateway in case of network outage?

Backing up and decrypting are two completely different things.

It makes no sense to decrypt on the gateway, it’s both useless and severely compromises key management. (And even if the gateway had only the network session key, it still couldn’t autonomously reply to a node to maintain and ADR, path, since it has no way of knowing if another gateway still in contact with the network server has been asked to.)

However, if one wants to do a backup on the gateway, then it’s probably necessary to feed the packets to a centralized decryptor which is parallel to that of TTN’s server, because such stale packets are not LoRaWAN-compliant.

Building such is not all that complicated. However the debug tool that got built eventually became it’s own network server :wink:

Very true. But assuming we’re still talking about doing this on the gateway: backing up and forwarding are two completely different things too. :wink:

I very much agree.

That’s the same waste of time, I feel.

Only if one has the (OTAA) session keys that were applicable at the time the packets were received, and if one either (intelligently) brute forces the MSB 16 bits of the frame counters or keeps track of the frame counters too. Like I wrote that’s not as easy as one may think, I feel.

My impression is that you can the current ones via an API from TTN, I could be wrong, when I did it while trying to figure out why lorasever was losing session keys I grabbed them from the join accepts since I was able to intercept the backhaul traffic to all gateways, something obviously not the case in TTN.

And I think(?) you get an application-level message for a join accept when the keys change, so it’s not like you have to randomly poll for changes.

In a well-functioning network nodes should almost never join anew.

It’s about what a network server normally does - there aren’t that many realistic possibilities {MSB=MSB, MSB=MSB-1, MSB=MSB+1, MSB=0} Like I said, my debug monitor eventually became its own network server since in the end that was the shortest path to the functionality we needed that let us stop fighting the “features” that only caused endless trouble.