[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] GPSd on FreeBSD
From: |
O'Connor, Daniel |
Subject: |
[gpsd-dev] GPSd on FreeBSD |
Date: |
Mon, 9 Sep 2019 17:08:30 +0930 |
Hi,
I have a Beaglebone Black running FreeBSD with a u-Blox NEO-M8T which I want to
use as a time source.
It is connected to an internal UART and a timer channel is used for PPS capture.
These end up as cuau2 (symlinked to /dev/gps0) and /dev/dmtpps (symlinked to
/dev/pps0) respectively so my ntp.conf looks like:
server 127.127.20.0 mode 0x12 minpoll 4 maxpoll 4
fudge 127.127.20.0 time1 0 time2 0 flag1 1 stratum 0 refid GPS
<snip>
And it all looks good:
remote refid st t when poll reach delay offset jitter
==============================================================================
o127.127.20.0 .GPS. 0 l 6 16 377 0.000 -0.018 0.002
-10.0.2.1 214.52.129.40 3 u 33 64 377 0.229 -1.949 0.044
0.au.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.002
1.au.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.002
2.au.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.002
+220.233.156.30 .PPS. 1 u 9 64 377 28.999 0.900 0.166
+220.158.215.20 202.46.178.18 2 u 36 64 377 78.438 -0.451 0.086
-13.239.25.115 .GPS. 1 u 25 64 377 30.705 -1.130 0.493
+27.124.125.252 27.124.125.250 3 u 31 64 377 33.795 0.369 0.220
-103.126.53.123 223.252.32.9 2 u 21 64 373 31.275 -1.001 0.114[
However I wanted to used GPSD to process the NMEA (mainly so I can monitor
satellite visibility and the like), can it handle the two separate devices
correctly?
If I run gpsd like so..
sudo ./gpsd -D5 -NnG /dev/gps0 /dev/pps0
I get..
gpsd:PROG: selecting PPS driver...
gpsd:PROG: PPS:/dev/pps0 chrony socket /var/run/chrony.pps0.sock doesn't exist
gpsd:INFO: KPPS:/dev/pps0 RFC2783 path:/dev/pps0, fd is -2
gpsd:INFO: KPPS:/dev/pps0 time_pps_create(-2) failed: Bad file descriptor
gpsd:WARN: KPPS:/dev/pps0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/pps0 thread launched
gpsd:INFO: PPS:/dev/pps0 ntpshm_link_activate: 0
gpsd:INFO: device /dev/pps0 activated
gpsd:PROG: KPPS:/dev/pps0 gps_fd:-2 not a tty, can not use TIOMCIWAIT
gpsd:WARN: PPS:/dev/pps0 die: no TIOMCIWAIT, nor RFC2783 CANWAIT
gpsd:PROG: PPS:/dev/pps0 gpsd_ppsmonitor exited.
It seems it isn't actually opening /dev/pps0 (based on the -2 for FD)
The PPS API does work on this device:
[gps 7:35] ~/gpsd >/usr/obj/arm-src/arm.armv7/tools/test/ppsapi/ppsapitest
/dev/pps0
1568014573 .000004794 24612 0 .000000000 0
1568014574 .000004807 24613 0 .000000000 0
1568014575 .000004819 24614 0 .000000000 0
^C
(ppsapitest is
https://svnweb.freebsd.org/base/head/tools/test/ppsapi/ppsapitest.c?revision=315692&view=markup)
Examining the code shows a big chunk is Linux specific so I guess I will have
to modify it but if someone has advice on what the "right way" to do is that
would be great :)
Thanks.
--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
- [gpsd-dev] GPSd on FreeBSD,
O'Connor, Daniel <=
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/09
- Re: [gpsd-dev] GPSd on FreeBSD, Greg Troxel, 2019/09/09
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/09
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, Hal Murray, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/10