SK
Signal K•4w ago
Tika

How to get GPS data from can0 to gpsd

Hi, I have a Halpi2 running OpenPlotter. SignalK is connected to NMEA2000 via can0. I would now like to get relevant sentences to gpsd so that it can be used by chrony so that other devices (e.g. Cerbo GX) can sync the time. What is the right way to do this? Thanks!
9 Replies
Tika
TikaOP•4w ago
Should this be maybe done in OpenPlotter / Serial / Connections instead of in SignalK?
Tika
TikaOP•4w ago
OpenPlotter / Check system reports the following, but since NMEA2000 is read fine in SignalK, should anything really be changed?
No description
Scott Bender
Scott Bender•4w ago
Configure gpsd to get the data from port 10110 on your server. Turn on sk-to-nmea3000
Teppo Kurki
Teppo Kurki•4w ago
You mean sk-to-nmea0183 😎
Scott Bender
Scott Bender•4w ago
You haven’t heard of the new NMEA 3000 protocol? 🤣
Tika
TikaOP•3w ago
I enabled sk-to-nmea0183 and it works (judging by output in log) but it doesn’t show up in Plugins activity on Dashboard page. Is this a bug?
Teppo Kurki
Teppo Kurki•2w ago
thanks - activity should be working with the latest 1.12.1 version
Tika
TikaOP•2w ago
Great, one more thing I found but can't report fully: I used gpsd to feed chrony and I had quite some issues with the timezone until I noticed that sporadically, some messages came from gpsd with wrong timezone. I removed some sentences (I don't remember which ones) and I don't have this issue anymore. My SK to NMEA0183 is now sending the following only: GGA, RMC and ZDA. I used cgps -s to check what chrony is using For anyone else trying to resolve this, timedatectl was essential. Also, keep attention if you have RTC (like on Halpi2) that it is set in UTC. Finally, all my devices on the boat can now use GPS time, except that the chain is rather long: 1. GPS 2. MFD 3. NMEA2000 network 4. CAN input on Halpi2 5. SignalK and SK to NMEA0183 6. gpsd on Halpi2 7. chrony on Halpi2 8. NTP server on router (is client of chrony) 9. NTP client (e.g. on Cerbo GX) Oh, forgot to mention that one has to add local ntp server to config of Cerbo GX. By default, Cerbo only looks at Internet NTP servers. This can only be done via shell.
Teppo Kurki
Teppo Kurki•2w ago
apparently there's an ntp server plugin for sk https://github.com/iuriaranda/signalk-ntp-server
GitHub
GitHub - iuriaranda/signalk-ntp-server: NTP server from SignalK tim...
NTP server from SignalK time sources (e.g. GPS). Contribute to iuriaranda/signalk-ntp-server development by creating an account on GitHub.

Did you find this page helpful?