DeviceTimeAns with time 0

Viewed 47

I'm running version 4.15.0 and some sensors that uses there own time sometimes gets the wrong time.

DeviceTimeReq from the device is answered with:

"DeviceTimeAns": {
    "time_since_gps_epoch": {
        "nanos": 0,
        "secs": 0
    }
}

I have done some searching and suspect it has to do woth the time being off on the gateways, is that correct?

Is the zero being sent just because there is nothing else to send, or is zero indicating an error and should be ignored by the sensor?

Is this a common proboem?

Thanks in advance,

/Marcus

Could you please add a screenshot of the uplink containing the DeviceTimeReq with the rxInfo elements from the gateway? This contains the time reported by the gateway and I suspect this is the root of the issue.

1 Answers

Hi!

Thanks for your reply and I think you are right, of course. :-)

There are three GWs forwarding the request and I see now that the first one have "timeSinceGpsEpoch": "0s" wich probably is the cause.

I can also see that the second have a reasonable time in timeSinceGpsEpoch and the third is totally missing timeSinceGpsEpoch.

So I guess we have to look at the GWs. Is this a common problem?

Best regards,

Marcus

    {
        "phy_payload": {
            "mhdr": {
                "f_type": "ConfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "mic": [
                161,
                150,
                210,
                150
            ],
            "payload": {
                "f_port": 6,
                "fhdr": {
                    "devaddr": "xxxxx41a",
                    "f_cnt": 1,
                    "f_ctrl": {
                        "ack": false,
                        "adr": true,
                        "adr_ack_req": false,
                        "class_b": false,
                        "f_opts_len": 2,
                        "f_pending": false
                    },
                    "f_opts": [
                        "LinkCheckReq",
                        "DeviceTimeReq"
                    ]
                },
                "frm_payload": "7267913454372c3c162310ffaa100101000000b417a9840b794d85b81d5b3a64d978"
            }
        },
        "rx_info": [
            {
                "channel": 17,
                "context": "7ntp3A==",
                "crcStatus": "CRC_OK",
                "gatewayId": "xxxxxxxxxxx10002",
                "gwTime": "2025-12-10T11:24:38.420358+00:00",
                "location": {
                    "altitude": 51,
                    "latitude": xx.75219,
                    "longitude": xx.96211
                },
                "nsTime": "2025-12-10T11:24:38.343818297+00:00",
                "rssi": -100,
                "snr": -24,
                "timeSinceGpsEpoch": "0s",
                "uplinkId": 45918
            },
            {
                "context": "AAAAAAAAAAAASAASPnmBNA==",
                "crcStatus": "CRC_OK",
                "gatewayId": "xxxxxxxxxxx10012",
                "gwTime": "2025-12-10T11:24:37.420374+00:00",
                "location": {
                    "latitude": xx.76145194203488,
                    "longitude": xx.97551822662354
                },
                "nsTime": "2025-12-10T11:24:38.423157467+00:00",
                "rssi": -86,
                "snr": -20,
                "timeSinceGpsEpoch": "1449401095.420374s",
                "uplinkId": 4016623103
            },
            {
                "channel": 17,
                "context": "i85iBA==",
                "crcStatus": "CRC_OK",
                "gatewayId": "xxxxxxxxxxx10004",
                "location": {
                    "altitude": 64,
                    "latitude": xx.7629,
                    "longitude": xx.9216
                },
                "nsTime": "2025-12-10T11:24:38.328511970+00:00",
                "rssi": -99,
                "snr": -20,
                "uplinkId": 11679
            }
        ],
        "tx_info": {
            "frequency": 867700000,
            "modulation": {
                "lora": {
                    "bandwidth": 125000,
                    "codeRate": "CR_4_5",
                    "spreadingFactor": 12
                }
            }
        }