Browse Source

gpsd: Add patch to enable + configure PPS in TSIP (trimble) driver

In the sysmoBTS 2050, we want to configure the 1PPS output of the
trimble to be active only if it has at least 1 satellite in view,
and want to make the receiver output its time information in UTC,
rather than GPS time.
edison
Harald Welte 8 years ago
parent
commit
8bb59f081a
  1. 27
      meta-sysmocom-bsp/recipes-extra/gpsd/gpsd-3.9/gpsd-tsip-pps.patch
  2. 3
      meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.9.bb

27
meta-sysmocom-bsp/recipes-extra/gpsd/gpsd-3.9/gpsd-tsip-pps.patch

@ -0,0 +1,27 @@
diff --git a/driver_tsip.c b/driver_tsip.c
index 3c99138..76cbc82 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -1016,6 +1016,22 @@ static void tsip_event_hook(struct gps_device_t *session, event_t event)
/* Request Navigation Configuration */
putbyte(buf, 0, 0x03);
(void)tsip_write(session, 0xbb, buf, 1);
+ gpsd_report(LOG_PROG, "Configuring + Enabling 1PPS\n");
+ /* enable 1pps */
+ putbyte(buf, 0, 0x4a);
+ putbyte(buf, 1, 0x01);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
+ /* request PPS only if at least one sat is visible */
+ putbyte(buf, 0, 0x4e);
+ putbyte(buf, 1, 0x03);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
+ /* request PPS and TSIP to use UTC time, not GPS */
+ putbyte(buf, 0, 0xa2);
+ putbyte(buf, 1, 0x03);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
break;
}
}

3
meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.9.bb

@ -8,12 +8,13 @@ PROVIDES = "virtual/gpsd"
EXTRANATIVEPATH += "chrpath-native"
PR = "r3.8"
PR = "r3.9"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
file://0004-SConstruct-remove-rpath.patch \
file://0001-SConstruct-disable-html-and-man-docs-building-becaus.patch \
file://gpsd-tsip-pps.patch \
file://gpsd-default \
file://gpsd \
file://60-gpsd.rules \

Loading…
Cancel
Save