Reset frame counter issue

I have a Gateway (raspberry pi + iC880A) and a Lora Node.
When I start the Gateway I usually don’t receive data in TTN console. In order to receive I have to click “reset frame counter” in device menu.

Why it happen?
There is a way to avoid do it always and manually?

This has to do with the fact your Node starts at zero whenever it gets a power cycle.

The TTN-backend checks this number with their logs, to avoid replay attacks.
If the received integer is smaller then the stored, the whole message is dropped.

Clicking ‘reset frame counter’ resets this stored integer to null.

You can avoid this by any of these measures:

  • enabling the “Relax frame counter” settings. But this is not wise, as this makes replay attacks possible.
  • Use OTAA instead of ABP. With every new session with OTAA the counter will be renegotiated (resetted)
  • Store/persist the framecounter inside your node some where so it can survive a power cycle.

Thank you!