Skip to content

Time information not sent when faking GPS module #25

@frazar

Description

@frazar

When the gateway is not equipped with a GPS module and is configured with fake_gps: true, the time information is not added to the "DeviceTimeAns" MAC command specified in LoRaWAN 1.0.3.

Browsing the code I found a couple of TODOs that mention the possibility of using an alternative time source from the GPS module:

A solution could use the clock_gettime() function with CLOCK_REALTIME to get the seconds since the Unix epoch, and then convert to seconds since the GPS epoch (taking into consideration leap seconds..).

I see two way of enabling the behaviour of using the local time:

  • by adding a new option, e.g. "fake_gps_time", or
  • by enabling reading the local time whenever gps_ref_valid is false.

I'm willing to propose a PR, but I'm not an expert in C or the codebase, so I might need a little guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions