From 8bb59f081a3d443d89b698ffeeb7b91667965054 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 9 Oct 2013 23:43:43 +0200 Subject: [PATCH] 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. --- .../gpsd/gpsd-3.9/gpsd-tsip-pps.patch | 27 +++++++++++++++++++ .../recipes-extra/gpsd/gpsd_3.9.bb | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 meta-sysmocom-bsp/recipes-extra/gpsd/gpsd-3.9/gpsd-tsip-pps.patch diff --git a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd-3.9/gpsd-tsip-pps.patch b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd-3.9/gpsd-tsip-pps.patch new file mode 100644 index 0000000000..3f3a1ef0ff --- /dev/null +++ b/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; + } + } diff --git a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.9.bb b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.9.bb index d320f97ec7..6bd5bf5666 100644 --- a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.9.bb +++ b/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 \