Time lost when reboot

Issue:
The time and date are lost when the RAK7249 gateway reboot.

Setup:
1.2.1

LoRa® Server:

Details:

Since to the best of my knowledge there’s no RTC in that hardware, system time will indeed by initially missing on reboot. Typically in a system like this it’s initialized from some crib like the latest file date anywhere in the system, but obviously that’s pretty crude.

The more important question is if the system time is eventually being updated by NTP after a working connection to the Internet comes up.

Do you eventually get a time fix within a few minutes?

If not, you could follow the logs for the several minutes, see if there’s an ntpd process running (it would appear that is used in client mode, too), see if any of the listed servers respond, etc.

Ultimately, in the architectural division of LoRaWan, a gateway doesn’t actually need to know real-world time, all timing things are done relative to the gateways own free running concentrator chip timer, or to GPS time if present (but only needed for things like coordinated beaconing)

I just upgraded my rak7249 to the latest version of the firmware and re-init everything.
It solve the problem.
Weird…
I believe that Time is used to timestamp the payload before sending it through the integration link (mqtt is my case).
Thanks for your help.

Not typically, and even if it were there the server would ignore it.

A network server uses only the timing of the radio card itself, which is typically just a bare counter value. In a gateway with a functioning, locked, GPS this can get turned into a “real” time, but that’s the only case where the network server would use the time rather than counter timestamp of the gateway.

NTP-sourced “time” of the gateway’s operating system is neither reliable nor accurate enough for LoRaWan, so is simply ignored (and traditionally not included at all, though it can make reading raw packet logs easier)

Though if you were running an internal server, then that timestamp would be used in the decoded output reported to whatever consumers your data. But running servers in gateways is really more a test / starter kit type of thing, not a deployment solution, because it means that all of your node secrets are in the gateway where they’re lost if the box gets lost, and also means you can only have one gateway in your network. The actual design intent of LoRaWan is that one or more seamlessly replaceable gateways feed into a server running in server infrastructure, and only that server has the secrets. It also has an Internet connection to get NTP time, probably quite reliably in a data center.