Access Gateway or Server Time

Good morning ChirpStack Community,

I read the following article https://www.chirpstack.io/network-server/features/device-time:

When possible, ChirpStack Network Server uses the RX timestamp provided by the gateway which results in the most accurate time. When this timestamp is not available (e.g. the gateway is not time synchronized), it will use the current server time.

Yesterday, I have updated the complete ChirpStack stack and gateway firmwares to latest version (LAIRD 186 and Lorix One). Gateways are green labelled on the Map, meaning at least ChirpStack sees them as active. I am also able to see stats messages on the Gateway Bridge side.

Anyway I could not get any time information added to LoRaWAN messages.

Fields “time” and “timeSinceGPSEpoch” in section “uplinkMetaData”/“rxInfo” in network message are always set to null. I could not find any other time related field in network and application message. So I wonder how I could make it as the documentation says.

How could I enable this feature in order to get timestamps from the gateway or the server time if missing?

Best Regards,

Jean

PS: You do a great job with this monitoring stack, thank you for sharing it!

The time and timeSinceGPSEpoch are only set when the gateway has a GNSS timesource. If you want to set time with the gateway system-time, then you could use the fake_rx_time option (https://www.chirpstack.io/gateway-bridge/install/config/).

1 Like

Hi @brocaar,

Thank you for answering. I have missed this parameter in the configuration.

I have updated the following environment variable in my Docker-Compose:

BACKEND__SEMTECH_UDP__FAKE_RX_TIME=true

And it works like a charm:

    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "time": "2021-04-15T09:49:04.082740116Z",
                }
            ]
       }
    }

The ChirpStack project is very satisfying, thank you for your hard work!

Best regards,

Jean

2 Likes