Is it possible to use an M2 for syncronizing the clock of other computers on the network? E.g. via Network Time Protocol?
I have a Raspberrry Pi that connects to the M2’s hotspot and since the Pi does not have an RTC, it would be great to get the current time from the reach. Is it somehow implemented? If not, how would one go about it?
Reach would be a great source for syncronizing, since it gets the accurate GPS time when it has satellites in view.
Another question is: does the reach M2 have an RTC? Mine had an accurate clock after staying off for a day and booting without any satellites in view. It was either the RTC or it synced to the internet (it has an LTE dongle attached).
EDIT: I added the Emlid to the list of known hosts under “/etc/systemd/timesyncd.conf” on the Raspberry, just to see if maybe the reach is an NTP server by default. As expected, it did not work:
“systemd-timesyncd: Timed out waiting for reply from 192.168.42.1:123 (192.168.42.1).”
Would it be a useful feature to have an NTP server running on the emlid? Or are there concerns about resource usage, etc?
When run from another computer on the network (e.g. a Raspberry Pi), it copies the current time from the Reach onto the host computer. Gets the job done, but it isn’t in any way robust, so use at your own risk.
You may get the time from M2 via the position stream in NMEA format. It outputs ZDA messages that contain the date and time. Of course, you would need to use a parser to get this info, but some are already available on GitHub.
M2 can do the time sync via the Internet or when its antenna is provided with the GNSS signal.
Thanks for getting back to me and for the proposed solution.
That is of course true, but just like my command it would need to be run with sudo privileges for the change of time to take effect. I was hoping that runnig an NTP server on the Reach might be possible, but of course I see how it would eat into its limited resources.
On another hand, would it be possible to share Reach’s internet access (from the LTE dongle) to devices connected to its hotspot? Among other benefits, that would provide the necessary access to known NTP servers.
It’s hardly possible to do so. Reach M2 with the attached LTE dongle can access the Internet, but it can’t share it. But I’ll let the devs know about your idea; maybe it’s something we could consider for the future as the functionality.