Obtaining an Accurate Timestamp in LoRaWAN OTAA Mode (Class A, RAK3172 v1.0.4)

Hello,

I am using the RAK3172 module with firmware version 1.0.4 in LoRaWAN OTAA mode, operating as a Class A device, and communicating with ChirpStack. I need a reliable way to obtain an accurate timestamp, preferably via an AT command if available, or through another method such as retrieving time from the gateway or network server.

Since Class A devices can only receive downlinks after uplinks, I understand the constraints in obtaining real-time timestamps. However, given that I have successfully connected my device to ChirpStack, I would like to explore potential solutions within this setup.

Has anyone successfully retrieved an accurate timestamp in a similar configuration? Any guidance or recommended methods would be greatly appreciated.

Welcome to the forum @grego

There is no single AT command to retrieve a timestamp from the device itself.

How to do it is in our AT Command Manual

Enable TimeReq from the LoRaWAN server AT+TIMEREQ

AT+TIMEREQ=1

Send an uplink

AT+SEND=2:303132

Check the responses, the LoRaWAN server will response with its timestamp

+EVT:TIMEREQ_OK

If you got this, then you can get the time with AT+LTIME

AT+LTIME=?

The response will be

AT+LTIME=12h46m04s on 03/07/2025
OK
1 Like

Thank you a lot @beegee, it worked correctly!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.