bugGPSD - Bugs: bug #51771, gpsd will nt pass time to NTP from...


bug #51771: gpsd will nt pass time to NTP from a pty

Submitted by:  Gary E. Miller <garyemiller>
Submitted on:  Wed 16 Aug 2017 11:41:12 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 16 Aug 2017 11:41:12 PM UTC, original submission:

A user has gpsd connecting to a local pty to get GPS data. The same way gpsfake does. When gpsd detects it is reading from a pty it will not pass time to NTP. This breaks the customers setup.

Here is the code, and his patch:


diff --git a/timehint.c b/timehint.c
index c33a3d36..56578c96 100644
--- a/timehint.c
+++ b/timehint.c
@@ -431,8 +431,8 @@ void ntpshm_link_activate(struct gps_device_t *session)
/* set up ntpshm storage for a session */
/* don't talk to NTP when we're running inside the test harness */
- if (session->sourcetype == source_pty)
- return;
+// if (session->sourcetype == source_pty)
+// return;

if (session->sourcetype != source_pps ) {
/* allocate a shared-memory segment for "NMEA" time data */


Not a good solution as when the user runs gpsfake it will send bad time to NTP. gpsd needs a better way to detect input from gpsfake, or maybe a flag to gpsd so NTP can be disabled manually.

Gary E. Miller <garyemiller>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by garyemiller (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1