From MAILER-DAEMON Thu Dec 07 12:17:48 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eMznw-0003Gu-Do
	for mharc-gpsd-dev@gnu.org; Thu, 07 Dec 2017 12:17:48 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44674)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jp.tosoni@acksys.fr>) id 1eMuaO-0001qX-Kj
	for gpsd-dev@nongnu.org; Thu, 07 Dec 2017 06:43:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jp.tosoni@acksys.fr>) id 1eMuaJ-0000Bq-KG
	for gpsd-dev@nongnu.org; Thu, 07 Dec 2017 06:43:28 -0500
Received: from mail-eopbgr40105.outbound.protection.outlook.com
	([40.107.4.105]:60777
	helo=EUR03-DB5-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <jp.tosoni@acksys.fr>) id 1eMuaI-00009k-I4
	for gpsd-dev@nongnu.org; Thu, 07 Dec 2017 06:43:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=ACKSYS.onmicrosoft.com; s=selector1-acksys-fr;
	h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
	bh=5a2/LLqD6FpEUPZKEqNf0Qiwu6jGeXNg65xtgM+7kos=;
	b=PSxxi7m+HCgB5CPkj6A1cvk8lD0mE5NTuM/cw8HLCbxzWyVC1sp+T3aaHRloh1hYM/bFMf29P/o7iGjNL/PyPIhpL4lULGXG6RJ2oUx8vd0JjnfDurRpx/aPbqr8J6cm0RZQcRoPtyOQKhLlJf515moPSXfepVb2S40HR5qZyr4=
Received: from DB3PR0102MB3531.eurprd01.prod.exchangelabs.com (52.134.65.156)
	by DB3PR0102MB3529.eurprd01.prod.exchangelabs.com (52.134.65.154)
	with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9;
	Thu, 7 Dec 2017 11:43:18 +0000
Received: from DB3PR0102MB3531.eurprd01.prod.exchangelabs.com
	([fe80::f:3b8b:fb84:e6f7]) by
	DB3PR0102MB3531.eurprd01.prod.exchangelabs.com
	([fe80::f:3b8b:fb84:e6f7%13]) with mapi id 15.20.0302.010;
	Thu, 7 Dec 2017 11:43:18 +0000
From: Jean Pierre TOSONI <jp.tosoni@acksys.fr>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: gpspipe improvement: add option to exit after delay
Thread-Index: AdNvTu52a84EgTP6TY2gWG15bw1gog==
Date: Thu, 7 Dec 2017 11:43:18 +0000
Message-ID: <DB3PR0102MB35319DF11642C0A7FDAFFAE0E4330@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
	smtp.mailfrom=jp.tosoni@acksys.fr; 
x-originating-ip: [195.6.104.67]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DB3PR0102MB3529;
	6:SeeB+rHEvDSSszYYBFyDIQ71TAqNbtveAb82x3n2mw44phCe0uOTt0H+MajpFWlVHuSoppGyVzeTJgTrvveVKAiIyUmQYrjaLnSqDSIOw44nY0RJlCNH0IldQZTYQEb8mAmMbKuVFeE3f0+XfAwKgwgB7hUkT0V8aEQPMZ0DM4RrpurWy6wrbU1Z/b8SHe4qBNCFtQiKQBuRY1EbdiXSQZYbHpl9zkBoDq+4q/98vnpw+WSZNQcb341tIBdPxp/BUPNFEz8zJrwKtEt/CFCGQYclnNhkow6YONOn/IEc+W/fIszlSEpXROXvuocUQVqNW64uIElR9G69gXm/fW3LwHiLTM75Q1sMKUdtUHdv7+4=;
	5:8mUfzvK/KwJQRDVxy501Nv6zTo3eG/AcVIWPaJo39vPXrU+cB7sh4xLzQeqM4KMQTxsi4m0Twoy4KQ7n7L80Mrf14xSpvUbZViA/InBDotkSnRGyt/y2ESfvw5/c6rnKAfdpSiGjkooMJv+650ZYTwOOI9yPt4kJLNYAaU5+j6g=;
	24:hzl25y+wKVGdvma4aej5NUUithzXAT2uUJaMqu7LlPfOCGW3KC5RyQ1y6b+JW7kZ50/pjM51/oc9bgABOUcFAQVR+l5riGxILAKqte2SmTU=;
	7:/nppxhmSpPfAtcmGwgrPRwfHPAI2pSI2E20G12drZqj+hfr9/ZamyXE9238+tm+bM8G3V2DFXke6PSHsTadHrBBZ52dCcl8U+SRLmpukOHu7jCPCHYEYNWGQP73jNpt4+/00o6a3OotA0S9Ks2mDHrNCEdVkPY7vFE5fpcA/JqvXaBKJsZxBaZWTMsUSrZa3pYFvgetR6cqOO04r3Rh4PxaakDz5JyK37jiBY60hfFrwT9MG08qn8SHSr9xKTRA4
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: ee037ca0-d650-4eff-c647-08d53d67b60d
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(5600026)(4604075)(4534020)(4602075)(4603075)(4627115)(201702281549075)(2017052603286);
	SRVR:DB3PR0102MB3529; 
