[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Port to QNX: PPS without SHM?

From: Norton Allen
Subject: [gpsd-dev] Port to QNX: PPS without SHM?
Date: Sat, 19 Dec 2015 16:25:02 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

I am attempting to use ntpd and gpsd in order obtain accurate system time and position data from an NMEA GPS device with PPS output under QNX. If you're unfamiliar with QNX, it is very POSIX and a little more BSD than Linux.

In the initial build of both gpsd and ntpd, I determined that both were looking for SYSV IPC shared memory, and QNX only provides POSIX shared memory, so I figured I would try to use gpsd's JSON interface instead.

I have a driver that supports the PPS API, so I expect gpsd should be able to talk to it.

I configured a minimal build with:

   scons minimal=yes socket_export=yes nmea0183=yes pps=yes

The serial data is coming in on /dev/ser11, and I have a soft link /dev/gsp1 -> /dev/ser11. The PPS signal is routed to DCD on /dev/ser1, and the pps driver monitors that and provide the PPS API on /dev/pps1. I am invoking gpsd as:

        gpsd /dev/gps1 /dev/pps1

That mostly worked: I was able to see the JSON data and watch the NMEA interface, but ntpd was unable to synch. I believe this is because gpsd never attempted to access the PPS device, so never had data of sufficient quality to pass on to ntpd.

Looking into the gpsd souce code, it appears that in order to get PPS monitoring going, pps_thread_activate() needs to be called, and the only place that is called is from ntpshm_link_activate() in timehint.c. Not surprisingly, that is all qualified by #ifdef NTPSHM_ENABLE.

Any thoughts on what would be necessary to get PPS_ENABLE to work without NTPSHM_ENABLE?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]