x-ms-traffictypediagnostic: DB3PR0102MB3529:
x-microsoft-antispam-prvs: <DB3PR0102MB3529723DE0320D7EE5E556BDE4330@DB3PR0102MB3529.eurprd01.prod.exchangelabs.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123564025)(2016111802025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(6043046)(6072148)(201708071742011);
	SRVR:DB3PR0102MB3529; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:DB3PR0102MB3529; 
x-forefront-prvs: 05143A8241
x-forefront-antispam-report: SFV:NSPM;
	SFS:(10019020)(366004)(346002)(376002)(39830400002)(199004)(189003)(25786009)(2351001)(55016002)(5250100002)(14454004)(478600001)(2906002)(3660700001)(106356001)(33656002)(3280700002)(101416001)(105586002)(6436002)(2900100001)(53936002)(6506006)(5640700003)(9686003)(74482002)(102836003)(81156014)(3846002)(6116002)(81166006)(8676002)(68736007)(86362001)(6916009)(99286004)(5660300001)(97736004)(305945005)(66066001)(316002)(74316002)(7736002)(8936002)(2501003)(7696005);
	DIR:OUT; SFP:1102; SCL:1; SRVR:DB3PR0102MB3529;
	H:DB3PR0102MB3531.eurprd01.prod.exchangelabs.com; FPR:; SPF:None;
	PTR:InfoNoRecords; A:1; MX:1; LANG:en; 
received-spf: None (protection.outlook.com: acksys.fr does not designate
	permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: acksys.fr
X-MS-Exchange-CrossTenant-Network-Message-Id: ee037ca0-d650-4eff-c647-08d53d67b60d
X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2017 11:43:18.6200 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f18a6414-d5f3-4b5c-9345-f30c01d87e32
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0102MB3529
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.107.4.105
X-Mailman-Approved-At: Thu, 07 Dec 2017 12:17:47 -0500
Subject: [gpsd-dev] gpspipe improvement: add option to exit after delay
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Dec 2017 11:43:30 -0000

If the GPS receiver cease to supply data to gpsd, gpspipe hangs indefinitel=
y
waiting for gpsd.

This can happen if the GPS is turned off by external means, e.g. by an AT
command on the command port of a cellular card.

In order to use gpspipe to get a fix within bounded time, this patch adds
an option to specify a timout, so that I can do things like:
	$ x=3D$(gpspipe -x 5 -w|sed -n '/TPV/{p;q}')
And get either the first TPV or an empty string if no fix is available.
---
This patch applies to version 3.16.

--- a/gpspipe.c
+++ b/gpspipe.c
@@ -110,6 +110,7 @@ static void usage(void)
 		  "-u usec time stamp, implies -t. Use -uu to output sec.usec\n"
 		  "-s [serial dev] emulate a 4800bps NMEA GPS on serial port (use with '=
-r').\n"
 		  "-n [count] exit after count packets.\n"
+		  "-x [seconds] Exit after given delay.\n"
 		  "-v Print a little spinner.\n"
 		  "-p Include profiling info in the JSON.\n"
 		  "-P Include PPS JSON in NMEA or raw mode.\n"
@@ -133,6 +134,7 @@ int main(int argc, char **argv)
     bool profile =3D false;
     int option_u =3D 0;                   // option to show uSeconds
     long count =3D -1;
+    time_t exit_timer =3D 0;
     int option;
     unsigned int vflag =3D 0, l =3D 0;
     FILE *fp;
@@ -144,7 +146,7 @@ int main(int argc, char **argv)
     char *outfile =3D NULL;
=20
     flags =3D WATCH_ENABLE;
-    while ((option =3D getopt(argc, argv, "?dD:lhrRwStT:vVn:s:o:pPu2")) !=
=3D -1) {
+    while ((option =3D getopt(argc, argv, "?dD:lhrRwStT:vVx:n:s:o:pPu2")) =
!=3D -1) {
 	switch (option) {
 	case 'D':
 	    debug =3D atoi(optarg);
@@ -204,6 +206,9 @@ int main(int argc, char **argv)
 	    (void)fprintf(stderr, "%s: %s (revision %s)\n",
 			  argv[0], VERSION, REVISION);
 	    exit(EXIT_SUCCESS);
+	case 'x':
+	    exit_timer =3D time(NULL) + strtol(optarg, 0, 0);
+	    break;
 	case 's':
 	    serialport =3D optarg;
 	    break;
@@ -303,6 +308,8 @@ int main(int argc, char **argv)
 	FD_SET(gpsdata.gps_fd, &fds);
 	errno =3D 0;
 	r =3D select(gpsdata.gps_fd+1, &fds, NULL, NULL, &tv);
+	if (r >=3D 0 && exit_timer && time(NULL) >=3D exit_timer)
+		break;
 	if (r =3D=3D -1 && errno !=3D EINTR) {
 	    (void)fprintf(stderr, "gpspipe: select error %s(%d)\n",
 			  strerror(errno), errno);
--
quilt


From MAILER-DAEMON Thu Dec 07 15:05:53 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eN2Qb-0004BG-Qa
	for mharc-gpsd-dev@gnu.org; Thu, 07 Dec 2017 15:05:53 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43986)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1eN2QZ-0004An-LM
	for gpsd-dev@nongnu.org; Thu, 07 Dec 2017 15:05:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fw@fwright.net>) id 1eN2QW-0001w3-Gy
	for gpsd-dev@nongnu.org; Thu, 07 Dec 2017 15:05:51 -0500
Received: from d.mail.sonic.net ([64.142.111.50]:40448)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <fw@fwright.net>) id 1eN2QW-0001uo-8P
	for gpsd-dev@nongnu.org; Thu, 07 Dec 2017 15:05:48 -0500
Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19])
	by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPS id vB7K5ccE014801
	(version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
	Thu, 7 Dec 2017 12:05:38 -0800
Received: from bolt.sonic.net (localhost.localdomain [127.0.0.1])
	by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id vB7K5c6r000632;
	Thu, 7 Dec 2017 12:05:38 -0800
Received: from localhost (fw@localhost)
	by bolt.sonic.net (8.13.6/8.12.1/Submit) with ESMTP id vB7K5aK1000617; 
	Thu, 7 Dec 2017 12:05:37 -0800
X-Authentication-Warning: bolt.sonic.net: fw owned process doing -bs
Date: Thu, 7 Dec 2017 12:05:36 -0800 (PST)
From: Fred Wright <fw@fwright.net>
X-X-Sender: fw@bolt.sonic.net
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
In-Reply-To: <DB3PR0102MB35319DF11642C0A7FDAFFAE0E4330@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
Message-ID: <Pine.LNX.4.58L1X.1712071204030.19101@bolt.sonic.net>
References: <DB3PR0102MB35319DF11642C0A7FDAFFAE0E4330@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sonic-CAuth: UmFuZG9tSVYRuZeuyJ82H+tDundTGkiIsaSMcXyrfMNC8RLuzd/1b++pPA+XgXhm5VEtc8gwbZHWgh10d1HO3ngWyh15Ji3t
X-Sonic-ID: C;vB5G/onb5xGa+5dP6JRttw== M;uJlq/onb5xGa+5dP6JRttw==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.142.111.50
Subject: Re: [gpsd-dev] gpspipe improvement: add option to exit after delay
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Dec 2017 20:05:52 -0000


On Thu, 7 Dec 2017, Jean Pierre TOSONI wrote:

> If the GPS receiver cease to supply data to gpsd, gpspipe hangs indefinitely
> waiting for gpsd.
[...]

I'm swamped this week, but I'll take a look at it next week.  In the
meantime, you might consider rebasing it to 3.17, if not the latest
source.

Fred Wright


From MAILER-DAEMON Mon Dec 11 10:16:31 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOPok-0008Dz-Sr
	for mharc-gpsd-dev@gnu.org; Mon, 11 Dec 2017 10:16:30 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45500)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHKS-0005Rx-SS
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHKP-0002FQ-Ma
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:40 -0500
Received: from fed1rmfepo201.cox.net ([68.230.241.146]:58028)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHKP-0001z0-9d
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:37 -0500
Received: from fed1rmimpo209.cox.net ([68.230.241.160])
	by fed1rmfepo201.cox.net
	(InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id
	<20171211061215.TOKT4375.fed1rmfepo201.cox.net@fed1rmimpo209.cox.net>
	for <gpsd-dev@nongnu.org>; Mon, 11 Dec 2017 01:12:15 -0500
Received: from campbell.lordsutch.dyndns.org ([68.1.156.213])
	by fed1rmimpo209.cox.net with cox
	id kWCE1w00E4cXXvo01WCEVj; Mon, 11 Dec 2017 01:12:15 -0500
X-CT-Class: Clean
X-CT-Score: 0.00
X-CT-RefID: str=0001.0A090201.5A2E21BF.0018, ss=1, re=0.000, recu=0.000,
	reip=0.000, cl=1, cld=1, fgs=0
X-CT-Spam: 0
X-Authority-Analysis: v=2.2 cv=UqATD64B c=1 sm=1 tr=0
	a=Puho0OY1ZorkJp1ApKidfA==:117 a=Puho0OY1ZorkJp1ApKidfA==:17
	a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=PSqm60UgGT8A:10 a=ocR9PWop10UA:10
	a=8Mtcf-_rdG4A:10 a=pGLkceISAAAA:8 a=A4hgu3MRAAAA:8
	a=JVidhGipNnmL019NvF4A:9
	a=CjuIK1q_8ugA:10 a=Ml58Uydg9EMiwkAnzwS8:22
X-CM-Score: 0.00
Authentication-Results: cox.net; none
Received: by campbell.lordsutch.dyndns.org (Postfix, from userid 1000)
	id 17D8E651294; Mon, 11 Dec 2017 01:12:14 -0500 (EST)
Date: Mon, 11 Dec 2017 01:12:14 -0500
From: Chris Lawrence <lordsutch@gmail.com>
To: gpsd-dev@nongnu.org
Message-ID: <20171211061214.GA9876@lordsutch.dyndns.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: Linux/x86_64 4.14.3
User-Agent: Mutt/1.9.1 (2017-09-22)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-Received-From: 68.230.241.146
X-Mailman-Approved-At: Mon, 11 Dec 2017 10:16:29 -0500
Subject: [gpsd-dev] [PATCH 3/3] Support Galileo $GA... talkers and fix a
 couple of $GB cases
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Dec 2017 06:12:43 -0000

Now that the Galileo constellation is live, the NMEA 4.1 standard
appears to have standardized on the "$GA..." prefix for
Galileo-specific messages. The lexer currently filters these out; this
patch ensures they go through to e.g. gpspipe -r. (I tore my hair out
for days trying to figure out why these were not being passed through
even though I could see them using screen etc.)

Also added logic to the GSA and GSV message parsing to account for the
Galileo messages. It probably needs more work to match up satellite
numbers between the GSA and GSV messages and to account for the GNSS
type field in NMEA 4.1, but it's a start at least.

I also fixed a couple of situations where the 'GB' prefix was being
ignored even though 'BD' was not. This leads to a regression in
test/daemon/beidou-gb.log, but the "regression" is actually incorrect
old behavior (JSON messages omitting BeiDou satellites) exposed by the
patch.

Signed-off-by: Chris Lawrence <lordsutch@gmail.com>
---
 driver_nmea0183.c | 16 +++++++++++-----
 gpsd.h            |  2 ++
 packet.c          |  3 ++-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 94cf4dc3..4287154f 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -536,6 +536,8 @@ static int nmeaid_to_prn(char *talker, int satnum)
 	/* QZSS */
 	if (talker[0] == 'Q' && talker[1] == 'Z')
 	    satnum += 193;
+	if (talker[0] == 'G' && talker[1] == 'A')
+	    satnum += 300; /* Used by u-blox at least */
     }
 
     return satnum;
@@ -629,12 +631,14 @@ static gps_mask_t processGSA(int count, char *field[],
 	    memset(session->nmea.sats_used, 0, sizeof(session->nmea.sats_used));
 	}
 	session->nmea.last_gsa_talker = GSA_TALKER;
-	if (session->nmea.last_gsa_talker == 'D')
+	if (session->nmea.last_gsa_talker == 'D' || session->nmea.last_gsa_talker == 'B')
 	    session->nmea.seen_bdgsa = true;
 	else if (session->nmea.last_gsa_talker == 'L')
 	    session->nmea.seen_glgsa = true;
 	else if (session->nmea.last_gsa_talker == 'N')
 	    session->nmea.seen_gngsa = true;
+	else if (session->nmea.last_gsa_talker == 'A')
+	    session->nmea.seen_gagsa = true;
 
 	/* the magic 6 here counts the tag, two mode fields, and the DOP fields */
 	for (i = 0; i < count - 6; i++) {
@@ -665,7 +669,7 @@ static gps_mask_t processGSA(int count, char *field[],
     }
     /* assumes GLGSA or BDGSA, if present, is emitted  directly
      * after the GPGSA*/
-    if ((session->nmea.seen_glgsa || session->nmea.seen_bdgsa)
+    if ((session->nmea.seen_glgsa || session->nmea.seen_bdgsa || session->nmea.seen_gagsa)
        && GSA_TALKER == 'P')
 	return ONLINE_SET;
 
@@ -769,10 +773,12 @@ static gps_mask_t processGSV(int count, char *field[],
 	session->nmea.last_gsv_talker = GSV_TALKER;
 	if (session->nmea.last_gsv_talker == 'L')
 	    session->nmea.seen_glgsv = true;
-	if (session->nmea.last_gsv_talker == 'D')
+	if (session->nmea.last_gsv_talker == 'D' || session->nmea.last_gsv_talker == 'B')
 	    session->nmea.seen_bdgsv = true;
 	if (session->nmea.last_gsv_talker == 'Z')
 	    session->nmea.seen_qzss = true;
+	if (session->nmea.last_gsv_talker == 'A')
+	    session->nmea.seen_gagsv = true;
     }
 
     for (fldnum = 4; fldnum < count / 4 * 4;) {
@@ -815,7 +821,7 @@ static gps_mask_t processGSV(int count, char *field[],
      *
      * FIXME: Add per-talker totals so we can do this check properly.
      */
-    if (!(session->nmea.seen_glgsv || session->nmea.seen_bdgsv || session->nmea.seen_qzss))
+    if (!(session->nmea.seen_glgsv || session->nmea.seen_bdgsv || session->nmea.seen_qzss || session->nmea.seen_gagsv))
 	if (session->nmea.part == session->nmea.await
 		&& atoi(field[3]) != session->gpsdata.satellites_visible)
 	    gpsd_log(&session->context->errout, LOG_WARN,
@@ -852,7 +858,7 @@ static gps_mask_t processGSV(int count, char *field[],
 	     session->nmea.part, session->nmea.await);
 
     /* assumes GLGSV or BDGSV group, if present, is emitted after the GPGSV */
-    if ((session->nmea.seen_glgsv || session->nmea.seen_bdgsv || session->nmea.seen_qzss) && GSV_TALKER == 'P')
+    if ((session->nmea.seen_glgsv || session->nmea.seen_bdgsv || session->nmea.seen_qzss || session->nmea.seen_gagsv) && GSV_TALKER == 'P')
 	return ONLINE_SET;
 
     /* clear computed DOPs so they get recomputed. */
diff --git a/gpsd.h b/gpsd.h
index a6e60ef5..b14403d4 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -539,10 +539,12 @@ struct gps_device_t {
 	bool seen_glgsv;
 	bool seen_bdgsv;
 	bool seen_qzss;
+	bool seen_gagsv;
 	char last_gsv_talker;
 	bool seen_glgsa;
 	bool seen_gngsa;
 	bool seen_bdgsa;
+	bool seen_gagsa;
 	char last_gsa_talker;
 	/*
 	 * State for the cycle-tracking machinery.
diff --git a/packet.c b/packet.c
index bf0e2757..69aced6f 100644
--- a/packet.c
+++ b/packet.c
@@ -94,6 +94,7 @@ PERMISSIONS
  *      $GN -- Mixed GPS and GLONASS data, according to IEIC 61162-1
  *      $BD -- Beidou
  *      $GB -- Beidou
+ *      $GA -- Galileo
  *      $QZ -- QZSS GPS augmentation system
  *      $II -- Integrated Instrumentation (Raytheon's SeaTalk system).
  *      $IN -- Integrated Navigation (Garmin uses this).
@@ -389,7 +390,7 @@ static bool nextstate(struct gps_lexer_t *lexer, unsigned char c)
 	 * We have a log from China with a Beidou device using $GB
 	 * rather than $BD.
 	 */
-	if (c == 'B' || c == 'P' || c == 'N' || c == 'L')
+	if (c == 'B' || c == 'P' || c == 'N' || c == 'L' || c == 'A')
 	    lexer->state = NMEA_LEADER_END;
 	else
 	    (void) character_pushback(lexer, GROUND_STATE);
-- 
2.14.3 (Apple Git-98)


-- 
Chris Lawrence <chris@lordsutch.com> - http://blog.lordsutch.com/


From MAILER-DAEMON Mon Dec 11 10:16:31 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOPol-0008Ec-EX
	for mharc-gpsd-dev@gnu.org; Mon, 11 Dec 2017 10:16:31 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45306)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHJz-0004TZ-W6
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHJw-0001ua-Ri
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:11 -0500
Received: from fed1rmfepi102.cox.net ([68.230.241.133]:54412)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHJw-0001ke-Ic
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:08 -0500
Received: from fed1rmimpo210.cox.net ([68.230.241.161])
	by fed1rmfepo103.cox.net
	(InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id
	<20171211054530.UCIR4490.fed1rmfepo103.cox.net@fed1rmimpo210.cox.net>
	for <gpsd-dev@nongnu.org>; Mon, 11 Dec 2017 00:45:30 -0500
Received: from campbell.lordsutch.dyndns.org ([68.1.156.213])
	by fed1rmimpo210.cox.net with cox
	id kVlV1w0034cXXvo01VlVd3; Mon, 11 Dec 2017 00:45:30 -0500
X-CT-Class: Clean
X-CT-Score: 0.00
X-CT-RefID: str=0001.0A090205.5A2E1B7A.0011, ss=1, re=0.000, recu=0.000,
	reip=0.000, cl=1, cld=1, fgs=0
X-CT-Spam: 0
X-Authority-Analysis: v=2.2 cv=N95ZLy1B c=1 sm=1 tr=0
	a=Puho0OY1ZorkJp1ApKidfA==:117 a=Puho0OY1ZorkJp1ApKidfA==:17
	a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=PSqm60UgGT8A:10 a=ocR9PWop10UA:10
	a=8Mtcf-_rdG4A:10 a=pGLkceISAAAA:8 a=A4hgu3MRAAAA:8
	a=o-Mnxvh9pgLNrXYucDcA:9
	a=CjuIK1q_8ugA:10 a=Ml58Uydg9EMiwkAnzwS8:22
X-CM-Score: 0.00
Authentication-Results: cox.net; none
Received: by campbell.lordsutch.dyndns.org (Postfix, from userid 1000)
	id DD454651287; Mon, 11 Dec 2017 00:45:28 -0500 (EST)
Date: Mon, 11 Dec 2017 00:45:28 -0500
From: Chris Lawrence <lordsutch@gmail.com>
To: gpsd-dev@nongnu.org
Message-ID: <20171211054528.GA8556@lordsutch.dyndns.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: Linux/x86_64 4.14.3
User-Agent: Mutt/1.9.1 (2017-09-22)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-Received-From: 68.230.241.133
X-Mailman-Approved-At: Mon, 11 Dec 2017 10:16:29 -0500
Subject: [gpsd-dev] [PATCH 1/3] Fix time display of UBX messages.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Dec 2017 06:12:13 -0000

This is the first of three patches to gpsd I've produced while
debugging issues with my u-blox GPS devices.

This patch fixes an order-of-magnitude error in the interpretation of
the GPS time reported by the device (UBX-NAV-SOL) in gpsmon. Verified
to work correctly with both a NEO-M8N and NEO-6N in u-blox (binary)
mode.

Signed-off-by: Chris Lawrence <lordsutch@gmail.com>
---
 monitor_ubx.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/monitor_ubx.c b/monitor_ubx.c
index 2ba82de8..35026349 100644
--- a/monitor_ubx.c
+++ b/monitor_ubx.c
@@ -173,16 +173,16 @@ static void display_nav_sol(unsigned char *buf, size_t data_len)
 
     (void)wmove(navsolwin, 7, 7);
     {
-	unsigned int day = tow / 8640000;
-	unsigned int tod = tow % 8640000;
-	unsigned int h = tod / 360000;
-	unsigned int m = tod % 360000;
-	unsigned int s = m % 6000;
+	unsigned int day = tow / 86400000;
+	unsigned int tod = tow % 86400000;
+	unsigned int h = tod / 3600000;
+	unsigned int m = tod % 3600000;
+	unsigned int s = m % 60000;
 
-	m = (m - s) / 6000;
+	m = (m - s) / 60000;
 
 	(void)wattrset(navsolwin, A_UNDERLINE);
-	(void)wprintw(navsolwin, "%u %02u:%02u:%05.2f", day, h, m, (double)s / 100);
+	(void)wprintw(navsolwin, "%u %02u:%02u:%05.2f", day, h, m, (double)s / 1000);
 	(void)wattrset(navsolwin, A_NORMAL);
     }
     (void)wmove(navsolwin, 8, 11);
-- 
2.14.3 (Apple Git-98)


-- 
Chris Lawrence <chris@lordsutch.com> - http://blog.lordsutch.com/


From MAILER-DAEMON Mon Dec 11 10:16:31 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOPol-0008Er-NN
	for mharc-gpsd-dev@gnu.org; Mon, 11 Dec 2017 10:16:31 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45308)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHK0-0004Ta-1Q
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHJw-0001uV-RD
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:12 -0500
Received: from fed1rmfepi205.cox.net ([68.230.241.150]:46901)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quango@lordsutch.dyndns.org>) id 1eOHJw-0001kW-IB
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 01:12:08 -0500
Received: from fed1rmimpo110.cox.net ([68.230.241.159])
	by fed1rmfepo203.cox.net
	(InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id
	<20171211055358.LJNE8182.fed1rmfepo203.cox.net@fed1rmimpo110.cox.net>
	for <gpsd-dev@nongnu.org>; Mon, 11 Dec 2017 00:53:58 -0500
Received: from campbell.lordsutch.dyndns.org ([68.1.156.213])
	by fed1rmimpo110.cox.net with cox
	id kVtx1w0094cXXvo01Vtx4L; Mon, 11 Dec 2017 00:53:58 -0500
X-CT-Class: Clean
X-CT-Score: 0.00
X-CT-RefID: str=0001.0A090204.5A2E1D76.0010, ss=1, re=0.000, recu=0.000,
	reip=0.000, cl=1, cld=1, fgs=0
X-CT-Spam: 0
X-Authority-Analysis: v=2.2 cv=BJjDlBYG c=1 sm=1 tr=0
	a=Puho0OY1ZorkJp1ApKidfA==:117 a=Puho0OY1ZorkJp1ApKidfA==:17
	a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=PSqm60UgGT8A:10 a=ocR9PWop10UA:10
	a=8Mtcf-_rdG4A:10 a=pGLkceISAAAA:8 a=A4hgu3MRAAAA:8
	a=OJBpDP7NAUuqKYfwp44A:9
	a=CjuIK1q_8ugA:10 a=Ml58Uydg9EMiwkAnzwS8:22
X-CM-Score: 0.00
Authentication-Results: cox.net; none
Received: by campbell.lordsutch.dyndns.org (Postfix, from userid 1000)
	id 2901865128C; Mon, 11 Dec 2017 00:53:57 -0500 (EST)
Date: Mon, 11 Dec 2017 00:53:57 -0500
From: Chris Lawrence <lordsutch@gmail.com>
To: gpsd-dev@nongnu.org
Message-ID: <20171211055357.GA9570@lordsutch.dyndns.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: Linux/x86_64 4.14.3
User-Agent: Mutt/1.9.1 (2017-09-22)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-Received-From: 68.230.241.150
X-Mailman-Approved-At: Mon, 11 Dec 2017 10:16:29 -0500
Subject: [gpsd-dev] [PATCH 2/3] Ensure UBX device is actually switched to
 binary mode
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Dec 2017 06:12:13 -0000

The message from the device announcing the correct port to connect to
in response to UBX-CFG-PRT may arrive after the attempt to configure
the output. This patch ensures a second UBX-CFG-PRT command is sent if
the response indicates the initial guess is wrong (for example, on my
MacBook, the device is attached to /dev/tty.usbmodemNNNN which is
guessed to be a UART but is actually USB).

I also took the liberty of simplifying the logic a bit; in particular
there's no need to clear bits that are already clear when setting the
mode, so the code can be simplified quite a bit.

Signed-off-by: Chris Lawrence <lordsutch@gmail.com>
---
 driver_ubx.c | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/driver_ubx.c b/driver_ubx.c
index 05edc594..525db53a 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -719,9 +719,20 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
 	break;
 
     case UBX_CFG_PRT:
-	session->driver.ubx.port_id = (unsigned char)buf[UBX_MESSAGE_DATA_OFFSET + 0];
-	gpsd_log(&session->context->errout, LOG_INF, "UBX_CFG_PRT: port %d\n",
-		 session->driver.ubx.port_id);
+        if ( session->driver.ubx.port_id != (unsigned char)buf[UBX_MESSAGE_DATA_OFFSET + 0] ) {
+	    session->driver.ubx.port_id = (unsigned char)buf[UBX_MESSAGE_DATA_OFFSET + 0];
+	    gpsd_log(&session->context->errout, LOG_INF,
+		     "UBX_CFG_PRT: port %d\n", session->driver.ubx.port_id);
+
+#ifdef RECONFIGURE_ENABLE
+	    /* Need to reinitialize since port changed */
+	    if (session->mode == O_OPTIMIZE) {
+		ubx_mode(session, MODE_BINARY);
+	    } else {
+		ubx_mode(session, MODE_NMEA);
+	    }
+#endif /* RECONFIGURE_ENABLE */
+	}
 	break;
 
     case UBX_TIM_TP:
@@ -912,9 +923,9 @@ static void ubx_cfg_prt(struct gps_device_t *session,
      * has port ID 3 the way it ought to.
      */
     else if (strstr(session->gpsdata.dev.path, "/ACM") != NULL)
-	buf[0] = USB_ID;
+	session->driver.ubx.port_id = buf[0] = USB_ID;
     else
-	buf[0] = USART1_ID;
+	session->driver.ubx.port_id = buf[0] = USART1_ID;
 
     putle32(buf, 8, speed);
 
@@ -973,6 +984,9 @@ static void ubx_cfg_prt(struct gps_device_t *session,
     /* enable all input protocols by default */
     buf[12] = NMEA_PROTOCOL_MASK | UBX_PROTOCOL_MASK | RTCM_PROTOCOL_MASK;
 
+    buf[outProtoMask] = (mode == MODE_NMEA ? NMEA_PROTOCOL_MASK : UBX_PROTOCOL_MASK);
+    (void)ubx_write(session, 0x06u, 0x00, buf, sizeof(buf));
+    
     /* selectively enable output protocols */
     if (mode == MODE_NMEA) {
 	/*
@@ -1039,9 +1053,6 @@ static void ubx_cfg_prt(struct gps_device_t *session,
 	msg[1] = 0x08;		/* msg id  = ZDA */
 	msg[2] = 0x01;		/* rate */
 	(void)ubx_write(session, 0x06u, 0x01, msg, 3);
-
-	buf[outProtoMask] &= ~UBX_PROTOCOL_MASK;
-	buf[outProtoMask] |= NMEA_PROTOCOL_MASK;
     } else { /* MODE_BINARY */
 	/*
 	 * Just enabling the UBX protocol for output is not enough to
@@ -1135,12 +1146,7 @@ static void ubx_cfg_prt(struct gps_device_t *session,
 	msg[2] = 0x00;		/* rate */
 	(void)ubx_write(session, 0x06u, 0x01, msg, 3);
 #endif /* __UNUSED __ */
-
-	buf[outProtoMask] &= ~NMEA_PROTOCOL_MASK;
-	buf[outProtoMask] |= UBX_PROTOCOL_MASK;
     }
-
-    (void)ubx_write(session, 0x06u, 0x00, buf, sizeof(buf));
 }
 
 static void ubx_mode(struct gps_device_t *session, int mode)
-- 
2.14.3 (Apple Git-98)


-- 
Chris Lawrence <chris@lordsutch.com> - http://blog.lordsutch.com/


From MAILER-DAEMON Mon Dec 11 14:26:10 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOTiM-00075v-Qs
	for mharc-gpsd-dev@gnu.org; Mon, 11 Dec 2017 14:26:10 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56966)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eOTiK-00075Y-MX
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 14:26:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eOTiH-0001xa-Fx
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 14:26:08 -0500
Received: from mail-oln040092071108.outbound.protection.outlook.com
	([40.92.71.108]:15200
	helo=EUR03-DB5-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1eOTiH-0001uH-3C
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 14:26:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=YhZ7ky1KCSnMuQiZ3f1PQsUBZRnv7CnAZLJAzHRcY7A=;
	b=YUQWcPriMOljkitODZ9tbDXlnOphWl/q+YpU+Hs959fxCrhQLzdGhBxaYXNLUkkW8ia4CZUpmCCTN7+P1X1kApPwAqOWftXSLHi3Q8/bNoxK1g0EmQuqU4LjRsiGKdpaum5892ybVKwXSV7y65oRwP9KVA71vxIsXDPLWQevPY7yJZSINfIRrvw6a4LGoqKneRvmX494ZUWnIAwTsYTyJMPof1kyKChYVzBPMqFK+RZ4DM/zhkHJPy5ehR6GJZ2niTUl4nxKWlQZE8k9Bx5G2OjOnC4hdSafOB+O1dnEQqBRTypitqmaN1SHe0JHmediybcut84ClWkJ74uXGK5lEQ==
Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com
	(10.152.16.58) by AM5EUR03HT167.eop-EUR03.prod.protection.outlook.com
	(10.152.17.209) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.282.5;
	Mon, 11 Dec 2017 19:26:02 +0000
Received: from VI1P190MB0301.EURP190.PROD.OUTLOOK.COM (10.152.16.51) by
	AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
	15.20.302.6 via Frontend Transport; Mon, 11 Dec 2017 19:26:02 +0000
Received: from VI1P190MB0301.EURP190.PROD.OUTLOOK.COM
	([fe80::74b2:d8f6:986c:bfdd]) by VI1P190MB0301.EURP190.PROD.OUTLOOK.COM
	([fe80::74b2:d8f6:986c:bfdd%13]) with mapi id 15.20.0302.013;
	Mon, 11 Dec 2017 19:26:02 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: Jean Pierre TOSONI <jp.tosoni@acksys.fr>, "gpsd-dev@nongnu.org"
	<gpsd-dev@nongnu.org>
Thread-Topic: gpspipe improvement: add option to exit after delay
Thread-Index: AdNvTu52a84EgTP6TY2gWG15bw1gogDZmhVV
Date: Mon, 11 Dec 2017 19:26:02 +0000
Message-ID: <VI1P190MB03018A7D099565141E7BB8CC8E370@VI1P190MB0301.EURP190.PROD.OUTLOOK.COM>
References: <DB3PR0102MB35319DF11642C0A7FDAFFAE0E4330@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
In-Reply-To: <DB3PR0102MB35319DF11642C0A7FDAFFAE0E4330@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:B7A99F6415708B3D8ABB6A333645092DABA620210755F58971DA38870031848A;
	UpperCasedChecksum:85E23AF5C6A85DCE1C5672AC4FC65B5258A0424A40EF0D3F846DD3470B2F1075;
	SizeAsReceived:7148; Count:46
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [qzGZTGNYZmwsmHUgpEx2qp7XkzG16aqK]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM5EUR03HT167;
	6:ZphnAYLzM6uyA4dwYQZhVm1bndlfM+V3i88EucwECS3pk7HvZbvoF/JwwyGdTSUzgeiy04WS3vVR+4yWEbFd7eXyuGBu7GU5tl7ZWiGW7pTv3nYo0bs86EoZXP7+82tOky/2e1nygoBNC9sFx+T6aty8VX+dSe2sYxKymtp09IgwW9jHcp8mfvGVYO72sbRd/7kFWx43sXcw7BVQh0CveykbgSrg2sXzLUpkEHUIREgHOtlxc/Sw6JV++9FwAiD5CJW12UQ5wwQG0iUhnQabVBQVOoVMKlwe2eJCmggJnhJQADxmoTDg9MlAiJE/J3s6nq+JENd+t/7ju/hu96epD7NzZxOl4/DX/BltPnbmpi0=;
	5:bqh/iFskJ2k6ksBaeBm9AHZVI7pmJ3Dkr+8ogNNQuUn8GCENlfsFVYpT1Z64aGrJE3eR6h7izDDqRfpfW6kv5ZEhDjCbg6a9hj+UVKOlYMJPe13p8TYRAKWtQ54I0YLot9m6taAnJYrPwBfMZzAoV4tKU7cx5BdU3Wf80P3Ft7w=;
	24:uIEMhtdS9Im2AJQlxCVc/0nRwXElJwAffBTcVeQDxHGXmpqaAmLl8EkLs6T6+78dzI5s27Zr6d9aLbTzcRiR2mhIoaLwTB/zad7oEsatVNc=;
	7:sWf+zSVUiJDHDSNNTsseLYvlMffgLii9U5Zwgi0roPsHE4DuJwEyaZ143KAEXSrkEBnyMFlVhb3sIk5tIoV8jLBSaDDbT4j1vx0i2dxS8BqXEBAGz4Jd3iRuNkeFvjmbxrz3hNng34Y9hXyiyYkGxvQOQjyzl6R8q8Mrxi0yQwZK4YHxhpFF7FIIvFba5AzDsOyJQgYHrIT+8h5eVpy+A/th1VHM1mV5Xpt7L0v9vYf1rtK3Cc/MjkoGFVeoaJdb
x-incomingheadercount: 46
x-eopattributedmessage: 0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125374)(1603101448)(1701031045);
	SRVR:AM5EUR03HT167; 
x-ms-traffictypediagnostic: AM5EUR03HT167:
x-ms-office365-filtering-correlation-id: 5a81c349-584d-4067-39f4-08d540cd0409
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031);
	SRVR:AM5EUR03HT167; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:AM5EUR03HT167; 
x-forefront-prvs: 0518EEFB48
x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT;
	SFP:1901; SCL:1; SRVR:AM5EUR03HT167;
	H:VI1P190MB0301.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5a81c349-584d-4067-39f4-08d540cd0409
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2017 19:26:02.0480 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT167
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.92.71.108
Subject: Re: [gpsd-dev] gpspipe improvement: add option to exit after delay
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Dec 2017 19:26:09 -0000

Please don't forget to update the associated documentation.

i.e. update the file 'gpsfake.xml' as well for the new command line option.

--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.

________________________________________
From: gpsd-dev <gpsd-dev-bounces+rw_norris=3Dhotmail.com@nongnu.org> on beh=
alf of Jean Pierre TOSONI <jp.tosoni@acksys.fr>
Sent: 07 December 2017 11:43:18
To: gpsd-dev@nongnu.org
Subject: [gpsd-dev] gpspipe improvement: add option to exit after delay

If the GPS receiver cease to supply data to gpsd, gpspipe hangs indefinitel=
y
waiting for gpsd.

This can happen if the GPS is turned off by external means, e.g. by an AT
command on the command port of a cellular card.

In order to use gpspipe to get a fix within bounded time, this patch adds
an option to specify a timout, so that I can do things like:
        $ x=3D$(gpspipe -x 5 -w|sed -n '/TPV/{p;q}')
And get either the first TPV or an empty string if no fix is available.
---
This patch applies to version 3.16.

--- a/gpspipe.c
+++ b/gpspipe.c
@@ -110,6 +110,7 @@ static void usage(void)
                  "-u usec time stamp, implies -t. Use -uu to output sec.us=
ec\n"
                  "-s [serial dev] emulate a 4800bps NMEA GPS on serial por=
t (use with '-r').\n"
                  "-n [count] exit after count packets.\n"
+                 "-x [seconds] Exit after given delay.\n"
                  "-v Print a little spinner.\n"
                  "-p Include profiling info in the JSON.\n"
                  "-P Include PPS JSON in NMEA or raw mode.\n"
@@ -133,6 +134,7 @@ int main(int argc, char **argv)
     bool profile =3D false;
     int option_u =3D 0;                   // option to show uSeconds
     long count =3D -1;
+    time_t exit_timer =3D 0;
     int option;
     unsigned int vflag =3D 0, l =3D 0;
     FILE *fp;
@@ -144,7 +146,7 @@ int main(int argc, char **argv)
     char *outfile =3D NULL;

     flags =3D WATCH_ENABLE;
-    while ((option =3D getopt(argc, argv, "?dD:lhrRwStT:vVn:s:o:pPu2")) !=
=3D -1) {
+    while ((option =3D getopt(argc, argv, "?dD:lhrRwStT:vVx:n:s:o:pPu2")) =
!=3D -1) {
        switch (option) {
        case 'D':
            debug =3D atoi(optarg);
@@ -204,6 +206,9 @@ int main(int argc, char **argv)
            (void)fprintf(stderr, "%s: %s (revision %s)\n",
                          argv[0], VERSION, REVISION);
            exit(EXIT_SUCCESS);
+       case 'x':
+           exit_timer =3D time(NULL) + strtol(optarg, 0, 0);
+           break;
        case 's':
            serialport =3D optarg;
            break;
@@ -303,6 +308,8 @@ int main(int argc, char **argv)
        FD_SET(gpsdata.gps_fd, &fds);
        errno =3D 0;
        r =3D select(gpsdata.gps_fd+1, &fds, NULL, NULL, &tv);
+       if (r >=3D 0 && exit_timer && time(NULL) >=3D exit_timer)
+               break;
        if (r =3D=3D -1 && errno !=3D EINTR) {
            (void)fprintf(stderr, "gpspipe: select error %s(%d)\n",
                          strerror(errno), errno);
--
quilt



From MAILER-DAEMON Mon Dec 11 18:02:35 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOX5m-0006DU-Vk
	for mharc-gpsd-dev@gnu.org; Mon, 11 Dec 2017 18:02:34 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42829)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1eOX5k-00061y-9D
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 18:02:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1eOX5j-0005RY-Cn
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 18:02:32 -0500
Received: from rellim.com ([2001:470:e815::19]:48917 helo=spidey.rellim.com)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <gem@rellim.com>) id 1eOX5j-0005K0-41
	for gpsd-dev@nongnu.org; Mon, 11 Dec 2017 18:02:31 -0500
Received: from spidey.rellim.com (dave.rellim.com
	[IPv6:2001:470:e815:0:0:0:0:19] (may be forged))
	(authenticated bits=0)
	by spidey.rellim.com (8.15.2/8.15.2) with ESMTPSA id vBBN2Cck008073
	(version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO)
	for <gpsd-dev@nongnu.org>; Mon, 11 Dec 2017 15:02:17 -0800
DKIM-Filter: OpenDKIM Filter v2.10.3 spidey.rellim.com vBBN2Cck008073
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=kong;
	t=1513033337; bh=CSmK1IA+sCg4mav+SpVkQfW4DC1dE+7lwjNFqjhPJ9g=;
	h=Date:From:To:Subject:In-Reply-To:References;
	b=V/I+b9XHk0Km8GpKFEJD2PinfGgDXZW/MtXBB9wycdKOJx0t6fNk4sJc/LJhmtu01
	fAEMP6+ilzAmt7d8S4zkuE9YlY3luScy1Cku506Ysfc2k0bLd0yqOMDrBP+HL5cChi
	9OmVfjNl+wqxTWzmC/TU7tQyFdds4MVJI2A0h6HQ=
Date: Mon, 11 Dec 2017 15:02:08 -0800
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd-dev@nongnu.org
Message-ID: <20171211150200.5ae351c1@spidey.rellim.com>
In-Reply-To: <20171211054528.GA8556@lordsutch.dyndns.org>
References: <20171211054528.GA8556@lordsutch.dyndns.org>
Organization: Rellim
X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	boundary="Sig_/x0=yRGcXeXvN1ZQ9Vme+ZkG";
	protocol="application/pgp-signature"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2
	(spidey.rellim.com [IPv6:2001:470:e815:0:0:0:0:19]);
	Mon, 11 Dec 2017 15:02:17 -0800 (PST)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2001:470:e815::19
Subject: Re: [gpsd-dev] [PATCH 1/3] Fix time display of UBX messages.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Dec 2017 23:02:33 -0000

--Sig_/x0=yRGcXeXvN1ZQ9Vme+ZkG
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yo Chris!

On Mon, 11 Dec 2017 00:45:28 -0500
Chris Lawrence <lordsutch@gmail.com> wrote:

> This is the first of three patches to gpsd I've produced while
> debugging issues with my u-blox GPS devices.

On first look, these look nice.  Thank you!

Have you run the gpsd regression tests on these?

Can you provide sample GPS output that tickles the new code?  That
way we can update our regressions as we add you code, and things tend
to stay working longer that way.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can=E2=80=99t measure it, you can=E2=80=99t improve it." - Lord=
 Kelvin

--Sig_/x0=yRGcXeXvN1ZQ9Vme+ZkG
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEENqCjEoytAEAuFCk8DQ7ZSUHRedgFAlovDnAACgkQDQ7ZSUHR
edixeAgAssqZhHVWOC0xWsQ2WmhtL2AlBytEUbvJ1F9Ud/EVnntc1IcgvKc41brw
jR48zMGrMB4QIGGjlAvyk4o5LJnSVmxnm1A5P87DyKtH2hiU/8wAaIJmCjP46UtS
F/NUV9O0CZ12gfJeSG1um2Rkaw5fJ/Q3t9hNbdfMVrRxzZSUCXy4sSRHaYtrh45Q
4X2lvQODgr9chC4pMvjOnmByld36Z4Sbi7y4UqblCi/mORQ7qJVE1SfDWnjV4t6p
aZDgnsb7hbW0CZhTahzCF07l72ukO8sKiHpmKY3V6oNskYef525y19vZlCwwVsQV
XBabWaC5mxR4s7UuinHFrMX2mmRE0Q==
=L5t6
-----END PGP SIGNATURE-----

--Sig_/x0=yRGcXeXvN1ZQ9Vme+ZkG--


From MAILER-DAEMON Tue Dec 12 05:20:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOhfl-000882-G4
	for mharc-gpsd-dev@gnu.org; Tue, 12 Dec 2017 05:20:25 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54842)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jp.tosoni@acksys.fr>) id 1eOhfe-00085n-4H
	for gpsd-dev@nongnu.org; Tue, 12 Dec 2017 05:20:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jp.tosoni@acksys.fr>) id 1eOhfa-0002XN-Q9
	for gpsd-dev@nongnu.org; Tue, 12 Dec 2017 05:20:18 -0500
Received: from mail-eopbgr50134.outbound.protection.outlook.com
	([40.107.5.134]:5399
	helo=EUR03-VE1-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <jp.tosoni@acksys.fr>) id 1eOhfZ-0002V3-W1
	for gpsd-dev@nongnu.org; Tue, 12 Dec 2017 05:20:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=ACKSYS.onmicrosoft.com; s=selector1-acksys-fr;
	h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
	bh=C5rkkckinQTsXEXiW9uKtXVkOtcqa3W5mDlr81XUimg=;
	b=w5cwIGJhKo+JUIeTWwG9yPxwJ2T8Smotb1vvlle7zJP7z6qp0xiEoHEKpEREcd8alg/W7GEeiO//4piYXqBgmmPfMcHYXNDCN4DTiVhwhGLD1R0Ng6pjfwjr7gV14RY1l8PB1/3hjbT6LtbTgIny+/cAA/94vOzg3HzXb18khow=
Received: from DB3PR0102MB3531.eurprd01.prod.exchangelabs.com (52.134.65.156)
	by DB3PR0102MB3531.eurprd01.prod.exchangelabs.com (52.134.65.156)
	with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9;
	Tue, 12 Dec 2017 10:20:06 +0000
Received: from DB3PR0102MB3531.eurprd01.prod.exchangelabs.com
	([fe80::f:3b8b:fb84:e6f7]) by
	DB3PR0102MB3531.eurprd01.prod.exchangelabs.com
	([fe80::f:3b8b:fb84:e6f7%13]) with mapi id 15.20.0302.014;
	Tue, 12 Dec 2017 10:20:05 +0000
From: Jean Pierre TOSONI <jp.tosoni@acksys.fr>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [patch v2] gpspipe improvement: add option to exit after delay
Thread-Index: AdNzLt3w3rFvrkZuT8qc10XAdt61Tg==
Date: Tue, 12 Dec 2017 10:20:05 +0000
Message-ID: <DB3PR0102MB35318060845A62B6E19A7534E4340@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
	smtp.mailfrom=jp.tosoni@acksys.fr; 
x-originating-ip: [195.6.104.67]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DB3PR0102MB3531;
	6:qiUFN4H6yMsom5WzBhEbvFoaEEgrpMttm5lqxitWV50UhWVFb4lnxxfVSE4rvNfQFS0E7lWDy0iG5mH8oqXpkKypoTTWIUZtIYZy2pyuQk5NnEY76lryjed5mT9Qc9fwLkX3VTCWJ2okeTaa+gODrWzvRrNJp4NHP0CzsW9qLxDMgBHlODswFeNVr8Xbf01z3pznqCykaip9glMih4HTGKLRUd8JceOPgJCsMqA6/H76wIm9gEu45yYq44svwseFLI5hNoWXlP5xajCC0SP8u7zNSjBKfwNr6wcAeeDsKqbLuhOQ/PNwD4zbrFECQBRDFQBzaWd3eyvHWfo0m2LuSz4oMDonBXXjTHRC1e493iQ=;
	5:6Q4W5ZJyctyJqNRobiLVs0ENR0DCTeciyhME7W+Jqhq5ORM1vudDgy1n27rn0MSNec7sRfGgQO9/DxOFpSi7cvDjh5WVkbDNdep2ZF7TGm+IXr2Ha3qWyuyF/T4/GFaz/VkKFGjgpi6kWUxG1aCb9p4rMyvcnqE8yfHH+tu1ibM=;
	24:IgyCqIfDY5nW7ZXE8wIcg9vN7vesesenM8oMkbpSUwuK39bR04po+V1omuKjnObMffoRGDZIpQDYCnfxwDILJSO6I+8G4n3WIUHTZHZjmA0=;
	7:InPaASuz4cDxbUSaamvoHcs60Kt3MePVlV2iwqjxrPOBR0bCVkTIE1Re/nUeUHVndAXDr4VN+Ll2jPPISAGgbDZDM9IhdJRviH0bjimsZRTfXytFBMCFHVTCsHyXapJz6AvvvwbbLv7YdJ7pBKTUg3StejpgQ/wdchSCY4tGDflFwSxHWPL7cG8a6pBy2bGsZT7sIULG6EuinhmUZR9K4hxa68jjMYoLuhgY49oKQ08gTpdhBkd+D4ANFOxz9olQ
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 3786b985-1009-4dec-b0e3-08d54149ea2b
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(4534020)(4602075)(4603075)(4627115)(201702281549075)(5600026)(4604075)(2017052603307);
	SRVR:DB3PR0102MB3531; 
x-ms-traffictypediagnostic: DB3PR0102MB3531:
x-microsoft-antispam-prvs: <DB3PR0102MB3531EF86C82DAEC6ACB752DCE4340@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(265634631926514)(21532816269658); 
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(2016111802025)(20161123564025)(20161123560025)(6043046)(6072148)(201708071742011);
	SRVR:DB3PR0102MB3531; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:DB3PR0102MB3531; 
x-forefront-prvs: 051900244E
x-forefront-antispam-report: SFV:NSPM;
	SFS:(10019020)(346002)(366004)(376002)(199004)(189003)(316002)(33656002)(99286004)(2906002)(2900100001)(8936002)(5660300001)(14454004)(97736004)(53936002)(9686003)(7736002)(7696005)(74316002)(6116002)(3846002)(102836003)(68736007)(2501003)(305945005)(59450400001)(25786009)(81166006)(66066001)(81156014)(8676002)(86362001)(5250100002)(6916009)(106356001)(478600001)(6436002)(55016002)(5640700003)(2351001)(74482002)(105586002)(3280700002)(3660700001)(6506006);
	DIR:OUT; SFP:1102; SCL:1; SRVR:DB3PR0102MB3531;
	H:DB3PR0102MB3531.eurprd01.prod.exchangelabs.com; FPR:; SPF:None;
	PTR:InfoNoRecords; A:1; MX:1; LANG:en; 
received-spf: None (protection.outlook.com: acksys.fr does not designate
	permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: acksys.fr
X-MS-Exchange-CrossTenant-Network-Message-Id: 3786b985-1009-4dec-b0e3-08d54149ea2b
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Dec 2017 10:20:05.9474 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f18a6414-d5f3-4b5c-9345-f30c01d87e32
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0102MB3531
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.107.5.134
Subject: [gpsd-dev] [patch v2] gpspipe improvement: add option to exit after
 delay
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Dec 2017 10:20:24 -0000

If the GPS receiver cease to supply data to gpsd, gpspipe hangs indefinitel=
y waiting for gpsd.

This can happen if the GPS is turned off by external means, e.g. by an AT c=
ommand on the command port of a cellular card.

In order to use gpspipe to get a fix within a bound time, this patch adds a=
n option to specify a timout, so that one can do things like:
	$ x=3D$(gpspipe -x 5 -w|sed -n '/TPV/{p;q}') And get either the first TPV =
or an empty string if no fix is available.

Update the documentation accordingly.
---
V2:
Added documentation (gpspipe.1, gpspipe.xml).
This patch applies to version 3.17.
(note: not sure I must patch gpspipe.1, it appears in the download package =
but not in the git repo... I am working on a package downloaded from Savann=
ah.non-gnu.org by the OpenWRT framework)

--- a/gpspipe.c
+++ b/gpspipe.c
@@ -126,6 +126,7 @@ static void usage(void)
 		  "-u usec time stamp, implies -t. Use -uu to output sec.usec\n"
 		  "-s [serial dev] emulate a 4800bps NMEA GPS on serial port (use with '=
-r').\n"
 		  "-n [count] exit after count packets.\n"
+		  "-x [seconds] Exit after given delay.\n"
 		  "-v Print a little spinner.\n"
 		  "-p Include profiling info in the JSON.\n"
 		  "-P Include PPS JSON in NMEA or raw mode.\n"
@@ -149,6 +150,7 @@ int main(int argc, char **argv)
     bool profile =3D false;
     int option_u =3D 0;                   // option to show uSeconds
     long count =3D -1;
+    time_t exit_timer =3D 0;
     int option;
     unsigned int vflag =3D 0, l =3D 0;
     FILE *fp;
@@ -160,7 +162,7 @@ int main(int argc, char **argv)
     char *outfile =3D NULL;
=20
     flags =3D WATCH_ENABLE;
-    while ((option =3D getopt(argc, argv, "?dD:lhrRwStT:vVn:s:o:pPu2")) !=
=3D -1) {
+    while ((option =3D getopt(argc, argv, "?dD:lhrRwStT:vVx:n:s:o:pPu2")) =
!=3D -1) {
 	switch (option) {
 	case 'D':
 	    debug =3D atoi(optarg);
@@ -220,6 +222,9 @@ int main(int argc, char **argv)
 	    (void)fprintf(stderr, "%s: %s (revision %s)\n",
 			  argv[0], VERSION, REVISION);
 	    exit(EXIT_SUCCESS);
+	case 'x':
+	    exit_timer =3D time(NULL) + strtol(optarg, 0, 0);
+	    break;
 	case 's':
 	    serialport =3D optarg;
 	    break;
@@ -319,6 +324,8 @@ int main(int argc, char **argv)
 	FD_SET(gpsdata.gps_fd, &fds);
 	errno =3D 0;
 	r =3D select(gpsdata.gps_fd+1, &fds, NULL, NULL, &tv);
+	if (r >=3D 0 && exit_timer && time(NULL) >=3D exit_timer)
+		break;
 	if (r =3D=3D -1 && errno !=3D EINTR) {
 	    (void)fprintf(stderr, "gpspipe: select error %s(%d)\n",
 			  strerror(errno), errno);
--- a/gpspipe.1
+++ b/gpspipe.1
@@ -31,7 +31,7 @@
 gpspipe \- tool to connect to gpsd and retrieve sentences
 .SH "SYNOPSIS"
 .HP \w'\fBgpspipe\fR\ 'u
-\fBgpspipe\fR [\-h] [\-d] [\-l] [\-o\ \fIfilename\fR] [\-n\ \fIcount\fR] [=
\-r] [\-R] [\-s\ \fIserial\-device\fR] [\-t] [\-T\ \fItimestamp\-format\fR]=
 [\-u] [\-p] [\-w] [\-S] [\-2] [\-v] [\-D\ \fIdebug\-level\fR] [\fIserver\f=
R [\fI:port\fR [\fI:device\fR]]]
+\fBgpspipe\fR [\-h] [\-d] [\-l] [\-o\ \fIfilename\fR] [\-n\ \fIcount\fR] [=
\-x\ \fIduration\fR] [\-r] [\-R] [\-s\ \fIserial\-device\fR] [\-t] [\-T\ \f=
Itimestamp\-format\fR] [\-u] [\-p] [\-w] [\-S] [\-2] [\-v] [\-D\ \fIdebug\-=
level\fR] [\fIserver\fR [\fI:port\fR [\fI:device\fR]]]
 .SH "DESCRIPTION"
 .PP
 gpspipe
@@ -48,7 +48,7 @@ without causing problems\&.
 .PP
 The output will consist of one or both of the raw NMEA or native
 gpsd
-sentences\&. Each line can be optionally time stamped\&. There is also an =
option to exit gracefully after a given count of packets\&.
+sentences\&. Each line can be optionally time stamped\&. There are also op=
tions to exit gracefully after a given count of packets or a given delay\&.
 .PP
 Optionally a server, TCP/IP port number and remote device can be given\&. =
If omitted,
 gpspipe
@@ -108,6 +108,10 @@ for the available placeholders\&. Settin
 gpspipe
 will then exit gracefully\&.
 .PP
+\-x [duration] exits gracefully after given [duration], even if nothing wa=
s received\&.
+Duration is in seconds with a margin of about 1 second\&.
+This delay starts counting after the optional 10s initial sleep (option -l=
)\&.
+.PP
 \-v causes
 gpspipe
 to show a spinning activity indicator on stderr\&. This is useful if stdou=
t is redirected into a file or a pipe\&. By default the spinner is advanced=
 with every messages written; specifying \-v more than once will double the=
 number of messages required to rotate the spinner\&.
--- a/gpspipe.xml
+++ b/gpspipe.xml
@@ -27,6 +27,7 @@ BSD terms apply: see the file COPYING in
       <arg choice=3D'opt'>-l</arg>
       <arg choice=3D'opt'>-o <replaceable>filename</replaceable></arg>
       <arg choice=3D'opt'>-n <replaceable>count</replaceable></arg>
+      <arg choice=3D'opt'>-x <replaceable>duration</replaceable></arg>
       <arg choice=3D'opt'>-r</arg>
       <arg choice=3D'opt'>-R</arg>
       <arg choice=3D'opt'>-s <replaceable>serial-device</replaceable></arg=
>
@@ -61,8 +62,8 @@ to the local <application>gpsd</applicat
=20
 <para>The output will consist of one or both of the raw NMEA or native
 <application>gpsd</application> sentences.  Each line can be optionally
-time stamped.  There is also an option to exit gracefully after a
-given count of packets.</para>
+time stamped.  There are also options to exit gracefully after a
+given count of packets or a given duration.</para>
=20
 <para>Optionally a server, TCP/IP port number and remote device can be giv=
en.
 If omitted, <application>gpspipe</application> connects to localhost on
@@ -124,6 +125,10 @@ Default setting is "%F %T"</para>
 <para>-n [count] causes [count] sentences to be output.
 <application>gpspipe</application> will then exit gracefully.</para>
=20
+<para>-x [duration] exits gracefully after given [duration], even if nothi=
ng was received.
+Duration is in seconds with a margin of about 1 second.
+This delay starts counting after the optional 10s initial sleep (option -l=
).</para>
+
 <para>-v causes <application>gpspipe</application> to show a spinning
 activity indicator on stderr. This is useful if stdout is redirected
 into a file or a pipe. By default the spinner is advanced with every
--
quilt



From MAILER-DAEMON Tue Dec 12 08:30:43 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eOkdv-0003ct-G3
	for mharc-gpsd-dev@gnu.org; Tue, 12 Dec 2017 08:30:43 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51132)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jp.tosoni@acksys.fr>) id 1eOkdt-0003cT-Ll
	for gpsd-dev@nongnu.org; Tue, 12 Dec 2017 08:30:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jp.tosoni@acksys.fr>) id 1eOkdq-0006cC-Hx
	for gpsd-dev@nongnu.org; Tue, 12 Dec 2017 08:30:41 -0500
Received: from mail-eopbgr10097.outbound.protection.outlook.com
	([40.107.1.97]:34560
	helo=EUR02-HE1-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <jp.tosoni@acksys.fr>) id 1eOkdq-0006Zc-2b
	for gpsd-dev@nongnu.org; Tue, 12 Dec 2017 08:30:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=ACKSYS.onmicrosoft.com; s=selector1-acksys-fr;
	h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
	bh=dJlLhAjGkwGXyslDTVN+G90DsqtXXZNOdaY+Y8DkGSo=;
	b=QmIsWJfkWPEa0nfCGyGGe/iG+TV9AAALcnvKci03bjHlr+pM62SKtf/P5h+QvbEf9IICcVVQu3Ra9LgpHOzlhpzz5s3eZgBoBf/f3AePrzvlVZ4Zzx7FRxgn/qk3eLevDw4a8b7NZZwtJ2iQp79z4x7FIdapdaQgSEpLORN1Uig=
Received: from DB3PR0102MB3531.eurprd01.prod.exchangelabs.com (52.134.65.156)
	by DB3PR0102MB3530.eurprd01.prod.exchangelabs.com (52.134.65.155)
	with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9;
	Tue, 12 Dec 2017 13:30:34 +0000
Received: from DB3PR0102MB3531.eurprd01.prod.exchangelabs.com
	([fe80::f:3b8b:fb84:e6f7]) by
	DB3PR0102MB3531.eurprd01.prod.exchangelabs.com
	([fe80::f:3b8b:fb84:e6f7%13]) with mapi id 15.20.0302.014;
	Tue, 12 Dec 2017 13:30:34 +0000
From: Jean Pierre TOSONI <jp.tosoni@acksys.fr>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: compile error when ublox is off
Thread-Index: AdNzTCaEhExjen9fShmCe9qA1ZgFMQ==
Date: Tue, 12 Dec 2017 13:30:34 +0000
Message-ID: <DB3PR0102MB3531463F8C0C3534B8456D1DE4340@DB3PR0102MB3531.eurprd01.prod.exchangelabs.com>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
	smtp.mailfrom=jp.tosoni@acksys.fr; 
x-originating-ip: [195.6.104.67]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DB3PR0102MB3530;
	6:UYdc50IHpEmKeca4tkRSdW9kZF6avXOlIX+su/aFUb9slRczuzHxUEGxmBW8Re1IBY+M80bvzTuUgL4XEqvAVpYp+7mW4AA49Ml+u6gBd904qfYwlbmb5U4KmASXnqFod0bgtN2ppFfOB+Y5V5lie5FBXcwQdqf5aURASE5BrgC1YUxF6JEoCx3qKOkd0rlPypYYx2Wg5mMrOZeqtXPfgbpOqKImqd5t0Ua+B/gM58anjzziBpkQyCEoHmHC9R+7vXRHBrvtY5es7xXudzsIJrRYvRvfpOKP0dQpmwUarqzOQs7jl7pZ6DHZlcQ2iAXNinU1TAeiaHE0Ve3H0c6++1NANed5LibmDWzfUw7f+60=;
	5:HvKHaI7PHVntCGRxmJ4p/A2e9xtVrCRWxhzSczz9arm+8HWIvdYq6lmwDuopE1vGwzmcbj+Jvid8RQhmu9kiAtv9MOiPoOwHdKM+1HnPRGI4uScQkTSGNqqtAUjaDmtZUt6jvFN2Rm7eQGhFmIwqqyOBDxyk70A7JGBKROdk52k=;
	24:zamXSLmrCAPU2L+NvSPI7APEaubLER6ylM3lOc1frXuBNPRy0C/Chf4lPoYq1jB3gI7p+Zsk5xmlywDGUIkfRgtcSVRaoJYGZG7SrDcybtc=;
	7:BtFkSvmelamFVKwj4VQ2C9HV2/DHuxPGsaIPQAcaeNLWRyWDndNFLa3qcOGEXWgsDb+Hcvt7wvqS3Y+7NEgWl33yB+UQf840He/0TSZw+kM5kvwGx6Ko58IGSKI8HS+QCtuXuRQH/BOctJ8kZahcLpmnrMgL4XvlqlOISZKEAMouazcQpyr8H6K1RsyoDhxyCucYMrqNXxcAe0U9P6EkLhQyulwCgamwYYiL6T5PXooG4WelPNE4FJ+Sjg2+zuQr
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: ad9499a6-aaf6-4c3e-9fd7-08d541648608
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(4534020)(4602075)(4603075)(4627115)(201702281549075)(5600026)(4604075)(2017052603307);
	SRVR:DB3PR0102MB3530; 
x-ms-traffictypediagnostic: DB3PR0102MB3530:
x-microsoft-antispam-prvs: <DB3PR0102MB353015ECEEE32F2F2A827505E4340@DB3PR0102MB3530.eurprd01.prod.exchangelabs.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
	RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231023)(3002001)(6041248)(2016111802025)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6043046)(6072148)(201708071742011);
	SRVR:DB3PR0102MB3530; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:DB3PR0102MB3530; 
x-forefront-prvs: 051900244E
x-forefront-antispam-report: SFV:NSPM;
	SFS:(10019020)(366004)(346002)(376002)(39830400002)(189003)(199004)(99286004)(316002)(53936002)(106356001)(105586002)(33656002)(55016002)(2906002)(5250100002)(478600001)(3660700001)(2351001)(6506006)(6436002)(81166006)(81156014)(6116002)(3846002)(102836003)(3280700002)(74316002)(9686003)(66066001)(68736007)(305945005)(8676002)(25786009)(7736002)(5640700003)(2501003)(8936002)(6916009)(97736004)(7696005)(14454004)(74482002)(2900100001)(5660300001)(86362001);
	DIR:OUT; SFP:1102; SCL:1; SRVR:DB3PR0102MB3530;
	H:DB3PR0102MB3531.eurprd01.prod.exchangelabs.com; FPR:; SPF:None;
	PTR:InfoNoRecords; MX:1; A:1; LANG:en; 
received-spf: None (protection.outlook.com: acksys.fr does not designate
	permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: acksys.fr
X-MS-Exchange-CrossTenant-Network-Message-Id: ad9499a6-aaf6-4c3e-9fd7-08d541648608
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Dec 2017 13:30:34.3102 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f18a6414-d5f3-4b5c-9345-f30c01d87e32
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0102MB3530
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.107.1.97
Subject: [gpsd-dev] compile error when ublox is off
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Dec 2017 13:30:42 -0000

Hello list,

I began using v3.17.
I just tried to compile gpsd with SConstruct option "ublox=3Dno" (to save s=
pace in binary), and I get this error:
	./libgpsd.a(drivers.o): In function `isync_event_hook':
	drivers.c:(.text+0x5e0): undefined reference to `ubx_write'
	drivers.c:(.text+0x604): undefined reference to `ubx_write'

Version 3.16 did compile properly.

In drivers.c there are two calls to ubx_write, there was only one in v3.16.
The legacy one is protected against compilation with an ifdef, but not the =
new one.

However, since this looks like a state machine, I dare not "ifdef" out the =
offending code, since it could have unpredictable side effects (going to an=
 unmanaged state...)

Any suggestion?


From MAILER-DAEMON Thu Dec 14 19:56:02 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ePeIE-0002DX-Ii
	for mharc-gpsd-dev@gnu.org; Thu, 14 Dec 2017 19:56:02 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55702)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <max.schulze@online.de>) id 1ePcHg-0008Ng-Mu
	for gpsd-dev@nongnu.org; Thu, 14 Dec 2017 17:47:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <max.schulze@online.de>) id 1ePcHd-0005nb-LM
	for gpsd-dev@nongnu.org; Thu, 14 Dec 2017 17:47:20 -0500
Received: from mout.kundenserver.de ([212.227.126.131]:58850)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <max.schulze@online.de>)
	id 1ePcHd-0005mN-Cw
	for gpsd-dev@nongnu.org; Thu, 14 Dec 2017 17:47:17 -0500
Received: from [192.168.2.107] ([217.233.200.7]) by mrelayeu.kundenserver.de
	(mreue002 [212.227.15.167]) with ESMTPSA (Nemesis) id
	0LpCLN-1evd702fOn-00f7um for <gpsd-dev@nongnu.org>;
	Thu, 14 Dec 2017 23:47:15 +0100
To: gpsd-dev@nongnu.org
From: Max Schulze <max.schulze@online.de>
Message-ID: <91eef5e7-f789-1188-fa99-4f891e6e550b@online.de>
Date: Thu, 14 Dec 2017 23:47:15 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Language: de-LU
X-Provags-ID: V03:K0:B6vujD6mqgyR0Ax2zxhGD+LeXnhIiqT9w6K0ZHAGXOSvaC15WCo
	uAQZ5Eu6lRBh0Jfp6XOKvDJBB53+SCwtgSx156EBY2ajrsul2j+ftUXBW/4v0hP/OJ/xFA7
	epp7mpnWwm2tCgkro1LM4iGJNIQ52Y5M92vCWpETKLI6pC4M1H0feu+2sR4qA6sB2yVlDGw
	72UPwE0n4dUYR0hdbbwzw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:XgJCDKDMTJI=:Wc80MFMMisGPeQYLFPke9O
	S25oAIiqEzeba3sOuwyHg0BkxLATnx5keNOSPecgpy0xFkixzZFbdLhsTfEVlOON4pvKY4GRq
	YS9hUeR72ciIEhFDB8y746W9zVnsMP8XqEGyaHjD8wwAUDmxevOWdIrRSnX84U44JWPm93B8J
	vGxtSKdUJ+NTjBxvzh7dwSZ7Bs0n4q14KMgCAxgiqyM3dQSpu76KQUBkQy6sH2pe/f5rWNnii
	oJalqfKS3HC+gMaaWH9oE/FVI2fZwgTYj2g28Kq2t2JhdMQ79krz/V6+QLmTPViDT2FOYRzZJ
	FK5FBmpSAg+GnnB3fbpKqEzinAz47JDaSelvnKrbevHFwOUaSBu53ouBhDK+au6L+2/O5U4io
	90wmcMxKExcyGqVGUkPaYRBDZFGMipZcct/FzJpL/03zFQId0AJ+uZKwvWNaiO9xExs4VrCEj
	B7V+HErvAZNyrVDbMlmy2I1q1vSdjfHj3zwEw9/IspyVUCA/dwcLp++xbxuNOFWNBCHYqh3j4
	Bzf2Ow+p01BBOyVLCYJSD1Y8ii4EoyVil//SQeNHssZ0qfokAfAMD0B/mi6TFphqcHaI7l/VK
	/ebk4OOsW/rNAhD99UpOmxPjypV3KID7aCJiJtSUMnqDUIzRgDEUhljWHbUJ0ZHZP97V3etNq
	PG762mgqSXYVKU3GLWzq6O62KXY2xb66lfnUuV30ErVgioVFffdPAswATemocL+AByq5wzWdh
	+MKwJs2X4nR66cN33z4E/dmkBBJ3B1+FEgbBBnqq1g2U9EdwHFWWen3NIkA=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 212.227.126.131
X-Mailman-Approved-At: Thu, 14 Dec 2017 19:56:00 -0500
Subject: [gpsd-dev] RTCM Format Specification in Ntrip Sourcetable
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Dec 2017 22:47:21 -0000

Hello,

When inspecting the error 

gpsd:ERROR: Ntrip stream STR;VRS_3_2G format not supported

for the Casterlist containing

STR;VRS_3_2G;SAPOS_VRS_3;RTCM3.1;1004(1), 1005/1006, 1007/1008, 1012(1),
1021, 1023, 1025, 1030, 1031, 1032,
1033;2;GPS+GLO;AdV;DEU;52.48;13.30;1;1;;none;B;Y;2000;

I found they specify the Stream as ";RTCM3.1;", whereas in net_ntrip.c
gpsd expects "RTCM 3.1" with a space between.

What is the reasoning for gpsd to do so? Does anyone have a copy of the
RTCM standard to look up whats "right"? Should I complain to them or
could gpsd just be made to trim out spaces?

Best regards,

M Schulze



From MAILER-DAEMON Thu Dec 14 20:11:39 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ePeXL-0000Iu-HX
	for mharc-gpsd-dev@gnu.org; Thu, 14 Dec 2017 20:11:39 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33645)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1ePeXJ-0000In-3S
	for gpsd-dev@nongnu.org; Thu, 14 Dec 2017 20:11:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1ePeXI-0007Ws-0k
	for gpsd-dev@nongnu.org; Thu, 14 Dec 2017 20:11:37 -0500
Received: from rellim.com ([2001:470:e815::19]:60179 helo=spidey.rellim.com)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <gem@rellim.com>) id 1ePeXH-0007NO-P2
	for gpsd-dev@nongnu.org; Thu, 14 Dec 2017 20:11:35 -0500
Received: from spidey.rellim.com (rellim.com [IPv6:2001:470:e815:0:0:0:0:19])
	(authenticated bits=0)
	by spidey.rellim.com (8.15.2/8.15.2) with ESMTPSA id vBF1BHtI006741
	(version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO)
	for <gpsd-dev@nongnu.org>; Thu, 14 Dec 2017 17:11:23 -0800
DKIM-Filter: OpenDKIM Filter v2.10.3 spidey.rellim.com vBF1BHtI006741
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=kong;
	t=1513300283; bh=eNJYKwCoTUhHNQ2SIqfEw9Bzpqw4OxfuRQ9dmmWar4Q=;
	h=Date:From:To:Subject:In-Reply-To:References;
	b=f0zjahHKG7q6SDFnrKpYPZBvLy4Y4ZgttIkZwfQhuzWOwJrN1jbVoe4O0euvl5T9h
	fkctGY0xAiMJ8K71mTUBASRi+GXxJSKiCOnU5V3Eip6bsPV1TCDgcDgZqjV99ZCiEJ
	s/TVWCMY1jYl/RO4ZP7NC7BGupSq434VVQ7YAQWA=
Date: Thu, 14 Dec 2017 17:11:17 -0800
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd-dev@nongnu.org
Message-ID: <20171214171117.03e7b675@spidey.rellim.com>
In-Reply-To: <91eef5e7-f789-1188-fa99-4f891e6e550b@online.de>
References: <91eef5e7-f789-1188-fa99-4f891e6e550b@online.de>
Organization: Rellim
X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	boundary="Sig_/WoXq2Lwz2YGlob+kiCtiJf5";
	protocol="application/pgp-signature"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2
	(spidey.rellim.com [IPv6:2001:470:e815:0:0:0:0:19]);
	Thu, 14 Dec 2017 17:11:23 -0800 (PST)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2001:470:e815::19
Subject: Re: [gpsd-dev] RTCM Format Specification in Ntrip Sourcetable
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Dec 2017 01:11:38 -0000

--Sig_/WoXq2Lwz2YGlob+kiCtiJf5
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yo Max!

On Thu, 14 Dec 2017 23:47:15 +0100
Max Schulze <max.schulze@online.de> wrote:

> gpsd:ERROR: Ntrip stream STR;VRS_3_2G format not supported
>=20
> for the Casterlist containing
>=20
> STR;VRS_3_2G;SAPOS_VRS_3;RTCM3.1;1004(1), 1005/1006, 1007/1008,
> 1012(1), 1021, 1023, 1025, 1030, 1031, 1032,
> 1033;2;GPS+GLO;AdV;DEU;52.48;13.30;1;1;;none;B;Y;2000;
>=20
> I found they specify the Stream as ";RTCM3.1;", whereas in net_ntrip.c
> gpsd expects "RTCM 3.1" with a space between.

Ouch.

> What is the reasoning for gpsd to do so? Does anyone have a copy of
> the RTCM standard to look up whats "right"? Should I complain to them
> or could gpsd just be made to trim out spaces?

Here is a link to RTCM 3.1

https://www.scribd.com/document/118478603/RTCM-3-1

gpsd is worried less about the 'right' format than about supporting
real world data streams.

Can you send a typical RTCM stream you are seeing?  Maybe 50 lines or
so.  Then it can be added to the gpsd regressions and support for it can
added.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can=E2=80=99t measure it, you can=E2=80=99t improve it." - Lord=
 Kelvin

--Sig_/WoXq2Lwz2YGlob+kiCtiJf5
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEENqCjEoytAEAuFCk8DQ7ZSUHRedgFAlozITUACgkQDQ7ZSUHR
edh+twf/ZDB1Mrc7Fb7kxvrJWNBkJTy8gotDbTr/bCFf5j7jVJzpXrfOGo6GXFr7
KnSaljv5nGIDRnHXdNNyIt8JmX9fw3vLkz8CESY+uap4zOegp8gHz9DVlB3AVOy2
T9JQ2P5pb6uqDpMMYSWQMFHRyKkqzihDgpc3uGLdPvtoL3rfsHPOqKoCOmeCvV7S
gb5ZHgC/GkwHqMW8YDR8BMQ9xbGjSW2Ru+jewnSF1bIYf5au6yj9AW9LHV3EK2Uu
DvCO+N07j6g67Wut8QJ2MbEFaJJdp49ITo5eHcBngwu7pR9G9HLSSquWUdMstmHo
n6yNVYrVOF8rox8MaUBaADCxpO1M8g==
=S1x0
-----END PGP SIGNATURE-----

--Sig_/WoXq2Lwz2YGlob+kiCtiJf5--


From MAILER-DAEMON Fri Dec 15 15:57:09 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ePx2b-0005u0-NU
	for mharc-gpsd-dev@gnu.org; Fri, 15 Dec 2017 15:57:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52407)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <max.schulze@online.de>) id 1ePx2Z-0005ts-Mp
	for gpsd-dev@nongnu.org; Fri, 15 Dec 2017 15:57:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <max.schulze@online.de>) id 1ePx2W-0002BL-LW
	for gpsd-dev@nongnu.org; Fri, 15 Dec 2017 15:57:07 -0500
Received: from mout.kundenserver.de ([217.72.192.75]:64845)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <max.schulze@online.de>)
	id 1ePx2W-0002AJ-BL
	for gpsd-dev@nongnu.org; Fri, 15 Dec 2017 15:57:04 -0500
Received: from [192.168.2.107] ([217.233.200.7]) by mrelayeu.kundenserver.de
	(mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id
	0LlnHM-1ezHrC3ZOy-00ZLKm for <gpsd-dev@nongnu.org>;
	Fri, 15 Dec 2017 21:57:02 +0100
To: gpsd-dev@nongnu.org
References: <91eef5e7-f789-1188-fa99-4f891e6e550b@online.de>
	<20171214171117.03e7b675@spidey.rellim.com>
From: Max Schulze <max.schulze@online.de>
Message-ID: <e68864ed-4174-9c7f-abef-7fad177a416d@online.de>
Date: Fri, 15 Dec 2017 21:57:02 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <20171214171117.03e7b675@spidey.rellim.com>
Content-Type: multipart/alternative;
	boundary="------------93933DB2786B6F3C578CC5ED"
Content-Language: de-LU
X-Provags-ID: V03:K0:9I9q12h2wrq5vxCDfa8buCzCjl6d8Wl2KhpsSm3/tRqFFdtk+bX
	QqqzMknwXcyTDZHbpCzL+JX6bfCEnv6/pVsryep36L8IkgCu1LikEzHH1uC2HxDbchIdNzG
	LgBGpHKAgU78xDz0A59xGSLfsgGVxKRe6NDslqvwGft3dQj6SjcAxYtqS3LwVPR/jnH0ObA
	9e9cE//ty9TQuQDBLIL7w==
X-UI-Out-Filterresults: notjunk:1;V01:K0:4lKy6+YdHho=:ufcay/kxCCWLaEAYS7+Pjb
	AxE6CDhOVJQg3NM7LwWS/ZIE1YtDI8QzFU41db9sKx9OpfubWDRgFTzUjzruEGF8gWRSx4R7P
	21wCU9L3IIiPyFqRhP2i3nlpYHZKzLIVu+l2Roova3wRZlW4zPcdXCTWMHH8qHn0Tqv9abIHT
	2bVinPD7u+hoRHQ6cSuAkHHv71kseLNA3OuRzfCpaN+O3b0j6BrFy0NIT8E8er53HhMK2T1Wn
	mzSq2VgOeWGmN10foDlliPArIPMQ2ZDkZ5xopJ79PAu0KwoBM0eoavfo3DZF7NR478CzMRM38
	kDsodojQScUh6030SjjK1XWebO8LSipm0lMLrpLzP1AUg4GnrYy09INwnYnTyYZA35ElTsV3v
	44WvsCrvATn/7A/OoR51hBM1Z6A6MCgozVBKIwN9wiAd0a3AoSnxzDkW4W+fkFrlzC9HJzR2N
	ioSsVhRg0vtbXrl5Jr5+SimcRAyOFbaviMEbCxBTUEnXvWMekOdod3291Bll8HQLocI0HFp/b
	Z4/aAkKUaCF40LfY0F97q3sxB+wJu1ptQkifa+QKhmq1hHPDZmCC5fyoEx6f0XGkS+ENCBPoa
	D/iSMVjx4EhVtoJbvxa75Trku+wCtY3TH+btryQCZxJ1iydOSo4kt8egxee5XbneOLmxT3Rgs
	w16DucUBqy33ausDuUb7z25W4oNABUnx5Mo1JmJ7L1o0c8mLV8UmsRepUMkt7b179Age3gv8U
	M4Y1VkQ9Te1sjGVeZK3P2cLSRSlTPBVuB0GgJWESDRhCJjUgKx04/Ydr7kc=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 217.72.192.75
Subject: Re: [gpsd-dev] RTCM Format Specification in Ntrip Sourcetable
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Dec 2017 20:57:08 -0000

This is a multi-part message in MIME format.
--------------93933DB2786B6F3C578CC5ED
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

>> I found they specify the Stream as ";RTCM3.1;", whereas in net_ntrip.c
>> gpsd expects "RTCM 3.1" with a space between.
> Ouch.
>
As a follow-up, the software vendor considered this a bug and has
corrected it. So no explicit need for gpsd to support format
specifications without a space.

--------------93933DB2786B6F3C578CC5ED
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <blockquote type="cite"
      cite="mid:20171214171117.03e7b675@spidey.rellim.com">
      <blockquote type="cite" style="color: #000000;">
        <pre wrap="">I found they specify the Stream as ";RTCM3.1;", whereas in net_ntrip.c
gpsd expects "RTCM 3.1" with a space between.
</pre>
      </blockquote>
      <pre wrap="">Ouch.

</pre>
    </blockquote>
    As a follow-up, the software vendor considered this a bug and has
    corrected it. So no explicit need for gpsd to support format
    specifications without a space.<br>
  </body>
</html>

--------------93933DB2786B6F3C578CC5ED--


From MAILER-DAEMON Sun Dec 24 07:19:11 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eT5FH-0001ew-5E
	for mharc-gpsd-dev@gnu.org; Sun, 24 Dec 2017 07:19:11 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55072)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eT5FE-0001dF-GP
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 07:19:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eT5F9-0000tQ-Jp
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 07:19:08 -0500
Received: from mail-oln040092072020.outbound.protection.outlook.com
	([40.92.72.20]:27344
	helo=EUR03-VE1-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1eT5F9-0000qm-3o
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 07:19:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=R9M4gXdcwMHk5H0ZGCWmdIInouGogNhGq+BTTvchbOs=;
	b=sMOkTSRQDZ4TYNjG03lEalX3HimKncRdkCPplCu3zIaEzvVpeYbuPnIYhVUxF/ke+E3RHGN8Xxu0I1U5aQNOfcwz7S2eeTDcMAdJ2+RGje34jxOW5Wj/s7OYkfovvUHxDxU+qZN5VWxWrCvWV0COUqj7dHYzRw5hDvQrVSdrSOkezfhRE35W0hEUt1HOiu/BK2qCzYwiJ+z4HxtXjLgq4LYvOw3VPQywsxV6cIXbWdhAXpblc+hD2SN1daSz3P4EeEul/zwSdHDcCuQpg15E8tP7Y+MYL3rlcMzp39i2HF9roHDWrcXICDTRBfe39RuWJ+W4q36beXDqHtxo63H2Xw==
Received: from VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com
	(10.152.18.57) by VE1EUR03HT118.eop-EUR03.prod.protection.outlook.com
	(10.152.19.90) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.345.12;
	Sun, 24 Dec 2017 12:19:00 +0000
Received: from DB6P190MB0296.EURP190.PROD.OUTLOOK.COM (10.152.18.51) by
	VE1EUR03FT039.mail.protection.outlook.com (10.152.19.196) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
	15.20.345.12 via Frontend Transport; Sun, 24 Dec 2017 12:19:00 +0000
Received: from DB6P190MB0296.EURP190.PROD.OUTLOOK.COM
	([fe80::1115:b91c:92b3:5258]) by DB6P190MB0296.EURP190.PROD.OUTLOOK.COM
	([fe80::1115:b91c:92b3:5258%13]) with mapi id 15.20.0345.016;
	Sun, 24 Dec 2017 12:19:00 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: libGPS 3.17 Windows builds available on OBS
Thread-Index: AQHTfK65qyABpg+1UEqvr+CnwzP7oQ==
Date: Sun, 24 Dec 2017 12:19:00 +0000
Message-ID: <DB6P190MB02963A9B436A3FE26195D1AC8E000@DB6P190MB0296.EURP190.PROD.OUTLOOK.COM>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:F94AC03215575509141ED6782EA0DCFE7A521BF1B77664DA8B83542FFECB29C0;
	UpperCasedChecksum:63F9A9951DEAD94A97B31F8935D17AEDAAAF5EF1EAD2EA552658C3648182FA53;
	SizeAsReceived:6867; Count:44
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [TmtxvF7l2HrT80JxiMKOIgb4Dx3lOyLR]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VE1EUR03HT118;
	6:eHCS8NqxLsJBsEMBbGbDCmgyZGCz1Q5cKf+fy7WpYOXDaGPmvdZv2SM29b0g5qwoWIuINZu8caso3WwB3zlRnQoByedjtYGH7G3jm7qnq1wbtyQ6R5oylhA7HHKHe4d+gBcNpVy1dkURZxo8+LfIowGmKk3tGHD66aN9SC1m0HqIX2ECFUYdiwKV1YyEJc4OwvvG2sAopRwfMYddWp3rvYQ45hI2uCPb1C3Y1KY61EPicxlHODeHzES6Bx+PQVaY+wNzxFCFhKV2Md719cgH7VMifvpozwi6ZYO5J1iiVCHgeYH1d4omS+3IRdP1xyRR+Kf2QuujWqoqAzQ1F6q/oqHOVZixWP8QT82kW98mC9w=;
	5:zHIbujQkagUqiK6cIspr6iCB94GG3DGjvnnFom5HO2I0mHo1CgpzVZ0o1nRAzfyyZxHMoYAzHdEZkWcvDKCeSDR5XHdxY3WFY8kvUWUdhkTv4ixIiC64OOIy0YQIUnKA6GTp/o4bZ4tbPV67pOXXBga+bR5/otCuoWXMSn7WWT0=;
	24:sJTfFqiQFQT2JuKywVppeQQCzpFYkZ+pVHP6yT2eGktvsV7cmIKbJFPM4cGNi3ijj5c2q5HTbPEncmvCrYcljBTXDF5/HX0LEcawN7QN9t0=;
	7:HbublSmC/B9otZ7YojC7RFN9ICTkyUhw3pb7BsEXsfOaBqC4PA1mzN2ksQG1U9OdHmUgM+WeXp1DOlDouan7RtAcLwhL5p4/+imwhzjKqs1oTbW7fc2kKPVJdFK/9EiJaWpuQQe9Kjla+rTWGyZpiIEUA4JU5reWWsOStP5mVwJrcAx7HpVA85hhu3Nkqy8VQsEQNvOaWuV4Uslls6qM9JMrFN0+P3X6iuPgOrxnUYBy+r3yBDOKOR8dByUXiAm+
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045);
	SRVR:VE1EUR03HT118; 
x-ms-traffictypediagnostic: VE1EUR03HT118:
x-ms-office365-filtering-correlation-id: e2dcc54d-70cc-4cb3-817d-08d54ac88386
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031);
	SRVR:VE1EUR03HT118; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:VE1EUR03HT118; 
x-forefront-prvs: 05315CBE52
x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT;
	SFP:1901; SCL:1; SRVR:VE1EUR03HT118;
	H:DB6P190MB0296.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e2dcc54d-70cc-4cb3-817d-08d54ac88386
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Dec 2017 12:19:00.2713 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT118
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.92.72.20
Subject: [gpsd-dev] libGPS 3.17 Windows builds available on OBS
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Dec 2017 12:19:09 -0000

Just a heads up notice that libgps.dll and a few command line utilities (te=
st_libgps.exe, gpxlogger.exe and gpspipe.exe) are available for Windows.

They are built in the openSUSE Build Service - 32bit and 64bit versions.

https://build.opensuse.org/package/show/windows:mingw:win32/mingw32-libgps
+
https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-libgps

If you're not using an openSUSE distribution, you can get the binary files =
by downloading an RPM
and using an uncompress program (e.g. file-roller or 7-zip etc...) to manua=
lly extract the file(s) within the RPM file structure.
To get an RPM goto the 'Download package' link from the above links, select=
 openSUSE operating system and then 'Grab binary packages directly'.

Unfortunately the build is not quite a pristine 3.17 version, as I needed 2=
 patches to make the build work:
1. Is a scons hack for the cross building mechanism (just changes in the SC=
onstruct file), which I mentioned some time ago on this mailing list.
I have no intention for this be in the formal gpsd source.

2. A small build for Windows fix to gpspipe.c - previously the code built O=
K on my (older) openSUSE instance, but it failed on the OBS instances.
I'll post this fix here for inclusion in gpsd.

--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.


From MAILER-DAEMON Sun Dec 24 07:20:58 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eT5H0-0002CK-El
	for mharc-gpsd-dev@gnu.org; Sun, 24 Dec 2017 07:20:58 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56476)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eT5Gy-0002Bv-Ut
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 07:20:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eT5Gv-0002HJ-S5
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 07:20:56 -0500
Received: from mail-oln040092071095.outbound.protection.outlook.com
	([40.92.71.95]:14089
	helo=EUR03-DB5-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1eT5Gv-0002GB-L3
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 07:20:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=Y8w1sEehanQ7HvbVSPDXAmhBNX63d0kyq862OxlNiPg=;
	b=Sz7c0r58Oqkg+ylfG5riiMNtinT005rFGmqR2qW7FhfiSwk74cXVE1LoCfkSeGTwBpdZ+AsI1KETJ8KWO4ZeY/Q2XjPu41PyjlW4Mpyre7QvM5/iuNBPgy3Je5P0YWUb5vhLbmx6xDCV66wvixnwJ81cntOQAyk2X4MrVNPdDHco0dJi2kDhm4Sfs71PSPZPgxkDMs/HXY5zBNixEQBtHU92km8Rgm14WibPEuG5pEsOI1LqtGJ4mj8O7AS753IbbEokfxsxA+JV8KkLeT86YJRq+9I4ElcW9aKRd4WRt15zio6Rt/lUCI8fCXEjbLms4twYFmYhkEja9bHSi21zZg==
Received: from VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com
	(10.152.18.55) by VE1EUR03HT117.eop-EUR03.prod.protection.outlook.com
	(10.152.19.166) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.345.12;
	Sun, 24 Dec 2017 12:20:51 +0000
Received: from DB6P190MB0296.EURP190.PROD.OUTLOOK.COM (10.152.18.51) by
	VE1EUR03FT039.mail.protection.outlook.com (10.152.19.196) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
	15.20.345.12 via Frontend Transport; Sun, 24 Dec 2017 12:20:51 +0000
Received: from DB6P190MB0296.EURP190.PROD.OUTLOOK.COM
	([fe80::1115:b91c:92b3:5258]) by DB6P190MB0296.EURP190.PROD.OUTLOOK.COM
	([fe80::1115:b91c:92b3:5258%13]) with mapi id 15.20.0345.016;
	Sun, 24 Dec 2017 12:20:51 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Thread-Topic: [PATCH] Improved Windows build of gpspipe
Thread-Index: AQHTfLGjF5Ykfhc6M0iOzBPZRW6Lzg==
Date: Sun, 24 Dec 2017 12:20:51 +0000
Message-ID: <DB6P190MB029609BE980D1CC1D9E7CDC48E000@DB6P190MB0296.EURP190.PROD.OUTLOOK.COM>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:08A9D97A024D9802F0ABC6C77D7E1C35659714F8EBD039EDBCF57AD6B7CB80E6;
	UpperCasedChecksum:51C0D900ECC32DCCAE512B2CDDF64C7892CD8F3108120FAABB99A63FDB9B03A4;
	SizeAsReceived:6883; Count:44
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [7ZP+nWAdh5iZcAdUEDdWoZo/Tf9Pw9Hf]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VE1EUR03HT117;
	6:j3YZnuJzxutFQuE0gPqGD9hfDhRniKFTRDD+XfP2qx81yRwNRB0J2GX7C/r8iiw+i1obmx4vVZq+Fd+SnRUiJkcfuNlfR2y2jqM1SyjfOtxym0QbQznewfXsehgQhGUyYEyh6AcLK0pjogH24bnvmD3ZdxRMUREFqw+rHrvyrHKLDi1kQOijvonL3W55If5bMjGt10/tBAHCInpw0I2D8oO1m4MBNmehCQp7tiAIq/rs15BzRSjYZzdj+iqOxeR2urX3Gw+CCO0JAuNStGpxzYRV+k3YIsuADGw7USa0MsO9ZmoaWDXzwme6Z4CA5TfG+qii+RnBm94t2dod+KPbTuse6ASSQVEBcSJuG1WWVdg=;
	5:8w/7Y/kLfzWbg4Vh3lRpmDVd6NxJkjDcer8SBOpB0K3erytnx52mAs7r9FP3iEmiZLzuvz+KphHc8mY6HcZjD5iKjSzyOoRDGnyOr7tJcAjUR1XaWgThIUWswIuJUfdnjPx8BPCdcnA3j4ecQjQjwQSBkx4vR4wzPTMhVZ1AGbo=;
	24:621NYB+KhtuM2cu8V6K/bSpZwWWS4PigRanH02K6VxKycJyRL8LYTOJbwvkliQHrw+ZQLFS2n4lyKtycRGOvfRezWGzLaPrBZFGMiL5ODCU=;
	7:+HsQJWZFib+DEeHl58qPK1E9nC/vA1Kv2pJfYILycT37Nucne67j5AD/jjkIWEIA26LwHla/CKzKRd0SbXHGjY5B3lInMFudUuL5bB7OagKF2LEUb7oiidhETcK/89NPLkQ9pX38OGJ8R849ssiTPjwRgA5vTiXZNYHrYKmoxzyUOlBNeVSdE5agdlbrQy4scHrDvFQX2kp1nHv8SSIUXxFUHigPl4qB6GfLoxqtNCTz6Nrr4xAftXZEm2HP8Ee1
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045);
	SRVR:VE1EUR03HT117; 
x-ms-traffictypediagnostic: VE1EUR03HT117:
x-ms-office365-filtering-correlation-id: c023db9e-8a90-4fd0-3172-08d54ac8c59f
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031);
	SRVR:VE1EUR03HT117; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:VE1EUR03HT117; 
x-forefront-prvs: 05315CBE52
x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT;
	SFP:1901; SCL:1; SRVR:VE1EUR03HT117;
	H:DB6P190MB0296.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c023db9e-8a90-4fd0-3172-08d54ac8c59f
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Dec 2017 12:20:51.8346 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT117
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.92.71.95
Subject: [gpsd-dev] [PATCH] Improved Windows build of gpspipe
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Dec 2017 12:20:57 -0000

---
 gpspipe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gpspipe.c b/gpspipe.c
index 72eed30..884fc59 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -67,7 +67,9 @@ static void spinner(unsigned int, unsigned int);
 #define BAUDRATE B4800
=20
 /* Serial port variables */
+#ifdef HAVE_TERMIOS_H
 static struct termios oldtio, newtio;
+#endif /* HAVE_TERMIOS_H */
 static int fd_out =3D 1;		/* output initially goes to standard output */
 static char serbuf[255];
 static int debug;
--
libgit2 0.26.0



From MAILER-DAEMON Sun Dec 24 14:01:51 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eTBWx-0001xn-Kj
	for mharc-gpsd-dev@gnu.org; Sun, 24 Dec 2017 14:01:51 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41398)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mike@thorcom.co.uk>) id 1eTBWu-0001wn-15
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 14:01:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mike@thorcom.co.uk>) id 1eTBWq-0001aS-0q
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 14:01:48 -0500
Received: from relay1.thorcom.net ([2a00:2381:19c6::3200]:60951)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <mike@thorcom.co.uk>) id 1eTBWp-0001W5-KE
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 14:01:43 -0500
Received: from [2a00:2381:19c6::2000] (helo=mail.thorcom.co.uk)
	by relay1.thorcom.net with esmtps (TLSv1.2:DHE-RSA-AES256-SHA256:256)
	(Exim 4.89) (envelope-from <mike@thorcom.co.uk>)
	id 1eTBWg-00060z-Lg; Sun, 24 Dec 2017 19:01:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=thorcom.co.uk; s=thorcom; 
	h=Sender:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject;
	bh=IP52k8iPNoYSLkFYzlLOIJQ6llqexLQWO13Pxu+n06s=; 
	b=STHdpApLAWsEmQU+eA6xNGbXy+cxBD3ugaiBKEUTD0XEOB4tSspZ8acGNr+jvUcCnk2eosaoRRlFYrcPwxLBeLEQAj7aQJJiBznSBx4UgVQL2Un4PrWf6DQZlRDLuKYaOR+eJSYhHkJN2e7/NdYb5i/iTGph4NAJdGl9oV+hwjOGby7nkza0furffJxlwfG6m7O5v6B5+N3Uc2bNLdphGVIKy7eZBZ8Nt9Qc7TDOxsKIgeG6KNIy/dFx1ECnu1veoTiRQ0IOIfsh761YMgTWA4Kw7cg7dK65MiDt6A/CThd74TUTTQkzYqtrOg3suQZvSJ6xvP4wfaOVDBcBRuRTjA==;
Received: from gate.tubby.org ([82.68.212.65] helo=[192.168.144.20])
	by mail.thorcom.co.uk with esmtpsa
	(TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82)
	(envelope-from <mike@thorcom.co.uk>)
	id 1eTBWY-0000yZ-74; Sun, 24 Dec 2017 19:01:34 +0000
To: "Vaish, Atul" <atul.vaish@intel.com>, gpsd-dev@nongnu.org
References: <c0e3a79e-dd39-c435-3237-200d96f75187@thorcom.co.uk>
	<247D027087D780428F290D96129A79BC8C8969F1@BGSMSX101.gar.corp.intel.com>
From: "Michael J. Tubby B.Sc. MIET" <mike.tubby@thorcom.co.uk>
Message-ID: <fa369771-f239-9123-09d4-1ef7365a1a8e@thorcom.co.uk>
Date: Sun, 24 Dec 2017 19:01:26 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
	Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <247D027087D780428F290D96129A79BC8C8969F1@BGSMSX101.gar.corp.intel.com>
Content-Type: multipart/alternative;
	boundary="------------67A1AB7425080D48C446090F"
Content-Language: en-US
Sender: mike@thorcom.co.uk
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a00:2381:19c6::3200
Subject: Re: [gpsd-dev] GPDS hand hardware fault/alarm reporting
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Dec 2017 19:01:50 -0000

This is a multi-part message in MIME format.
--------------67A1AB7425080D48C446090F
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Atul,

Thanks for the email.

Some of the GPS receivers used in semi-professional and professional 
applications have a degree of hardware self-test and monitoring, this 
can include:

     * detecting that the internal battery backed RAM/RTC has failed on 
power up (which may cause the GPS receiver to perform a master reset and 
take an extended period to provide 'first fix')

     * detecting internal faults (loss of master oscillator, loss of PLL)

     * detecting antenna faults (open circuit, short circuit) based on 
the curret consumption by the external antenna connected to the GPS receiver

     * detecting of 'in band' interference or deliberate jamming

Most GPS receivers export these items via their proprietary binary 
interfaces (Trimble TSIP, Ublox UBX, etc.)

What I think we need is a continuation of the Hardware Abstraction Layer 
(HAL) in the GPSD protocol interface to represent these conditions and 
then 'driver implementations' for specific receivers.  This might take 
the form of a set of 'capabilities' like 'can perform internal hardware 
diagnostics', 'can monitor antenna faults' and 'can detect jamming' 
along with a set of boolean items ('flags') to show weather the fault 
condition is present.


Mike


On 12/24/2017 1:53 PM, Vaish, Atul wrote:
> Let me know , I  am spending on this quite a bit and see how Can I help you in this regard ?
>
> Btw just an introduction , at Intel , I work on providing GPS solutions over Android .
>
> Regards
> Atul Vaish
>
> -----Original Message-----
> From: gpsd-dev [mailto:gpsd-dev-bounces+atul.vaish=intel.com@nongnu.org] On Behalf Of Michael J. Tubby B.Sc. MIET
> Sent: Sunday, October 29, 2017 3:18 PM
> To: gpsd-dev@nongnu.org
> Subject: [gpsd-dev] GPDS hand hardware fault/alarm reporting
>
>
> We have been using GPS receivers in vehicle location systems since the early 1990s and the Trimble Advanced Navigation Sensor (TANS) - if anyone remembers that - and have worked through multiple generations from SVeeSix, ACE to Lassen-iQ and have always used Timble's TSIP binary code.
>
> We have a new product design and we've switched to Ublox MAX-M8W and I face a but of a dilemma, I could:
>
>       a) keep our codebase and write a new UBX binary driver; or
>
>       b) switch to using GPSD as effectively a Hardware Abstraction Layer
> (HAL) - our preferred route
>
> Our platforms are ARM-based (i.MX6, Linux 4.1, Ubuntu 14.04 LTS server) and I have downloaded and built GPSD 3.19, got working with MAX-M8W on out platform, got NTPD working with shared memory and built a prototype test client - all in one evening!  While I'm impressed with the quality and ease of use of both GPSD and libgps it leaves us with a challenge for GPS receiver and antenna fault monitoring and reporting.
>
> Our products are designed for business-critical and mission-critical users (e.g. Emergency Services and other government agencies). Equipment gets broken both accidentally and (on occasions) deliberately we need to monitor the hardware for faults as we generally need to get faulty installations fixed asap.
>
> All of our products use an external antenna with active pre-amp and we monitor the power consumption of the pre-amp to determine whether the antenna is good or faulty, there are three conditions - "good", "open circuit" (not plugged in) and "short circuit".  These are reported via status bits in TSIP and UBX - some chips have the hardware built in while other's you have to add bits around the GPS receiver.
>
> When using the proprietary binary interfaces, e.g. Trimble TSIP and Ublox UBX, additional instrumentation is available for faults and alarms and we use these as well.
>
> Several receivers support 'battery backup failed' and or 'system RAM corrupt' at start-up along with 'DSP faults' and many newer GPS receivers support jamming detection by detecting the presence of in-band RF interference and flag this also.
>
> I am only across the Trimble and Ublox GPS/GNSS receivers that we currently use but an approach for adding generic support these faults/alarms would be to add a new set of flags as a uint32_t called 'gps.fault' or similar and define a set of values:
>
>       GPS_FAULT_BATTERY_BACKUP_FAIL 0x00000001
>       GPS_FAULT_SYSTEM_RAM_CORRUPT0x00000002
>       GPS_FAULT_DSP_FAILURE             0x00000004
>       GPS_FAULT_ANTENNA_OPEN 0x00000008
>       GPS_FAULT_ANTENNA_SHORT           0x00000010
>       GPS_FAULT_JAMMING_DETECTED        0x00000020
>
> that the drivers could set.
>
> Before we go off hacking GPSD and libgps too much I thought I'd check if we're going in the right direction or overlapping with anyone else.
>
> Does anyone else want to work on this?  Does anyone want to contribute to the list of faults/fault codes for other receivers?
>
>
> Mike
>
>

-- 

Thorcom Systems Ltd <http://www.thorcom.co.uk>

Michael J Tubby B.Sc MIET / Technical Director
mike.tubby@thorcom.co.uk <mailto:mike.tubby@thorcom.co.uk>/ +44 (0)7973 
225144

Thorcom Systems Ltd
Office: +44 (0)1905 756 700 / Fax: +44 (0)1905 755 777
Unit 4, 96B Blackpole Trading Estate West, Worcester, WR3 8TJ Registered 
in England & Wales 2704696 / VAT number GB 487 9256 81
www.thorcom.co.uk <http://www.thorcom.co.uk>

Twitter <https://twitter.com/miketubby>Facebook 
<https://www.facebook.com/miketubby>LinkedIn 
<https://uk.linkedin.com/in/mike-tubby-290633>Youtube 
<https://www.youtube.com/channel/UC49OjIQ0a-h_eb3t1ZP1_hw>


--------------67A1AB7425080D48C446090F
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Atul,<br>
    <br>
    Thanks for the email.<br>
    <br>
    Some of the GPS receivers used in semi-professional and professional
    applications have a degree of hardware self-test and monitoring,
    this can include:<br>
    <br>
        * detecting that the internal battery backed RAM/RTC has failed
    on power up (which may cause the GPS receiver to perform a master
    reset and take an extended period to provide 'first fix')<br>
    <br>
        * detecting internal faults (loss of master oscillator, loss of
    PLL)<br>
    <br>
        * detecting antenna faults (open circuit, short circuit) based
    on the curret consumption by the external antenna connected to the
    GPS receiver<br>
    <br>
        * detecting of 'in band' interference or deliberate jamming<br>
    <br>
    Most GPS receivers export these items via their proprietary binary
    interfaces (Trimble TSIP, Ublox UBX, etc.)<br>
    <br>
    What I think we need is a continuation of the Hardware Abstraction
    Layer (HAL) in the GPSD protocol interface to represent these
    conditions and then 'driver implementations' for specific
    receivers.  This might take the form of a set of 'capabilities' like
    'can perform internal hardware diagnostics', 'can monitor antenna
    faults' and 'can detect jamming' along with a set of boolean items
    ('flags') to show weather the fault condition is present.<br>
    <br>
    <br>
    Mike<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/24/2017 1:53 PM, Vaish, Atul
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:247D027087D780428F290D96129A79BC8C8969F1@BGSMSX101.gar.corp.intel.com">
      <pre wrap="">Let me know , I  am spending on this quite a bit and see how Can I help you in this regard ?

Btw just an introduction , at Intel , I work on providing GPS solutions over Android .

Regards
Atul Vaish

-----Original Message-----
From: gpsd-dev [<a class="moz-txt-link-freetext" href="mailto:gpsd-dev-bounces+atul.vaish=intel.com@nongnu.org">mailto:gpsd-dev-bounces+atul.vaish=intel.com@nongnu.org</a>] On Behalf Of Michael J. Tubby B.Sc. MIET
Sent: Sunday, October 29, 2017 3:18 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:gpsd-dev@nongnu.org">gpsd-dev@nongnu.org</a>
Subject: [gpsd-dev] GPDS hand hardware fault/alarm reporting


We have been using GPS receivers in vehicle location systems since the early 1990s and the Trimble Advanced Navigation Sensor (TANS) - if anyone remembers that - and have worked through multiple generations from SVeeSix, ACE to Lassen-iQ and have always used Timble's TSIP binary code.

We have a new product design and we've switched to Ublox MAX-M8W and I face a but of a dilemma, I could:

     a) keep our codebase and write a new UBX binary driver; or

     b) switch to using GPSD as effectively a Hardware Abstraction Layer
(HAL) - our preferred route

Our platforms are ARM-based (i.MX6, Linux 4.1, Ubuntu 14.04 LTS server) and I have downloaded and built GPSD 3.19, got working with MAX-M8W on out platform, got NTPD working with shared memory and built a prototype test client - all in one evening!  While I'm impressed with the quality and ease of use of both GPSD and libgps it leaves us with a challenge for GPS receiver and antenna fault monitoring and reporting.

Our products are designed for business-critical and mission-critical users (e.g. Emergency Services and other government agencies). Equipment gets broken both accidentally and (on occasions) deliberately we need to monitor the hardware for faults as we generally need to get faulty installations fixed asap.

All of our products use an external antenna with active pre-amp and we monitor the power consumption of the pre-amp to determine whether the antenna is good or faulty, there are three conditions - "good", "open circuit" (not plugged in) and "short circuit".  These are reported via status bits in TSIP and UBX - some chips have the hardware built in while other's you have to add bits around the GPS receiver.

When using the proprietary binary interfaces, e.g. Trimble TSIP and Ublox UBX, additional instrumentation is available for faults and alarms and we use these as well.

Several receivers support 'battery backup failed' and or 'system RAM corrupt' at start-up along with 'DSP faults' and many newer GPS receivers support jamming detection by detecting the presence of in-band RF interference and flag this also.

I am only across the Trimble and Ublox GPS/GNSS receivers that we currently use but an approach for adding generic support these faults/alarms would be to add a new set of flags as a uint32_t called 'gps.fault' or similar and define a set of values:

     GPS_FAULT_BATTERY_BACKUP_FAIL 0x00000001
     GPS_FAULT_SYSTEM_RAM_CORRUPT0x00000002
     GPS_FAULT_DSP_FAILURE             0x00000004
     GPS_FAULT_ANTENNA_OPEN 0x00000008
     GPS_FAULT_ANTENNA_SHORT           0x00000010
     GPS_FAULT_JAMMING_DETECTED        0x00000020

that the drivers could set.

Before we go off hacking GPSD and libgps too much I thought I'd check if we're going in the right direction or overlapping with anyone else.

Does anyone else want to work on this?  Does anyone want to contribute to the list of faults/fault codes for other receivers?


Mike


</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <p style="font-family: Helvetica, Arial, sans-serif; font-size:
        10px; line-height: 12px; margin-bottom: 10px;"> <a
          style="text-decoration:none" href="http://www.thorcom.co.uk"
          class="clink logo-container"> <img
            src="http://logo.thorcom.co.uk/thorcom_logo.png"
            alt="Thorcom Systems Ltd" class="sig-logo" height="32"
            width="160" border="0"> </a> </p>
      <p style="font-family: Helvetica, Arial, sans-serif; font-size:
        10px; line-height: 12px; color: rgb(33, 33, 33); margin-bottom:
        10px;"><span style="font-weight: bold; color: rgb(33, 33, 33);
          display: inline;" class="txt signature_name-target sig-hide">Michael
          J Tubby B.Sc MIET</span> <span class="title-sep sep"
          style="display: inline;">/</span> <span style="color: rgb(33,
          33, 33); display: inline;" class="txt
          signature_jobtitle-target sig-hide">Technical Director</span>
        <span class="email-sep break" style="display: inline;"><br>
        </span> <a class="link email signature_email-target sig-hide"
          href="mailto:mike.tubby@thorcom.co.uk" style="color: rgb(71,
          124, 204); text-decoration: none; display: inline;">mike.tubby@thorcom.co.uk</a><span
          class="signature_email-sep sep" style="display: inline;"> / </span><span
          style="color: rgb(33, 33, 33); display: inline;" class="txt
          signature_mobilephone-target sig-hide">+44 (0)7973 225144</span></p>
      <p style="font-family: Helvetica, Arial, sans-serif; font-size:
        10px; line-height: 12px; margin-bottom: 10px;"> <span
          style="font-weight: bold; color: rgb(33, 33, 33); display:
          inline;" class="txt signature_companyname-target sig-hide">Thorcom
          Systems Ltd</span> <span class="company-sep break"
          style="display: inline;"><br>
        </span> <span style="color: rgb(33, 33, 33); display: inline;"
          class="txt office-sep sep">Office: </span> <span
          style="color: rgb(33, 33, 33); display: inline;" class="txt
          signature_officephone-target sig-hide">+44 (0)1905 756 700</span>
        <span style="color: rgb(33, 33, 33); display: inline;"
          class="txt fax-sep sep">/ Fax: </span> <span style="color:
          rgb(33, 33, 33); display: inline;" class="txt
          signature_fax-target sig-hide">+44 (0)1905 755 777</span> <span
          class="address-sep break" style="display: inline;"><br>
        </span> <span style="color: rgb(33, 33, 33); display: inline;"
          class="txt signature_address-target sig-hide">Unit 4, 96B
          Blackpole Trading Estate West, Worcester, WR3 8TJ</span> <span
          class="address2-sep break" style="display: block;"></span> <span
          style="color: rgb(33, 33, 33); display: inline;" class="txt
          signature_address2-target sig-hide">Registered in England
          &amp; Wales 2704696 / VAT number GB 487 9256 81</span> <span
          class="website-sep break" style="display: inline;"><br>
        </span> <a class="link signature_website-target sig-hide"
          href="http://www.thorcom.co.uk" style="color: rgb(71, 124,
          204); text-decoration: none; display: inline;">www.thorcom.co.uk</a>
      </p>
      <!-- social media -->
      <p class="social-list" style="font-size: 0px; line-height: 0;
        font-family: Helvetica, Arial, sans-serif;"> <a
          style="text-decoration: none; display: inline;" class="social
          signature_twitter-target sig-hide"
          href="https://twitter.com/miketubby"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="twitter.png"
            src="http://logo.thorcom.co.uk/twitter.png" alt="Twitter"
            height="16" width="16"></a><span style="white-space:nowrap;"
          class="signature_twitter-sep"><img
            src="http://logo.thorcom.co.uk/spacer.gif" width="2"></span>
        <a style="text-decoration: none; display: inline;" class="social
          signature_facebook-target sig-hide"
          href="https://www.facebook.com/miketubby"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="facebook.png"
            src="http://logo.thorcom.co.uk/facebook.png" alt="Facebook"
            height="16" width="16"></a><span style="white-space:nowrap;"
          class="signature_facebook-sep"><img
            src="http://logo.thorcom.co.uk/spacer.gif" width="2"></span>
        <a style="text-decoration: none; display: inline;" class="social
          signature_linkedin-target sig-hide"
          href="https://uk.linkedin.com/in/mike-tubby-290633"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="linkedin.png"
            src="http://logo.thorcom.co.uk/linkedin.png" alt="LinkedIn"
            height="16" width="16"></a><span style="white-space:nowrap;"
          class="signature_linkedin-sep"><img
            src="http://logo.thorcom.co.uk/spacer.gif" width="2"></span>
        <a style="text-decoration: none; display: inline;" class="social
          signature_youtube-target sig-hide"
          href="https://www.youtube.com/channel/UC49OjIQ0a-h_eb3t1ZP1_hw"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="youtube.png"
            src="http://logo.thorcom.co.uk/youtube.png" alt="Youtube"
            height="16" width="16"></a><span style="white-space:nowrap;"
          class="signature_youtube-sep"><img
            src="http://logo.thorcom.co.uk/spacer.gif" width="2"></span>
      </p>
      <!-- disclaimer : unused
  <p style="font-family: Helvetica, Arial, sans-serif; color: #212121; font-size: 9px; line-height: 12px;" class="txt signature_disclaimer-target"></p>
  --> </div>
  </body>
</html>

--------------67A1AB7425080D48C446090F--


From MAILER-DAEMON Sun Dec 24 15:50:22 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eTDDy-0006Es-EO
	for mharc-gpsd-dev@gnu.org; Sun, 24 Dec 2017 15:50:22 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42233)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1eTDDv-0006EF-Sl
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 15:50:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1eTDDu-0002dH-OP
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 15:50:19 -0500
Received: from rellim.com ([2001:470:e815::19]:53067 helo=spidey.rellim.com)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <gem@rellim.com>) id 1eTDDu-0002Sy-EG
	for gpsd-dev@nongnu.org; Sun, 24 Dec 2017 15:50:18 -0500
Received: from spidey.rellim.com (dave.rellim.com
	[IPv6:2001:470:e815:0:0:0:0:19] (may be forged))
	(authenticated bits=0)
	by spidey.rellim.com (8.15.2/8.15.2) with ESMTPSA id vBOKnxjt016046
	(version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO)
	for <gpsd-dev@nongnu.org>; Sun, 24 Dec 2017 12:50:04 -0800
DKIM-Filter: OpenDKIM Filter v2.10.3 spidey.rellim.com vBOKnxjt016046
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=kong;
	t=1514148604; bh=rw5JAq3kEQs8vDJQiPoeTz0dvYOkamKJX6m5kYZ/M8I=;
	h=Date:From:To:Subject:In-Reply-To:References;
	b=ZvJTXKn+X4rBN6+LIAL7DJF7k7fzDqH9K4QZok2pelW/jbs2pRyXpJILQcz0b4gzr
	z7Dc74G0b3IBP7IyZQPEiDWePKt6NBsKDdCkLqFkxi+A2elTgpEXPoDUD+RfAxXtrU
	GIQVoX9XAErTj0BlFifKVjHpLWoRwI9UA0zqdv5A=
Date: Sun, 24 Dec 2017 12:49:44 -0800
From: "Gary E. Miller" <gem@rellim.com>
To: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Message-ID: <20171224124944.365f0d45@spidey.rellim.com>
In-Reply-To: <DB6P190MB029609BE980D1CC1D9E7CDC48E000@DB6P190MB0296.EURP190.PROD.OUTLOOK.COM>
References: <DB6P190MB029609BE980D1CC1D9E7CDC48E000@DB6P190MB0296.EURP190.PROD.OUTLOOK.COM>
Organization: Rellim
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	boundary="Sig_/WmI=BQnjxk1V60wwf/V=AhR";
	protocol="application/pgp-signature"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2
	(spidey.rellim.com [IPv6:2001:470:e815:0:0:0:0:19]);
	Sun, 24 Dec 2017 12:50:04 -0800 (PST)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2001:470:e815::19
Subject: Re: [gpsd-dev] [PATCH] Improved Windows build of gpspipe
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Dec 2017 20:50:20 -0000

--Sig_/WmI=BQnjxk1V60wwf/V=AhR
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yo Robert!

Do you now have termios.h?  Is this all you need to build w/o termios.h?

On Sun, 24 Dec 2017 12:20:51 +0000
Robert Norris <rw_norris@hotmail.com> wrote:

> ---
>  gpspipe.c | 2 ++
>  1 file changed, 2 insertions(+)
>=20
> diff --git a/gpspipe.c b/gpspipe.c
> index 72eed30..884fc59 100644
> --- a/gpspipe.c
> +++ b/gpspipe.c
> @@ -67,7 +67,9 @@ static void spinner(unsigned int, unsigned int);
>  #define BAUDRATE B4800
> =20
>  /* Serial port variables */
> +#ifdef HAVE_TERMIOS_H
>  static struct termios oldtio, newtio;
> +#endif /* HAVE_TERMIOS_H */
>  static int fd_out =3D 1;		/* output initially goes to
> standard output */ static char serbuf[255];
>  static int debug;
> --
> libgit2 0.26.0
>=20
>=20
>=20




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can=E2=80=99t measure it, you can=E2=80=99t improve it." - Lord=
 Kelvin

--Sig_/WmI=BQnjxk1V60wwf/V=AhR
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEENqCjEoytAEAuFCk8DQ7ZSUHRedgFAlpAEugACgkQDQ7ZSUHR
edieTAf+OW/A+ezox6HyKHRe3m2wqptTq27kxv+EGN1QO52AJoPrNzc8oTo5kFQY
P6Lcr5vQVs9s3rE6C8pL1mFkBsg+shLrGnKIcNwfFm5/vUUW93iPuOgHZbUJeoEW
cWlIGXd2VS4h/pbZ9YvEqJA/6UuMfQGyICszPEniKtxF368Pf4WZED9hvK26l460
I+80sCTPiY+7LjXtXb7rKiqeh414TbcrRhyxGJhcbHxLS/Dqq54BWXdEIuW01ied
U/a+qdWxQcQr0H2izaTZjeMIBzBWxPW3WprIPoCP62/bVlc6ZByhaRvt9cSjlptf
Ft3Q7NgAsH/tmSMBejw+cyscypLSUQ==
=/CMh
-----END PGP SIGNATURE-----

--Sig_/WmI=BQnjxk1V60wwf/V=AhR--


From MAILER-DAEMON Sun Dec 31 08:58:16 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1eVe80-0004uH-HH
	for mharc-gpsd-dev@gnu.org; Sun, 31 Dec 2017 08:58:16 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49555)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eVe7y-0004u5-Mo
	for gpsd-dev@nongnu.org; Sun, 31 Dec 2017 08:58:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rw_norris@hotmail.com>) id 1eVe7u-0006qu-NY
	for gpsd-dev@nongnu.org; Sun, 31 Dec 2017 08:58:14 -0500
Received: from mail-oln040092072054.outbound.protection.outlook.com
	([40.92.72.54]:10706
	helo=EUR03-VE1-obe.outbound.protection.outlook.com)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rw_norris@hotmail.com>)
	id 1eVe7u-0006pH-8K
	for gpsd-dev@nongnu.org; Sun, 31 Dec 2017 08:58:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
	s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
	bh=LPVHPdvC5ji+WYscnyvjdll1xzIIZcbk0yYmyzdDZvM=;
	b=f+MbuCmARIuuGN4claxlRIgcrpDtoR0wJ1/G288Umm61o/Dxje5chdpKESyLEjL+Y41L1YKJrKZhLla+e0El97Y7grOzetnPFA4X6+FJLJ1BEQbqqzybfol+pK7UtDfQ1/hfHlLXTMhuy8+xh7uLH9OPQVR1XGbN7lsBwDmiN9Gy474g4t71jMp7o7UCs9iQx5eqoptab5uxyAk4gAY3HIpwZSA0QRpI89tOpSeSs1+uOtbOl8eJcBMljgLm6lOL9hbvTxzowZ05ue7gAmuVjrOEOxscqXOpu2xnLrIGvMckgzO6PqvbvI+6zuhMRIcbogx2VJqNXrmEGrfOXalASg==
Received: from DB5EUR03FT004.eop-EUR03.prod.protection.outlook.com
	(10.152.20.56) by DB5EUR03HT033.eop-EUR03.prod.protection.outlook.com
	(10.152.21.7) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.345.12;
	Sun, 31 Dec 2017 13:58:07 +0000
Received: from DB6P190MB0296.EURP190.PROD.OUTLOOK.COM (10.152.20.54) by
	DB5EUR03FT004.mail.protection.outlook.com (10.152.20.128) with
	Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
	15.20.345.12 via Frontend Transport; Sun, 31 Dec 2017 13:58:07 +0000
Received: from DB6P190MB0296.EURP190.PROD.OUTLOOK.COM
	([fe80::1115:b91c:92b3:5258]) by DB6P190MB0296.EURP190.PROD.OUTLOOK.COM
	([fe80::1115:b91c:92b3:5258%13]) with mapi id 15.20.0366.007;
	Sun, 31 Dec 2017 13:58:07 +0000
From: Robert Norris <rw_norris@hotmail.com>
To: "Gary E. Miller" <gem@rellim.com>, "gpsd-dev@nongnu.org"
	<gpsd-dev@nongnu.org>
Thread-Topic: [gpsd-dev] [PATCH] Improved Windows build of gpspipe
Thread-Index: AQHTfLGjF5Ykfhc6M0iOzBPZRW6LzqNS+BAAgAqK11g=
Date: Sun, 31 Dec 2017 13:58:07 +0000
Message-ID: <DB6P190MB02961C26BF9856625505E6F38E1B0@DB6P190MB0296.EURP190.PROD.OUTLOOK.COM>
References: <DB6P190MB029609BE980D1CC1D9E7CDC48E000@DB6P190MB0296.EURP190.PROD.OUTLOOK.COM>,
	<20171224124944.365f0d45@spidey.rellim.com>
In-Reply-To: <20171224124944.365f0d45@spidey.rellim.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:B3AB605100FBE697AED803FAB80AF07333F474D630509F8CB94E11B5C4ACC494;
	UpperCasedChecksum:9C4D140118820D7315DC531167B560F43DA8189275018935C3C8941238D6808F;
	SizeAsReceived:7137; Count:46
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [U2cUV05rnz2uwO868NLR6CEa58Pez244]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DB5EUR03HT033;
	6:e1d7mT5yqivnRq8CK08LXy7ZSAhmYRAw7vne/vYteywW7WKS03Qp5N8bCQtH3GBHDDyKrOIEnyrHo0dbSgtmjFvyWHDnD+d8GvTuXz8sGTaP3EHsvWgFfX4aD33425TALJG7vWE1VclU5sScIZqxi18fmurLXWe1BNgiGlHXcNr35wC1elGhz7pJqrWMnpgTPYEU7cp/J/LifevRaxWlSxzD3TJuxfjfxl/O7+4oJRXkt7t1CwsMDjl6wk+nc5Iib5Ikiw9Odg/+139+JAS54DcmVTdMtiRpjbNfyHbqVxsB+accmHVOpgsmr9GOrXywjUw4Anf5RlbVhYfyzJAi6Uon1YkdiZjEdnGj7FHJi2I=;
	5:+On6pQJAGnvEQzXxkSidDfGakMHmBnk/Nu2jMMwAcYhWdjms1960XEQjUDLksx1C20XWYd6WKpC5CBsLxdXxB/1U6TeY471KSHEiRwwyGzuamEkGysnzyff9muy2WcKcXDECqFdBnaPEuRL9BVUOGYtIVxkzMpp0jLq7R3soPE4=;
	24:HAT/Q7MIi/HFF5W8Fk6WoacASsFgirqOwpPLyw8RxpAJq7ZjIoj5bTzjeetuCwKekZ25h5a0ghDEbmJuSidmOmfybAuJ/9ma1OyJWyZeurg=;
	7:KcHXeEubtGJtDOhw64OHYTQ4sBz592JxEdF12QcTC6h63dLLtycfG7Tdt0RMoR0ZzFk9YJanlwGm6DQX1Q90POfkjsX8gbNkc3Ghjzemx5Xiruk2LiIzBAZnJOldJ/NOq5RbmiWK89uol/xHCSXqrJOWVCwri76wAJGdrx9S9i63mW3sitv0r08jfnL7fpEUV4DbaCKXtRQzzzQhdfqrzgL+kFqS/Grb56ky3HQuXhApNCXlV+E6se5C38jJTEQO
x-incomingheadercount: 46
x-eopattributedmessage: 0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
	RULEID:(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045);
	SRVR:DB5EUR03HT033; 
x-ms-traffictypediagnostic: DB5EUR03HT033:
x-ms-office365-filtering-correlation-id: a4c229b4-a8c1-42ee-57d7-08d55056854f
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031);
	SRVR:DB5EUR03HT033; BCL:0; PCL:0;
	RULEID:(100000803101)(100110400095); SRVR:DB5EUR03HT033; 
x-forefront-prvs: 0538A71254
x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT;
	SFP:1901; SCL:1; SRVR:DB5EUR03HT033;
	H:DB6P190MB0296.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a4c229b4-a8c1-42ee-57d7-08d55056854f
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Dec 2017 13:58:07.5991 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR03HT033
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From: 40.92.72.54
Subject: Re: [gpsd-dev] [PATCH] Improved Windows build of gpspipe
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev/>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Dec 2017 13:58:15 -0000

No the Windows Mingw system doesn't have termio.h

There are already various other ifdefs for HAVE_TERMIOS_H around termios.h =
serial port usage.

This just avoids one more declaration of termios type variables, which as I=
 mention - this one used to compile OK, but now doesn't with the latest ope=
nSUSE Open Build Service gcc (and/or options applied to gcc).

The patch should of had more commentary (its in my local git branch):

"Protection against unused variables and potential unknown
 storage size when termios.h is not available."

Not sure why my patch generation omitted this.

--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.

________________________________________
From: gpsd-dev <gpsd-dev-bounces+rw_norris=3Dhotmail.com@nongnu.org> on beh=
alf of Gary E. Miller <gem@rellim.com>
Sent: 24 December 2017 20:49
To: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH] Improved Windows build of gpspipe

Yo Robert!

Do you now have termios.h?  Is this all you need to build w/o termios.h?

On Sun, 24 Dec 2017 12:20:51 +0000
Robert Norris <rw_norris@hotmail.com> wrote:

> ---
>  gpspipe.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gpspipe.c b/gpspipe.c
> index 72eed30..884fc59 100644
> --- a/gpspipe.c
> +++ b/gpspipe.c
> @@ -67,7 +67,9 @@ static void spinner(unsigned int, unsigned int);
>  #define BAUDRATE B4800
>
>  /* Serial port variables */
> +#ifdef HAVE_TERMIOS_H
>  static struct termios oldtio, newtio;
> +#endif /* HAVE_TERMIOS_H */
>  static int fd_out =3D 1;               /* output initially goes to
> standard output */ static char serbuf[255];
>  static int debug;
> --
> libgit2 0.26.0
>
>
>




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can=92t measure it, you can=92t improve it." - Lord Kelvin


