From MAILER-DAEMON Fri Jun 01 17:23:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaZJp-0006Sj-CF
	for mharc-gpsd-dev@gnu.org; Fri, 01 Jun 2012 17:23:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58974)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZJm-0006Rs-5U
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:23:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZJk-0006D6-4a
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:23:33 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:43052)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZJj-0006Cy-To
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:23:32 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 5573C603C1A
	for <gpsd-dev@nongnu.org>; Fri,  1 Jun 2012 22:23:29 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id lx2wUWHXEvLD for <gpsd-dev@nongnu.org>;
	Fri,  1 Jun 2012 22:23:28 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 2A833603C10
	for <gpsd-dev@nongnu.org>; Fri,  1 Jun 2012 22:23:28 +0100 (IST)
Message-ID: <4FC932DD.2060008@techworks.ie>
Date: Fri, 01 Jun 2012 22:23:41 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: [gpsd-dev] [AIS] validity range,
	scaling formulas and "not available" codes.
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 01 Jun 2012 21:23:35 -0000

Hi there,

Lot of type 6 and 8 messages have some special "not available" values, 
and the information is not easily accessible in the documentation from a 
tool point of view.

I would like to allow for two forms for the table definition:
- Form#1: as it is now
- Form#2: Extended version with more columns (validity range, not 
available code, scaling)

With the extended version, tablegen.py would have all the extra 
informations needed to:
- generate a BLAH_IS_VALID(X) macro along the structure definition
- generate a BLAH_IS_AVAILABLE(X) macro along the structure definition
- generate validity check for parsing and unpacking code
- generate "not available" check for dumping code

This would mainly impact the JSON dumping in scaled mode.

The current code, doesn't bother much with the not available case:
if (scaled)
	do something
else
	do something

And usually process the fields by bunch

Taking into account the not available case, the scaled and the unscaled 
mode, and the validity checks makes the json dumping code quite heavy:
if (scaled) {
	if (is_not_available)
		do something
	else if (is_valid)
		do something
	else
		do something
}
else
	do something

And has to be done on a field by field case.

With an extended table as describe above, it is possible to update the 
tablegen.py tool to generate code that would require less hand hacking.

Now, I would like to change as well the way the "not available" cases 
are handled. The problem is that for now, the documentation says that 
not available is translated into "nan", which works for real values, but 
not for integer values, enumerations being handled differently.
My solution would be to not dump a field if the scaling mode is "scaled" 
and the availability is "not available".

On top of that, I would like to do the validity checks in the unpacking 
code, and return false if at least one field is invalid.

With these two modifications the json dumping would look like this:
if (scaled && is_available)
	print scaled value
else if (!scaled)
	print unscaled value

Additionally, I would like to enforce the following two rules in the 
AIVDM doc:
- All enum have to point to a table via 'See "something"'
- Same with integer that has some special values (hard turn, more than 
X, ...)
Again, this is to allow the code generation to be as helpful as possible.

I'm planning to add new messages, based on statistics I made from 
aishub.com, and having a better code generator would really help a lot!

In the long term I plan to stress-test the AIS code (unpacking and json 
parsing) with pseudo-randomly generated data and/or specially crafted data.

Chris

-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Fri Jun 01 17:27:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaZNP-0007X4-Ev
	for mharc-gpsd-dev@gnu.org; Fri, 01 Jun 2012 17:27:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42599)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZNM-0007Vq-VR
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:27:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZNL-0007AM-6D
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:27:16 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:44058)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZNL-0007A1-0Y
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:27:15 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id A058E603B5F;
	Fri,  1 Jun 2012 22:27:13 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id qoJpxZE02PGW; Fri,  1 Jun 2012 22:27:12 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 80BC5603B5C;
	Fri,  1 Jun 2012 22:27:12 +0100 (IST)
Message-ID: <4FC933BD.6010500@techworks.ie>
Date: Fri, 01 Jun 2012 22:27:25 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: esr@thyrsus.com
References: <4FC129CD.8000506@techworks.ie> <20120529093006.GA6169@thyrsus.com>
In-Reply-To: <20120529093006.GA6169@thyrsus.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [AIS] HTML testsuite report
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 01 Jun 2012 21:27:18 -0000

On 29/05/12 10:30, Eric S. Raymond wrote:
> Christian Gagneraud<chris@techworks.ie>:
>> I wrote a script that parse sample.aivdm and generate an asciidoc
>> containing status and details about decoded sentences (sample.aivdm
>> has been partially reformatted to be easily parsable).
>> This is still a WIP, any comments are more than welcome!
>>
>> HTML output document is available here:
>> http://www.techworks.ie/pub/chris/gpsd/ais-testsuite.html
>>
>> Ideas for future enhancement:
>> - Add TOC
>> - Add gpsd version somewhere
>> - Add summary table
>> - Add scaled decoding along the unscaled ones
>> - Add CSV decoding too?
>> - Give the standard names associated to each sample
>> - Give the message friendly name
>>
>> Chris
>
> I find output interesting to look at, but then I am like you
> an AIS implementor - which is a pretty uncommon interest.  What
> did you have in mind for this script? Was it just generating
> some sort of explanation page for the website?

I have two goals, but I'm not sure exactly where to add these generated 
documentations bits:
- Gives a clear and detailed picture of what is decoded and what has 
been checked against known good decodings
- Show example of AIVDM sentences vs scaled/unscaled JSON.

The first point could be included somewhere in the beginning of the 
document to show GPSD's AIS decoding status

The other ones could be included after each message description table 
for example.

Chris



-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Fri Jun 01 17:35:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaZV6-0000SE-T5
	for mharc-gpsd-dev@gnu.org; Fri, 01 Jun 2012 17:35:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52552)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZV4-0000RE-Md
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:35:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZV2-0000kd-QA
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:35:14 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:46014)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SaZV2-0000kB-JM
	for gpsd-dev@nongnu.org; Fri, 01 Jun 2012 17:35:12 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 28B6C603C23
	for <gpsd-dev@nongnu.org>; Fri,  1 Jun 2012 22:35:11 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Qsobz9iJc3Gg for <gpsd-dev@nongnu.org>;
	Fri,  1 Jun 2012 22:35:10 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 1A9D4603C22
	for <gpsd-dev@nongnu.org>; Fri,  1 Jun 2012 22:35:10 +0100 (IST)
Message-ID: <4FC9359B.3050304@techworks.ie>
Date: Fri, 01 Jun 2012 22:35:23 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
References: <4FC17D70.7060700@techworks.ie>
In-Reply-To: <4FC17D70.7060700@techworks.ie>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: Re: [gpsd-dev] Test coverage
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 01 Jun 2012 21:35:16 -0000

Hi all,

Any comments on this?

I find it really useful to see what kind of code coverage you get with 
the test-suites.
For example,from [1], you can clearly see that the broadcast case of 
type 22, the long type 16 case, the "trim spaces on right end" code are 
all not tested. (and plenty of other things as well).

Chris

[1] 
http://www.techworks.ie/pub/chris/gpsd/coverage/aivdm/gpsd/gpsd.git/driver_ais.c.gcov.html

On 27/05/12 02:03, Christian Gagneraud wrote:
> Hi,
>
> Today, I gave a try to gcov and lcov, and the results are encouraging I
> think, this is what I've done:
> - 1 coverage report per testsuite run
> - 1 coverage report with all the runs
>
> The results when run on a x86 machine can be found here:
> http://www.techworks.ie/pub/chris/gpsd/coverage
>
> This is experimental stuff, I'm sure there's some problems here and there.
>
> For the "all" testsuite, I think it is possible to merge all the
> testcases belonging to each other testsuite into a corresponding single
> testcase.
> Attached is the diff to SConstruct. After banging my head against the
> wall, I stopped trying to find a nice way to add conditionally
> "--coverage", to LDFLAGS, CFLAGS and CCFLAGS, and went for a less subtle
> one...
> I had to change the calls to mktemp as it was complaining about not
> having enough X ...
> As well, the coveraging calls is unconditional, this is still
> experimental, thought.
>
> Any comments welcome!
>
> Chris


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Sat Jun 02 17:38:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Saw1b-0006so-KK
	for mharc-gpsd-dev@gnu.org; Sat, 02 Jun 2012 17:38:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46062)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1Saw1Y-0006si-V5
	for gpsd-dev@nongnu.org; Sat, 02 Jun 2012 17:38:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1Saw1X-0004zb-2M
	for gpsd-dev@nongnu.org; Sat, 02 Jun 2012 17:38:16 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:38563)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1Saw1W-0004zQ-Rv
	for gpsd-dev@nongnu.org; Sat, 02 Jun 2012 17:38:14 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 4BE32603E48
	for <gpsd-dev@nongnu.org>; Sat,  2 Jun 2012 22:38:12 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WjqjW3k08D-D for <gpsd-dev@nongnu.org>;
	Sat,  2 Jun 2012 22:38:11 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 29127603E40
	for <gpsd-dev@nongnu.org>; Sat,  2 Jun 2012 22:38:11 +0100 (IST)
Message-ID: <4FCA87D0.2020306@techworks.ie>
Date: Sat, 02 Jun 2012 22:38:24 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: [gpsd-dev] Tests: About adding a JSON validator
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Sat, 02 Jun 2012 21:38:18 -0000

Hi,

While working on having the AIS code better tested, I wrote a simple 
python script that try to parse the JSON dump of the AIVDM mesages, and 
I discovered two syntax errors in it (2 non quoted string values).

I then did the same with all the JSON files in test/ but i didn't 
discover more problems.

Do you thinks, it would be good to have this kind of thing added to 
"scons check"?

Chris

-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Sun Jun 03 05:25:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sb74P-0001fF-1g
	for mharc-gpsd-dev@gnu.org; Sun, 03 Jun 2012 05:25:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40502)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb74M-0001f7-Hn
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:25:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb74K-0001bc-PE
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:25:54 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:45923 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb74K-0001bS-LM
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:25:52 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 604C14049B; Sun,  3 Jun 2012 05:25:45 -0400 (EDT)
Date: Sun, 3 Jun 2012 05:25:45 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120603092545.GA3031@thyrsus.com>
References: <4FCA87D0.2020306@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FCA87D0.2020306@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tests: About adding a JSON validator
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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, 03 Jun 2012 09:25:55 -0000

Christian Gagneraud <chris@techworks.ie>:
> While working on having the AIS code better tested, I wrote a simple
> python script that try to parse the JSON dump of the AIVDM mesages,
> and I discovered two syntax errors in it (2 non quoted string
> values).

Which ones? That should definely be fixed.
 
> I then did the same with all the JSON files in test/ but i didn't
> discover more problems.
> 
> Do you thinks, it would be good to have this kind of thing added to
> "scons check"?

Yes.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Sun Jun 03 05:45:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sb7Mr-0002tG-RI
	for mharc-gpsd-dev@gnu.org; Sun, 03 Jun 2012 05:45:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42350)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb7Mn-0002so-PR
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:44:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb7Ml-0005P6-SB
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:44:57 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:45988 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb7Ml-0005P0-Nj
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:44:55 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 4BDB34049B; Sun,  3 Jun 2012 05:44:49 -0400 (EDT)
Date: Sun, 3 Jun 2012 05:44:49 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120603094449.GB3031@thyrsus.com>
References: <4FC129CD.8000506@techworks.ie> <20120529093006.GA6169@thyrsus.com>
	<4FC933BD.6010500@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FC933BD.6010500@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [AIS] HTML testsuite report
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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, 03 Jun 2012 09:44:59 -0000

Christian Gagneraud <chris@techworks.ie>:
> I have two goals, but I'm not sure exactly where to add these
> generated documentations bits:
> - Gives a clear and detailed picture of what is decoded and what has
> been checked against known good decodings

That's already described, in a format easier for humans to handle, early in
AIVDM.txt.  And I'd prefer to have just one of truth about that.

> - Show example of AIVDM sentences vs scaled/unscaled JSON.

Logically that should go in AIVDM.txt somewhere.

> The first point could be included somewhere in the beginning of the
> document to show GPSD's AIS decoding status
> 
> The other ones could be included after each message description
> table for example.

One of my design goals for AIVDM.txt, though, is not to have it be too
specific to GPSD's decoding implementation.  I've accepted having the 
JSON member names in the tables because all the alternatives are too
difficult to maintain, but I'd really prefer that other stuff specific
to JSON be confined to the document appendix dedicated to that.

I suggest you drop your conversion script in devtools (with an explanation
in the README there).  We can work on it there and think about how to 
apply it.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Sun Jun 03 05:48:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sb7Qa-0003Ab-7h
	for mharc-gpsd-dev@gnu.org; Sun, 03 Jun 2012 05:48:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42697)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb7QX-00039g-EQ
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:48:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb7QV-0006ON-99
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:48:49 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:46000 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sb7QV-0006OD-5P
	for gpsd-dev@nongnu.org; Sun, 03 Jun 2012 05:48:47 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 07F7F4049B; Sun,  3 Jun 2012 05:48:40 -0400 (EDT)
Date: Sun, 3 Jun 2012 05:48:40 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120603094840.GA3139@thyrsus.com>
References: <4FC17D70.7060700@techworks.ie>
 <4FC9359B.3050304@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FC9359B.3050304@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Test coverage
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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, 03 Jun 2012 09:48:50 -0000

Christian Gagneraud <chris@techworks.ie>:
> Any comments on this?

You may have missed my previous reply.  I like the idea of having
a coverage check, but I haven't figured out how to read those reports.
Can you point me at documentation?
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Mon Jun 04 02:08:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbQSr-0002RE-MB
	for mharc-gpsd-dev@gnu.org; Mon, 04 Jun 2012 02:08:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33696)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbQSn-0002FS-GS
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 02:08:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbQSl-0000Dg-DO
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 02:08:25 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:34118)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbQSl-0000DL-7b
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 02:08:23 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id BAED7505F79
	for <gpsd-dev@nongnu.org>; Mon,  4 Jun 2012 07:08:20 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id zBUWN7Sns+Gg for <gpsd-dev@nongnu.org>;
	Mon,  4 Jun 2012 07:08:19 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 0CE6650531F
	for <gpsd-dev@nongnu.org>; Mon,  4 Jun 2012 07:08:18 +0100 (IST)
Message-ID: <4FCC50DE.5040508@techworks.ie>
Date: Mon, 04 Jun 2012 07:08:30 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: [gpsd-dev] json.h, hex.c: 2 potentially "hot" commits
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 04 Jun 2012 06:08:27 -0000

Hi Eric, all,

I'm close to fix all the bugs unveiled by my live test campaign, but for 
some of them, I have 2 potentially "hot" commits:
- json.h: Change JSON_VAL_MAX from 120 to 512
   This is to allow the parsing long hexdump (data fields), the longest 
JSON string I saw was 389 characters long
- hex.c: gpsd_hexdump(): revert commit 9f6ab53d, that try to text dump 
instead of hex-dump if the data is "printable", the problem is that 
lenhex_unpack from ais_jsonc.c expect hex dumps, not hex or text.
Trying to get lenhex_unpack guess if it's hex or text sounds dirty to me 
and is asking for more trouble IMHO.

What do you think about these Eric? Do they seem acceptable for you?

Chris

-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Mon Jun 04 02:11:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbQW1-0003XH-7e
	for mharc-gpsd-dev@gnu.org; Mon, 04 Jun 2012 02:11:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49178)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbQVz-0003Ww-3f
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 02:11:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbQVx-0000kU-2b
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 02:11:42 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:36676)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbQVw-0000kJ-SL
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 02:11:40 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 92C9B505F5A
	for <gpsd-dev@nongnu.org>; Mon,  4 Jun 2012 07:11:39 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id T69aOJ2Su9Uo for <gpsd-dev@nongnu.org>;
	Mon,  4 Jun 2012 07:11:38 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 370E150531F
	for <gpsd-dev@nongnu.org>; Mon,  4 Jun 2012 07:11:38 +0100 (IST)
Message-ID: <4FCC51A6.7070708@techworks.ie>
Date: Mon, 04 Jun 2012 07:11:50 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: [gpsd-dev] Tricky bug in the json parser
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 04 Jun 2012 06:11:44 -0000

Hi all,

I just have one last bug to fix from my live test campaign. and it is a 
bit tricky to understand for me as I have to dive into the hairy json.c.

So basically, here are 2 AIS sentences which contain an array of 1 struct:
!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02
!AIVDM,1,1,,A,6h2E3N0rThqP0600J00000000000,0*51

The dumping doesn't seems to cause any trouble, but reading back the 
JSON crashes gpsdecode:
echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode -ju
{"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":false,"seqno":2,"dest_mmsi":246351000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-16777216,"lat":0,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0}]}
echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode -ju | 
gpsdecode -jeu
Segmentation fault

I saw some other messages with arrays of 0 structures, they don't crash 
the json parser.

I have activated the debug messages in json.c, but it didn't help me 
that much (it seems that the parser doesn't "see" the end of struct or 
end of array).
Maybe someone familiar with the json parser code could help me to fix 
this nasty bug.

Chris

PS: I'm running an AIS test campaign on live data from aishub.net.
Input data is ca. 25 millions sentences (1.2GB of logs), and goes 
through these steps:
- AIVDM decoding
- JSON scaled dump
- JSON validity check
- JSON unscaled dump
- JSON validity check
- JSON idempotency check

I fixed a dozen of bugs so far, this one seems to be the last one!

-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Mon Jun 04 05:13:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbTLg-0005qR-UE
	for mharc-gpsd-dev@gnu.org; Mon, 04 Jun 2012 05:13:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38421)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbTLW-0005pS-B2
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 05:13:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbTLP-0001Ee-7H
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 05:13:05 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:37221)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SbTLP-0001DX-0D
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 05:12:59 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 5C75250531F
	for <gpsd-dev@nongnu.org>; Mon,  4 Jun 2012 10:12:57 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id RJWA7fRQFqrr for <gpsd-dev@nongnu.org>;
	Mon,  4 Jun 2012 10:12:56 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 06C665040D3
	for <gpsd-dev@nongnu.org>; Mon,  4 Jun 2012 10:12:55 +0100 (IST)
Message-ID: <4FCC7C22.8000300@techworks.ie>
Date: Mon, 04 Jun 2012 10:13:06 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
References: <4FCC51A6.7070708@techworks.ie>
In-Reply-To: <4FCC51A6.7070708@techworks.ie>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: Re: [gpsd-dev] Tricky bug in the json parser
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 04 Jun 2012 09:13:15 -0000

On 04/06/12 07:11, Christian Gagneraud wrote:
> Hi all,
>
> I just have one last bug to fix from my live test campaign. and it is a
> bit tricky to understand for me as I have to dive into the hairy json.c.

I found the problem, it was in jsongen.py.in, the json parser was doing 
exactly what it was told, it was just told wrong!
Will push soon.

Chris

>
> So basically, here are 2 AIS sentences which contain an array of 1 struct:
> !AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02
> !AIVDM,1,1,,A,6h2E3N0rThqP0600J00000000000,0*51
>
> The dumping doesn't seems to cause any trouble, but reading back the
> JSON crashes gpsdecode:
> echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode -ju
> {"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":false,"seqno":2,"dest_mmsi":246351000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-16777216,"lat":0,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0}]}
>
> echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode -ju |
> gpsdecode -jeu
> Segmentation fault
>
> I saw some other messages with arrays of 0 structures, they don't crash
> the json parser.
>
> I have activated the debug messages in json.c, but it didn't help me
> that much (it seems that the parser doesn't "see" the end of struct or
> end of array).
> Maybe someone familiar with the json parser code could help me to fix
> this nasty bug.
>
> Chris
>
> PS: I'm running an AIS test campaign on live data from aishub.net.
> Input data is ca. 25 millions sentences (1.2GB of logs), and goes
> through these steps:
> - AIVDM decoding
> - JSON scaled dump
> - JSON validity check
> - JSON unscaled dump
> - JSON validity check
> - JSON idempotency check
>
> I fixed a dozen of bugs so far, this one seems to be the last one!
>


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Mon Jun 04 05:45:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbTqS-0005Ku-CV
	for mharc-gpsd-dev@gnu.org; Mon, 04 Jun 2012 05:45:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37266)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SbTqM-0005Iy-Ld
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 05:45:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SbTqG-0000zM-F6
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 05:44:58 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:53639 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SbTqG-0000z7-BM
	for gpsd-dev@nongnu.org; Mon, 04 Jun 2012 05:44:52 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id A8C8B4049B; Mon,  4 Jun 2012 05:44:42 -0400 (EDT)
Date: Mon, 4 Jun 2012 05:44:42 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120604094442.GA27850@thyrsus.com>
References: <4FCC51A6.7070708@techworks.ie>
 <4FCC7C22.8000300@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FCC7C22.8000300@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tricky bug in the json parser
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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, 04 Jun 2012 09:45:03 -0000

Christian Gagneraud <chris@techworks.ie>:
> I found the problem, it was in jsongen.py.in, the json parser was
> doing exactly what it was told, it was just told wrong!
> Will push soon.

I figured it was probably something like that.

One of my longer-term projects is to rewrite the jsongen machinery into
less of a kluge.  It's way better than hand-hacking the C declarations for
the parser initializers, but eventually we're going to want to use it for
stuff besides AIS.  Like parsing JSON subframe reports.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Jun 05 12:26:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwak-0002Ct-3N
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:26:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54114)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwah-0002CS-Ko
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwaf-0004Yc-Vz
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:43 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:50265)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwaf-0004UL-PO
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:41 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 1052A505154
	for <gpsd-dev@nongnu.org>; Tue,  5 Jun 2012 17:26:15 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LP62fcM9epSE; Tue,  5 Jun 2012 17:26:12 +0100 (IST)
Received: from localhost (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id AF1E8504993;
	Tue,  5 Jun 2012 17:26:12 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue,  5 Jun 2012 17:26:19 +0100
Message-Id: <1338913584-30825-1-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: [gpsd-dev] [PATCH 0/5] [AIS] Modifications with potential side
	effects
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 16:26:45 -0000

From: Christian Gagneraud <chris@techworks.ie>

Hi,

These 5 patches make modifications to some code that affects other components.
Scons check passed on each individual commit, so there shouldn't be any regression.

- The first patch makes gpsdecode honor the unscaled flag, and fix SConstruct
  so that the tests are not affected.
- The second one makes gpsd_hexdump() always dump in hexadecimal form (no more
  "maybe text, maybe hex" behaviour)
- The third one increase the maximum json value length (AIS can produce "very"
  long strings)
- The forth one adds a new talker ID: BS, which is used by some AIS
  basestation
- The last one adds a simple script that can be used to check for JSON
  validity

All these patches are needed for the new AIS testing strategy, which will come
in two flavours: regression and stress.
I used this new test script on a large amount of data, and fixed a myriad of
small bugs and typos.

Christian Gagneraud (5):
  gpsdecode: honor scale flag
  gpsd_hexdump: Always dump in hex mode
  json.h: Change JSON_VAL_MAX from 120 to 512
  Add BS talker ID (used by AIS base stations)
  Add script to test for JSON validity

 SConstruct            |    6 +++---
 gpsdecode.c           |    3 +++
 hex.c                 |   47 ++++++++++++++++++-----------------------------
 json.h                |    2 +-
 packet.c              |   18 ++++++++++++++++++
 packet_states.h       |    2 ++
 test_json_validity.py |   23 +++++++++++++++++++++++
 7 files changed, 68 insertions(+), 33 deletions(-)
 create mode 100755 test_json_validity.py

-- 
1.7.7



From MAILER-DAEMON Tue Jun 05 12:26:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwap-0002Is-7Y
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:26:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54128)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwai-0002Cg-RO
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwah-0004ZD-6N
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:44 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:50301)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwag-0004Yg-Vv
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:43 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id DA02C504DC4
	for <gpsd-dev@nongnu.org>; Tue,  5 Jun 2012 17:26:27 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id dUtLeLEhoVw1; Tue,  5 Jun 2012 17:26:27 +0100 (IST)
Received: from localhost (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 99BD9504993;
	Tue,  5 Jun 2012 17:26:26 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue,  5 Jun 2012 17:26:24 +0100
Message-Id: <1338913584-30825-6-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
In-Reply-To: <1338913584-30825-1-git-send-email-chris@techworks.ie>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: Christian Gagneraud <cgagneraud@techworks.ie>
Subject: [gpsd-dev] [PATCH 5/5] Add script to test for JSON validity
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 16:26:50 -0000

From: Christian Gagneraud <cgagneraud@techworks.ie>

This simple script can be used to check if the JSON cade presented on its
standard input is valid JSON.
It has already been very useful to chase up typos in gpsd_json.c

Signed-off-by: Christian Gagneraud <chris@techworks.ie>
---
 test_json_validity.py |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100755 test_json_validity.py

diff --git a/test_json_validity.py b/test_json_validity.py
new file mode 100755
index 0000000..026b02c
--- /dev/null
+++ b/test_json_validity.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+#
+# Christian Gagneraud - 2012
+# Simple python script that will parse json dictionaries on it's input,
+# If it fails, it will print the offending line and an error message.
+# The goal is to check that GPSD outputs valid JSON.
+#
+
+import json, sys
+
+success = True
+lc = 0
+for line in sys.stdin.readlines():
+    lc += 1
+    try:
+        # Load the json dictionary, it should raise an error if it is malformed
+        item = json.loads(line)
+    except Exception as e:
+        success = False
+        print "%d: %s" % (lc, line.strip()) 
+        print "%d: %s" % (lc, e) 
+
+exit(0 if success else 1)
-- 
1.7.7



From MAILER-DAEMON Tue Jun 05 12:26:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwau-0002P4-CJ
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:26:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54153)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwam-0002IO-Oi
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwak-0004ax-T5
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:48 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:50276)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwak-0004V3-Mx
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:46 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id D6C925053D4
	for <gpsd-dev@nongnu.org>; Tue,  5 Jun 2012 17:26:23 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id TZD8JUqQGQMi; Tue,  5 Jun 2012 17:26:22 +0100 (IST)
Received: from localhost (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 016B3504993;
	Tue,  5 Jun 2012 17:26:21 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue,  5 Jun 2012 17:26:20 +0100
Message-Id: <1338913584-30825-2-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
In-Reply-To: <1338913584-30825-1-git-send-email-chris@techworks.ie>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: Christian Gagneraud <cgagneraud@techworks.ie>
Subject: [gpsd-dev] [PATCH 1/5] gpsdecode: honor scale flag
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 16:26:54 -0000

From: Christian Gagneraud <cgagneraud@techworks.ie>

Currently gpsdecode doesn't care about the -u (unscaled) flag. Fix that.
The scaled flag is forced to unscaled when encoding, as the encoding code
assumes unscaled data.
This patch will allow aivdm-regress to run tests in scaled mode.

scons check passed.

Signed-off-by: Christian Gagneraud <chris@techworks.ie>
---
 SConstruct  |    6 +++---
 gpsdecode.c |    3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/SConstruct b/SConstruct
index 5f92ffa..c509e13 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1387,13 +1387,13 @@ rtcm_regress = Utility('rtcm-regress', [gpsdecode], [
     'for f in $SRCDIR/test/*.rtcm2; do '
         'echo "Testing $${f}..."; '
         'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
-        '$SRCDIR/gpsdecode -j <$${f} >$${TMPFILE}; '
+        '$SRCDIR/gpsdecode -u -j <$${f} >$${TMPFILE}; '
         'diff -ub $${f}.chk $${TMPFILE}; '
         'rm -f $${TMPFILE}; '
     'done;',
     '@echo "Testing idempotency of JSON dump/decode for RTCM2"',
     'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
-    '$SRCDIR/gpsdecode -e -j <test/synthetic-rtcm2.json >$${TMPFILE}; '
+    '$SRCDIR/gpsdecode -u -e -j <test/synthetic-rtcm2.json >$${TMPFILE}; '
         'grep -v "^#" test/synthetic-rtcm2.json | diff -ub - $${TMPFILE}; '
         'rm -f $${TMPFILE}; ',
         ])
@@ -1417,7 +1417,7 @@ aivdm_regress = Utility('aivdm-regress', [gpsdecode], [
     'done;',
     '@echo "Testing idempotency of JSON dump/decode for AIS"',
     'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
-    '$SRCDIR/gpsdecode -e -j <$SRCDIR/test/synthetic-ais.json >$${TMPFILE}; '
+    '$SRCDIR/gpsdecode -u -e -j <$SRCDIR/test/synthetic-ais.json >$${TMPFILE}; '
         'grep -v "^#" $SRCDIR/test/synthetic-ais.json | diff -ub - $${TMPFILE}; '
         'rm -f $${TMPFILE}; ',
         ])
diff --git a/gpsdecode.c b/gpsdecode.c
index 3ade9b8..83cd904 100644
--- a/gpsdecode.c
+++ b/gpsdecode.c
@@ -511,6 +511,7 @@ static void decode(FILE *fpin, FILE*fpout)
     //(void)strlcpy(session.gpsdata.dev.path, "stdin", sizeof(session.gpsdata.dev.path));
     memset(&policy, '\0', sizeof(policy));
     policy.json = json;
+    policy.scaled = scaled;
 
     gps_context_init(&context);
     gpsd_time_init(&context, time(NULL));
@@ -576,6 +577,8 @@ static void encode(FILE *fpin, FILE *fpout)
 		  "stdin", 
 		  sizeof(session.gpsdata.dev.path));
     policy.json = true;
+    /* Encoding is always made in unscaled mode */
+    policy.scaled = false;
 
     while (fgets(inbuf, (int)sizeof(inbuf), fpin) != NULL) {
 	int status;
-- 
1.7.7



From MAILER-DAEMON Tue Jun 05 12:26:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwaw-0002Uk-Ff
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:26:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54165)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwao-0002Ii-8n
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwal-0004bA-Ta
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:49 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:50282)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwal-0004VI-NK
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:47 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id E0A9F5057ED
	for <gpsd-dev@nongnu.org>; Tue,  5 Jun 2012 17:26:24 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 6xbqMvwY12WS; Tue,  5 Jun 2012 17:26:23 +0100 (IST)
Received: from localhost (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 2CBD2504DC4;
	Tue,  5 Jun 2012 17:26:23 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue,  5 Jun 2012 17:26:21 +0100
Message-Id: <1338913584-30825-3-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
In-Reply-To: <1338913584-30825-1-git-send-email-chris@techworks.ie>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: Christian Gagneraud <cgagneraud@techworks.ie>
Subject: [gpsd-dev] [PATCH 2/5] gpsd_hexdump: Always dump in hex mode
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 16:26:57 -0000

From: Christian Gagneraud <cgagneraud@techworks.ie>

This function doesn't always dump the data in hex form.
The problem is that some users on it to always do hex dumps.
For example, the AIS json code use it to dump undecoded data. Depending on the
data it will have either text dump or hex dump, which breaks the json
idempotency.

* This patch doesn't bring any regression. *
scons check and splint passed

Signed-off-by: Christian Gagneraud <chris@techworks.ie>
---
 hex.c |   47 ++++++++++++++++++-----------------------------
 1 files changed, 18 insertions(+), 29 deletions(-)

diff --git a/hex.c b/hex.c
index ef67f06..0171f7b 100644
--- a/hex.c
+++ b/hex.c
@@ -10,40 +10,29 @@
 
 const char /*@ observer @*/ *gpsd_hexdump(char *binbuf, size_t binbuflen)
 {
-    char *cp;
-    bool printable = true;
-
-    assert(binbuf != NULL);
-    for (cp = binbuf; cp < binbuf + binbuflen; cp++)
-	if (!isprint(*cp) && !isspace(*cp))
-	    printable = false;
-    if (printable)
-	return binbuf;
-    else {
-	static char hexbuf[MAX_PACKET_LENGTH * 2 + 1];
+    static char hexbuf[MAX_PACKET_LENGTH * 2 + 1];
 #ifndef SQUELCH_ENABLE
-	size_t i, j = 0;
-	size_t len =
-	    (size_t) ((binbuflen >
-		       MAX_PACKET_LENGTH) ? MAX_PACKET_LENGTH : binbuflen);
-	const char *ibuf = (const char *)binbuf;
-	const char *hexchar = "0123456789abcdef";
+    size_t i, j = 0;
+    size_t len =
+	(size_t) ((binbuflen >
+		   MAX_PACKET_LENGTH) ? MAX_PACKET_LENGTH : binbuflen);
+    const char *ibuf = (const char *)binbuf;
+    const char *hexchar = "0123456789abcdef";
 
-	if (NULL == binbuf || 0 == binbuflen)
-	    return "";
+    if (NULL == binbuf || 0 == binbuflen)
+	return "";
 
-	/*@ -shiftimplementation @*/
-	for (i = 0; i < len; i++) {
-	    hexbuf[j++] = hexchar[(ibuf[i] & 0xf0) >> 4];
-	    hexbuf[j++] = hexchar[ibuf[i] & 0x0f];
-	}
-	/*@ +shiftimplementation @*/
-	hexbuf[j] = '\0';
+    /*@ -shiftimplementation @*/
+    for (i = 0; i < len; i++) {
+	hexbuf[j++] = hexchar[(ibuf[i] & 0xf0) >> 4];
+	hexbuf[j++] = hexchar[ibuf[i] & 0x0f];
+    }
+    /*@ +shiftimplementation @*/
+    hexbuf[j] = '\0';
 #else /* SQUELCH defined */
-	hexbuf[0] = '\0';
+    hexbuf[0] = '\0';
 #endif /* SQUELCH_ENABLE */
-	return hexbuf;
-    }
+    return hexbuf;
 }
 
 /*@ +charint -shiftimplementation @*/
-- 
1.7.7



From MAILER-DAEMON Tue Jun 05 12:27:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwaz-0002cr-MM
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:27:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54190)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwat-0002Oz-Vd
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:27:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwan-0004br-1u
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:55 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:50289)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwam-0004VU-SY
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:48 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id E846D5051D7
	for <gpsd-dev@nongnu.org>; Tue,  5 Jun 2012 17:26:25 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id txjWD9Y4o003; Tue,  5 Jun 2012 17:26:24 +0100 (IST)
Received: from localhost (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 3234D504993;
	Tue,  5 Jun 2012 17:26:24 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue,  5 Jun 2012 17:26:22 +0100
Message-Id: <1338913584-30825-4-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
In-Reply-To: <1338913584-30825-1-git-send-email-chris@techworks.ie>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: Christian Gagneraud <cgagneraud@techworks.ie>
Subject: [gpsd-dev] [PATCH 3/5] json.h: Change JSON_VAL_MAX from 120 to 512
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 16:27:00 -0000

From: Christian Gagneraud <cgagneraud@techworks.ie>

This will allow the parsing long hexdump (data fields) in the AIS code.
The longest JSON string I saw so far was 389 characters long.

scons check passed.

Signed-off-by: Christian Gagneraud <chris@techworks.ie>
---
 json.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/json.h b/json.h
index a90fcc3..b691729 100644
--- a/json.h
+++ b/json.h
@@ -62,7 +62,7 @@ struct json_attr_t {
 };
 
 #define JSON_ATTR_MAX	31	/* max chars in JSON attribute name */
-#define JSON_VAL_MAX	120	/* max chars in JSON value part */
+#define JSON_VAL_MAX	512	/* max chars in JSON value part */
 
 #ifdef __cplusplus
 extern "C" {
-- 
1.7.7



From MAILER-DAEMON Tue Jun 05 12:27:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwaz-0002dR-Rp
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:27:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54192)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwau-0002P2-F7
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:27:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwao-0004cJ-37
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:56 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:50295)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chgans@gna.org>) id 1Sbwan-0004Vc-TE
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:26:50 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 1E8E15063E1
	for <gpsd-dev@nongnu.org>; Tue,  5 Jun 2012 17:26:27 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id E4InWws-wk8c; Tue,  5 Jun 2012 17:26:25 +0100 (IST)
Received: from localhost (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 5E03B504DC4;
	Tue,  5 Jun 2012 17:26:25 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue,  5 Jun 2012 17:26:23 +0100
Message-Id: <1338913584-30825-5-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
In-Reply-To: <1338913584-30825-1-git-send-email-chris@techworks.ie>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: Christian Gagneraud <cgagneraud@techworks.ie>
Subject: [gpsd-dev] [PATCH 4/5] Add BS talker ID (used by AIS base stations)
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 16:27:00 -0000

From: Christian Gagneraud <cgagneraud@techworks.ie>

check and packet-regress passed

Signed-off-by: Christian Gagneraud <chris@techworks.ie>
---
 packet.c        |   18 ++++++++++++++++++
 packet_states.h |    2 ++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/packet.c b/packet.c
index fec34b9..3a1ffd1 100644
--- a/packet.c
+++ b/packet.c
@@ -412,6 +412,8 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c)
     case NMEA_BANG:
 	if (c == 'A')
 	    lexer->state = AIS_LEAD_1;
+	else if (c == 'B')
+	    lexer->state = AIS_LEAD_ALT1;
 	else
 	    lexer->state = GROUND_STATE;
 	break;
@@ -427,6 +429,18 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c)
 	else
 	    lexer->state = GROUND_STATE;
 	break;
+    case AIS_LEAD_ALT1:
+	if (c == 'S')
+	    lexer->state = AIS_LEAD_ALT2;
+	else
+	    lexer->state = GROUND_STATE;
+	break;
+    case AIS_LEAD_ALT2:
+	if (isalpha(c))
+	    lexer->state = NMEA_LEADER_END;
+	else
+	    lexer->state = GROUND_STATE;
+	break;
 #if defined(TNT_ENABLE) || defined(GARMINTXT_ENABLE) || defined(ONCORE_ENABLE)
     case AT1_LEADER:
 	switch (c) {
@@ -1467,6 +1481,10 @@ void packet_parse(struct gps_packet_t *lexer)
 		packet_accept(lexer, AIVDM_PACKET);
 	    else if (strncmp((char *)lexer->inbuffer, "!AIVDO", 6) == 0)
 		packet_accept(lexer, AIVDM_PACKET);
+	    else if (strncmp((char *)lexer->inbuffer, "!BSVDM", 6) == 0)
+		packet_accept(lexer, AIVDM_PACKET);
+	    else if (strncmp((char *)lexer->inbuffer, "!BSVDO", 6) == 0)
+		packet_accept(lexer, AIVDM_PACKET);
 	    else
 #endif /* AIVDM_ENABLE */
 		packet_accept(lexer, NMEA_PACKET);
diff --git a/packet_states.h b/packet_states.h
index 454f815..b2bfeac 100644
--- a/packet_states.h
+++ b/packet_states.h
@@ -23,6 +23,8 @@
    SIRF_ACK_LEAD_2,	/* seen c of possible SiRF Ack */
    AIS_LEAD_1,		/* seen A of possible marine AIS message */
    AIS_LEAD_2,		/* seen I of possible marine AIS message */
+   AIS_LEAD_ALT1,	/* seen B of possible marine AIS message */
+   AIS_LEAD_ALT2,	/* seen S of possible marine AIS message */
 
    SEATALK_LEAD_1,	/* SeaTalk/Garmin packet leader 'I' */
    WEATHER_LEAD_1,	/* Weather instrument packet leader 'W' */
-- 
1.7.7



From MAILER-DAEMON Tue Jun 05 12:47:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbwud-00005T-UP
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 12:47:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38819)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SbwuX-0008VT-79
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:47:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SbwuV-0001MX-CO
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:47:12 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:37121 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SbwuV-0001MG-8D
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 12:47:11 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id C320F4049B; Tue,  5 Jun 2012 12:46:58 -0400 (EDT)
Date: Tue, 5 Jun 2012 12:46:58 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: chris@techworks.ie
Message-ID: <20120605164658.GA30561@thyrsus.com>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1338913584-30825-1-git-send-email-chris@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH 0/5] [AIS] Modifications with potential side
 effects
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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, 05 Jun 2012 16:47:18 -0000

chris@techworks.ie <chris@techworks.ie>:
> These 5 patches make modifications to some code that affects other components.
> Scons check passed on each individual commit, so there shouldn't be any regression.
> 
> - The first patch makes gpsdecode honor the unscaled flag, and fix SConstruct
>   so that the tests are not affected.
> - The second one makes gpsd_hexdump() always dump in hexadecimal form (no more
>   "maybe text, maybe hex" behaviour)
> - The third one increase the maximum json value length (AIS can produce "very"
>   long strings)
> - The forth one adds a new talker ID: BS, which is used by some AIS
>   basestation
> - The last one adds a simple script that can be used to check for JSON
>   validity

Are these applied already?  The all look good except the change to
hexdump behavior.  It's written that way for a reason - otherwise we get
logfiles from NMEA devices that are unnecessarily obfuscated.  
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Jun 05 16:09:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sc045-0006Nl-OV
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 16:09:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38191)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1Sc042-0006LD-D8
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 16:09:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1Sc040-00089s-EZ
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 16:09:13 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:53408)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1Sc040-00089L-8Q
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 16:09:12 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id E47C8506CF6;
	Tue,  5 Jun 2012 21:09:09 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id sTobR6rqo5DD; Tue,  5 Jun 2012 21:09:08 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 35DF9504E79;
	Tue,  5 Jun 2012 21:09:08 +0100 (IST)
Message-ID: <4FCE6770.6040204@techworks.ie>
Date: Tue, 05 Jun 2012 21:09:20 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: esr@thyrsus.com
References: <4FC17D70.7060700@techworks.ie> <4FC9359B.3050304@techworks.ie>
	<20120603094840.GA3139@thyrsus.com>
In-Reply-To: <20120603094840.GA3139@thyrsus.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Test coverage
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 20:09:15 -0000

On 03/06/12 10:48, Eric S. Raymond wrote:
> Christian Gagneraud<chris@techworks.ie>:
>> Any comments on this?
>
> You may have missed my previous reply.  I like the idea of having
> a coverage check, but I haven't figured out how to read those reports.
> Can you point me at documentation?

Well, I couldn't find proper documentation. But there's an option to add 
a legend which tells quickly how to read the report.
I have generated a coverage of my aishub campaign. See [1] for an 
example with the legend added at the top.

Basically:
Blue line: executed
Red line: not executed
Blue "+": branch taken
Red "-": branch not taken
Red "#": branch not executed.

For a switch case, you will have as many +/-/# as cases.
For a if test, you will have as many +/-/# as combinations. For example 
if(foo) gives 2, if (bar || baz) gives 4, ...

A real example:
86 [ +  + ]: 71181766 :     if (strstr(buf, "\"type\":1,") != NULL
87 [ +  + ]: 30675126 :         || strstr(buf, "\"type\":2,") != NULL
88 [ +  + ]: 29305376 :         || strstr(buf, "\"type\":3,") != NULL) {

The if at line 86 has been evaluated 71M times, type 1, 2 and 3 tests 
have all been evaluated to true and to false.
=> This test has 8 execution branches, they have all been taken at least 
once.

For this one:
221 [ +  + ][ -  + ]:655462 : else if (strstr(buf, "\"dac\":235,") != 
NULL || strstr(buf, "\"dac\":250,") != NULL) {

The if has been evaluated 655462 times, dac 235 test has been evaluated 
to true and to false, dac 250 test has never been evaluated to true but 
has been evaluated to false at least once.
=> This test has 4 execution branches, only 3 have been taken at least once.

And finally
253 [ -  + ]:56780 :  else if (strstr(buf, "\"fid\":13,") != NULL) {
254         :    0 :      status = json_read_object(buf, 
json_ais8_fid13, endptr);
255 [ #  # ]:    0 :                 if (status == 0) {

The if has been evaluated 56780 times, never to true, as a consequence, 
line 254 has never been executed, and the following if test has never 
been evaluated.


Chris.

[1] 
http://www.techworks.ie/pub/chris/gpsd/coverage/AIVDM-aishub/gpsd/gpsd.git/ais_json.c.gcov.html


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Tue Jun 05 17:47:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sc1af-00026g-Cr
	for mharc-gpsd-dev@gnu.org; Tue, 05 Jun 2012 17:47:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52772)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1Sc1ac-000250-Qs
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 17:47:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1Sc1aa-0005fk-P0
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 17:46:58 -0400
Received: from mail.recluse.de ([217.196.146.213]:36886)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1Sc1aa-0005fV-I7
	for gpsd-dev@nongnu.org; Tue, 05 Jun 2012 17:46:56 -0400
Received: from mail.recluse.de (localhost [127.0.0.1])
	by mail.recluse.de (Postfix) with ESMTP id CB5F7278A4;
	Tue,  5 Jun 2012 23:46:53 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at recluse.de
Received: from mail.recluse.de ([127.0.0.1])
	by mail.recluse.de (mail.recluse.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id Afx+GlVHILsA; Tue,  5 Jun 2012 23:46:48 +0200 (CEST)
Received: from think.bzed.org (188-195-124-69-dynip.superkabel.de
	[188.195.124.69])
	by mail.recluse.de (Postfix) with ESMTPSA id 05E1221063;
	Tue,  5 Jun 2012 23:46:47 +0200 (CEST)
Message-ID: <4FCE7E47.6020604@bzed.de>
Date: Tue, 05 Jun 2012 23:46:47 +0200
From: Bernd Zeimetz <bernd@bzed.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.4) Gecko/20120510 Icedove/10.0.4
MIME-Version: 1.0
To: Christian Gagneraud <chris@techworks.ie>
References: <4FCA87D0.2020306@techworks.ie>
In-Reply-To: <4FCA87D0.2020306@techworks.ie>
X-Enigmail-Version: 1.4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 217.196.146.213
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tests: About adding a JSON validator
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 05 Jun 2012 21:47:00 -0000

Hi,


> While working on having the AIS code better tested, I wrote a simple python
> script that try to parse the JSON dump of the AIVDM mesages, and I discovered
> two syntax errors in it (2 non quoted string values).

what did you use to check for syntax errors? Having something like jsonlint from
python-demjson to validate generated json automatically would be a good thing to
have in the regression tests.

> 
> I then did the same with all the JSON files in test/ but i didn't discover more
> problems.
> 
> Do you thinks, it would be good to have this kind of thing added to "scons check"?

Definitely.

Cheers,

Bernd


-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F


From MAILER-DAEMON Wed Jun 06 09:51:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ScGeQ-0007x5-GW
	for mharc-gpsd-dev@gnu.org; Wed, 06 Jun 2012 09:51:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48774)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1ScGeJ-0007vc-RC
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 09:51:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1ScGeD-000412-Ja
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 09:51:47 -0400
Received: from mailout03.t-online.de ([194.25.134.81]:51996)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1ScGeD-00040s-9N
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 09:51:41 -0400
Received: from fwd09.aul.t-online.de (fwd09.aul.t-online.de )
	by mailout03.t-online.de with smtp 
	id 1ScGeA-0003Bp-87; Wed, 06 Jun 2012 15:51:38 +0200
Received: from localhost
	(GQLrC6ZbZhlyzzuOmJXw6B2TA+6TyGzTJTnHmvD+ItZ34yinK6nlZ3jeoOBy0uQg3b@[172.20.101.250])
	by fwd09.aul.t-online.de
	with esmtp id 1ScGe7-1cfY6C0; Wed, 6 Jun 2012 15:51:35 +0200
MIME-Version: 1.0
Received: from 89.183.68.208:57368 by cmpweb31.aul.t-online.de with HTTP/1.1
	(NGCS V4-0-4-0 on API V3-11-7-2)
Date: Wed, 06 Jun 2012 15:51:35 +0200
To: "gpsd-dev" <gpsd-dev@nongnu.org>
X-Priority: 3
X-UMS: email
X-Mailer: DTAG NGCS V4-0-4-0
From: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Message-ID: <1ScGe7-1cfY6C0@fwd09.aul.t-online.de>
X-ID: GQLrC6ZbZhlyzzuOmJXw6B2TA+6TyGzTJTnHmvD+ItZ34yinK6nlZ3jeoOBy0uQg3b@t-dialin.net
X-TOI-MSGID: ab0e5b09-0516-4e0b-8bfc-bf84f0152a2b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 194.25.134.81
Subject: [gpsd-dev] scons audit fails on ubuntu 12.04
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
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: Wed, 06 Jun 2012 13:51:53 -0000

Hello,

running "scons audit" throw an error.

Here is the log output:

Running splint on libgpsd...
splint -I/usr/include/x86_64-linux-gnu -I/usr/include/libusb-1.0 +quiet -exportlocal -redef bsd_base64.c crc24q.c gpsd_json.c geoid.c isgps.c libgpsd_core.c net_dgpsip.c net_gnss_dispatch.c net_ntrip.c packet.c pseudonmea.c serial.c subframe.c timebase.c drivers.c driver_ais.c driver_evermore.c driver_garmin.c driver_garmin_txt.c driver_geostar.c driver_italk.c driver_navcom.c driver_nmea0183.c driver_nmea2000.c driver_oncore.c driver_rtcm2.c driver_rtcm3.c driver_sirf.c driver_superstar2.c driver_tsip.c driver_ubx.c driver_zodiac.c
serial.c:364:15: Parse Error. (For help on parse errors, see splint -help
               parseerrors.)
*** Cannot continue.
Running splint on user-side libraries...
splint -I/usr/include/x86_64-linux-gnu -I/usr/include/libusb-1.0 +quiet -exportlocal -fileextensions -redef ais_json.c bits.c daemon.c gpsutils.c gpsdclient.c gps_maskdump.c hex.c json.c libgps_core.c libgps_dbus.c libgps_json.c libgps_shm.c libgps_sock.c netlib.c rtcm2_json.c shared_json.c strl.c libgpsmm.cpp

Question: are the other files, for example driver_* are still checked?

Reinhard





From MAILER-DAEMON Wed Jun 06 12:41:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ScJIn-000620-CC
	for mharc-gpsd-dev@gnu.org; Wed, 06 Jun 2012 12:41:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48094)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ScJIi-00061M-4m
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 12:41:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ScJIg-0005VO-0F
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 12:41:39 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:52197)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ScJIf-0005VF-Q9
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 12:41:37 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id ADB695070FA;
	Wed,  6 Jun 2012 17:41:35 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 9bebfLmqpDdW; Wed,  6 Jun 2012 17:41:34 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id B58A0504E79;
	Wed,  6 Jun 2012 17:41:33 +0100 (IST)
Message-ID: <4FCF884A.9050806@techworks.ie>
Date: Wed, 06 Jun 2012 17:41:46 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: Bernd Zeimetz <bernd@bzed.de>
References: <4FCA87D0.2020306@techworks.ie> <4FCE7E47.6020604@bzed.de>
In-Reply-To: <4FCE7E47.6020604@bzed.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tests: About adding a JSON validator
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Wed, 06 Jun 2012 16:41:44 -0000

On 05/06/12 22:46, Bernd Zeimetz wrote:
> Hi,
>
>
>> While working on having the AIS code better tested, I wrote a simple python
>> script that try to parse the JSON dump of the AIVDM mesages, and I discovered
>> two syntax errors in it (2 non quoted string values).
>
> what did you use to check for syntax errors? Having something like jsonlint from
> python-demjson to validate generated json automatically would be a good thing to
> have in the regression tests.

No, I didn't use jsonlint, i wrote a simple python script that loads 
json from stdin, it will print errors if it can't be loaded.
The json.loads() check for validity if I'm not wrong. And it worked 
quite well to detect comma, colon and quotes issues at least.

Maybe jsonlint is a better solution, the python json decoder is not very 
sctrict, for example it allows by default NaN, Infinity and -Infinity, 
which are not part of JSON.

Chris

>
>>
>> I then did the same with all the JSON files in test/ but i didn't discover more
>> problems.
>>
>> Do you thinks, it would be good to have this kind of thing added to "scons check"?
>
> Definitely.
>
> Cheers,
>
> Bernd
>
>


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Wed Jun 06 14:19:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ScKpb-0001mf-3R
	for mharc-gpsd-dev@gnu.org; Wed, 06 Jun 2012 14:19:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35439)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1ScKpU-0001mL-CU
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 14:19:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1ScKpO-0002d7-5X
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 14:19:35 -0400
Received: from mailout01.t-online.de ([194.25.134.80]:40895)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1ScKpN-0002cX-SE
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 14:19:30 -0400
Received: from fwd14.aul.t-online.de (fwd14.aul.t-online.de )
	by mailout01.t-online.de with smtp 
	id 1ScKpL-00056Z-FP; Wed, 06 Jun 2012 20:19:27 +0200
Received: from localhost
	(E2xVH6ZOwha0JJxNDrQdkbvnrH62Zwo+7RzhNTF82htP55pDXWMoozUbs535AKAQnf@[172.20.101.250])
	by fwd14.aul.t-online.de
	with esmtp id 1ScKpB-0H79jU0; Wed, 6 Jun 2012 20:19:17 +0200
MIME-Version: 1.0
Received: from 89.183.68.208:59976 by cmpweb19.aul.t-online.de with HTTP/1.1
	(NGCS V4-0-4-0 on API V3-11-7-2)
Date: Wed, 06 Jun 2012 20:19:17 +0200
To: "gpsd-dev" <gpsd-dev@nongnu.org>, "Eric S. Raymond" <esr@thyrsus.com>
X-Priority: 3
X-UMS: email
X-Mailer: DTAG NGCS V4-0-4-0
From: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Content-Type: multipart/alternative;
	boundary="=_680fb1825ccbdef7997111bf9592b8f2"
Message-ID: <1ScKpB-0H79jU0@fwd14.aul.t-online.de>
X-ID: E2xVH6ZOwha0JJxNDrQdkbvnrH62Zwo+7RzhNTF82htP55pDXWMoozUbs535AKAQnf@t-dialin.net
X-TOI-MSGID: 53835675-5374-47cb-bab0-f23a9a5a5def
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 194.25.134.80
Subject: [gpsd-dev] Moving nmea2000 open function out of libgpsd_core.c
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
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: Wed, 06 Jun 2012 18:19:42 -0000

--=_680fb1825ccbdef7997111bf9592b8f2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Hello, 

	1.) does it make sense to move most of the nmea2000 code out of the
libgpsd_core.c and into driver_nmea2000.c, at the cost of an
driver_nmea2000.h file? 

	2.) I may be a lean approach to handle every device on the a nmea2000
bus as an own device, and open the device automatic, when it is
detected. My idea is to call  add_device() with a string like
"nmea2000://can0:14".  14 is in this example the device id on the
nmea2000 bus. The cost is, that "add_device" can no longer be a static
function. 

	Comments are welcome 

	Reinhard
--=_680fb1825ccbdef7997111bf9592b8f2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html><head><title></title><meta http-equiv=3D"Content-Type" content=3D"tex=
t/html; charset=3DUTF-8"/></head><body><p style=3D"margin: 0px;">Hello,</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">1.) does it make sense to move most of the nmea20=
00 code out of the libgpsd_core.c and into driver_nmea2000.c, at the cost o=
f an driver_nmea2000.h file?</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">2.) I may be a lean approach to handle every devi=
ce on the a nmea2000 bus as an own device, and open the device automatic, w=
hen it is detected. My idea is to call  add_device() with a string like "nm=
ea2000://can0:14".  14 is in this example the device id on the nmea2000 bus=
. The cost is, that "add_device" can no longer be a static function.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Comments are welcome</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Reinhard</p></body></html>
--=_680fb1825ccbdef7997111bf9592b8f2--




From MAILER-DAEMON Wed Jun 06 15:46:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ScMBr-0006Tb-HU
	for mharc-gpsd-dev@gnu.org; Wed, 06 Jun 2012 15:46:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41472)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1ScMBj-0006SQ-V6
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 15:46:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1ScMBh-0004ad-ID
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 15:46:39 -0400
Received: from catbert.rellim.com ([204.17.205.1]:57614)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1ScMBh-0004aK-0r
	for gpsd-dev@nongnu.org; Wed, 06 Jun 2012 15:46:37 -0400
Received: from localhost (root@spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q56JkXdT031445
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Wed, 6 Jun 2012 12:46:33 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q56JkXdT031445
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1339011994; bh=UcvN49Tiu9QD/l4OdIlsHPwkBx7eFS1E8csKnrTdPoI=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	Mime-Version:Content-Type;
	b=HrKMEEBIcFG+8jY4Z7WX/rbz3VnF6TFUVMcn3EoAFc8wrrNRrWkEyM7umnL98mshI
	lOeZNvlWtz82hzhI+JZVQ==
Date: Wed, 6 Jun 2012 12:46:27 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Message-ID: <20120606124627.5257fff2.gem@rellim.com>
In-Reply-To: <1ScKpB-0H79jU0@fwd14.aul.t-online.de>
References: <1ScKpB-0H79jU0@fwd14.aul.t-online.de>
Organization: Rellim
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/SXm25t7QCF+0FWIbtLLq2NO";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Cc: gpsd-dev <gpsd-dev@nongnu.org>
Subject: Re: [gpsd-dev] Moving nmea2000 open function out of libgpsd_core.c
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Wed, 06 Jun 2012 19:46:45 -0000

--Sig_/SXm25t7QCF+0FWIbtLLq2NO
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo Reinhard.Arlt@t-online.de!

On Wed, 06 Jun 2012 20:19:17 +0200
"Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de> wrote:

> 	1.) does it make sense to move most of the nmea2000 code out
> of the libgpsd_core.c and into driver_nmea2000.c, at the cost of an
> driver_nmea2000.h file?=20

Makes sense to me.

> 	2.) I may be a lean approach to handle every device on the a
> nmea2000 bus as an own device, and open the device automatic, when it
> is detected. My idea is to call  add_device() with a string like
> "nmea2000://can0:14".  14 is in this example the device id on the
> nmea2000 bus. The cost is, that "add_device" can no longer be a static
> function.=20

We already have a lot of GPS driver specific functions handled through
pointers in the device table.  You could maybe grow that sort of
mechanism to your needs.

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

--Sig_/SXm25t7QCF+0FWIbtLLq2NO
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk/Ps5gACgkQBmnRqz71OvNZTQCgnmamjv5lo6XmrQDxzEsQ1Df8
FzAAnAhs75BfcOF80Mbm4uCX8WOipwde
=8Rt3
-----END PGP SIGNATURE-----

--Sig_/SXm25t7QCF+0FWIbtLLq2NO--


From MAILER-DAEMON Tue Jun 12 13:47:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeVC6-0000D6-5E
	for mharc-gpsd-dev@gnu.org; Tue, 12 Jun 2012 13:47:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49420)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SeVBz-0000Bp-Dg
	for gpsd-dev@nongnu.org; Tue, 12 Jun 2012 13:47:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SeVBx-0000EZ-Am
	for gpsd-dev@nongnu.org; Tue, 12 Jun 2012 13:47:46 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:33613)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1SeVBx-0000DF-44
	for gpsd-dev@nongnu.org; Tue, 12 Jun 2012 13:47:45 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 428F96019CF
	for <gpsd-dev@nongnu.org>; Tue, 12 Jun 2012 18:47:42 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Ij+Z-Sl4BpDB; Tue, 12 Jun 2012 18:47:41 +0100 (IST)
Received: from pluton.techworks.office (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPA id 42E9D6001F3;
	Tue, 12 Jun 2012 18:47:41 +0100 (IST)
From: chris@techworks.ie
To: gpsd-dev@nongnu.org
Date: Tue, 12 Jun 2012 18:47:52 +0100
Message-Id: <1339523272-12276-1-git-send-email-chris@techworks.ie>
X-Mailer: git-send-email 1.7.7
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: [gpsd-dev] [PATCH] json parser: fix empty array bug
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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 Jun 2012 17:47:53 -0000

From: Christian Gagneraud <chris@techworks.ie>

This patch fix the last bug of my AIS campaign:
The JSON parser fails to parse an empty array of struct.

After trying to modify the state machine in json_read_object(), I realised, that
the simpliest and the most natural way was to check for this special case
before running the loop in json_read_array().

Eric, if you're OK with this patch, I'll push it with my previous ones, except
of course the hexdump one, which btw, am still waiting for your suggestions.

I could commit as well my AIS bug fixes and the updated testsuites, but
without the hexdump fix, the aivdm-regress will fail.

---
 json.c      |    7 +++++++
 test_json.c |    9 +++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/json.c b/json.c
index 3f3278f..5550f22 100644
--- a/json.c
+++ b/json.c
@@ -529,6 +529,13 @@ int json_read_array(const char *cp, const struct json_array_t *arr,
 
     tp = arr->arr.strings.store;
     arrcount = 0;
+
+    /* Check for empty array */
+    while (isspace(*cp))
+	cp++;
+    if (*cp == ']')
+	goto breakout;
+
     for (offset = 0; offset < arr->maxlen; offset++) {
 	json_debug_trace((1, "Looking at %s\n", cp));
 	switch (arr->element_type) {
diff --git a/test_json.c b/test_json.c
index 2c365e6..85059f8 100644
--- a/test_json.c
+++ b/test_json.c
@@ -206,6 +206,11 @@ static const struct json_attr_t json_attrs_8[] = {
     {"foe",  t_integer, .addr.integer = &foe, .map=enum_table},
     {NULL},
 };
+
+/* Case 9: Like case 6 but w/ an empty array */
+
+static const char *json_str9 = "{\"parts\":[]}";
+
 /*@ +fullinitblock @*/
 /* *INDENT-ON* */
 
@@ -303,6 +308,10 @@ int main(int argc UNUSED, char *argv[]UNUSED)
     assert_integer("fie", fie, 6);
     assert_integer("foe", foe, 14);
 
+    status = json_read_object(json_str9, json_attrs_6, NULL);
+    assert_case(9, status);
+    assert_integer("dumbcount", dumbcount, 0);
+
     (void)fprintf(stderr, "succeeded.\n");
 
     exit(0);
-- 
1.7.7



From MAILER-DAEMON Tue Jun 12 15:08:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeWRs-0001E1-83
	for mharc-gpsd-dev@gnu.org; Tue, 12 Jun 2012 15:08:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60048)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SeWRo-0001Cx-Lk
	for gpsd-dev@nongnu.org; Tue, 12 Jun 2012 15:08:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SeWRl-0004CE-L5
	for gpsd-dev@nongnu.org; Tue, 12 Jun 2012 15:08:12 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:55719 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SeWRl-0004As-H5
	for gpsd-dev@nongnu.org; Tue, 12 Jun 2012 15:08:09 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id CF8ED40481; Tue, 12 Jun 2012 15:08:04 -0400 (EDT)
Date: Tue, 12 Jun 2012 15:08:04 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: chris@techworks.ie
Message-ID: <20120612190804.GB17774@thyrsus.com>
References: <1339523272-12276-1-git-send-email-chris@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1339523272-12276-1-git-send-email-chris@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH] json parser: fix empty array bug
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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 Jun 2012 19:08:14 -0000

chris@techworks.ie <chris@techworks.ie>:
> Eric, if you're OK with this patch, I'll push it with my previous ones, except
> of course the hexdump one, which btw, am still waiting for your suggestions.

Do it.  I'm trying to budget time to think about the hexdump issue, but
I'm eyebrow-deep in another project at the moment.

> I could commit as well my AIS bug fixes and the updated testsuites, but
> without the hexdump fix, the aivdm-regress will fail.

Understood.  We'll get this resolved before 3.7.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Jun 19 20:12:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sh8Wf-0007Jz-4g
	for mharc-gpsd-dev@gnu.org; Tue, 19 Jun 2012 20:12:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54875)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sh8Wd-0007Jg-5o
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 20:12:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sh8Wb-0003oJ-Br
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 20:11:58 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:40876 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sh8Wb-0003oB-7T
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 20:11:57 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id AE3DE40651; Tue, 19 Jun 2012 20:11:44 -0400 (EDT)
Date: Tue, 19 Jun 2012 20:11:44 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Message-ID: <20120620001144.GB15720@thyrsus.com>
References: <1ScGe7-1cfY6C0@fwd09.aul.t-online.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1ScGe7-1cfY6C0@fwd09.aul.t-online.de>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev <gpsd-dev@nongnu.org>
Subject: Re: [gpsd-dev] scons audit fails on ubuntu 12.04
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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: Wed, 20 Jun 2012 00:12:00 -0000

Reinhard.Arlt@t-online.de <Reinhard.Arlt@t-online.de>:
> running "scons audit" throw an error.

Found it.  splint gets confused by variable declarations after statements.
There's a case of that guarded by #ifdef HAVE_BLUEZ.  I'f pushed a fix.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Jun 19 20:52:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sh99q-0007qL-Ky
	for mharc-gpsd-dev@gnu.org; Tue, 19 Jun 2012 20:52:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43093)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sh99n-0007pW-Mv
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 20:52:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sh99l-0007qc-NU
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 20:52:27 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:41132 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sh99l-0007qP-JD
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 20:52:25 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 0F25640651; Tue, 19 Jun 2012 20:52:13 -0400 (EDT)
Date: Tue, 19 Jun 2012 20:52:13 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120620005212.GA16813@thyrsus.com>
References: <4FCC51A6.7070708@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FCC51A6.7070708@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tricky bug in the json parser
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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: Wed, 20 Jun 2012 00:52:29 -0000

Christian Gagneraud <chris@techworks.ie>:
> Hi all,
> 
> I just have one last bug to fix from my live test campaign. and it
> is a bit tricky to understand for me as I have to dive into the
> hairy json.c.
> 
> So basically, here are 2 AIS sentences which contain an array of 1 struct:
> !AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02
> !AIVDM,1,1,,A,6h2E3N0rThqP0600J00000000000,0*51
> 
> The dumping doesn't seems to cause any trouble, but reading back the
> JSON crashes gpsdecode:
> echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode -ju
> {"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":false,"seqno":2,"dest_mmsi":246351000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-16777216,"lat":0,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0}]}
> echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode
> -ju | gpsdecode -jeu
> Segmentation fault
> 
> I saw some other messages with arrays of 0 structures, they don't
> crash the json parser.

I'm getting back to GPSD after spending a week and a half immersed in 
another project.  Did this one get fixed?
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Jun 19 21:48:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ShA1f-0001dY-Iy
	for mharc-gpsd-dev@gnu.org; Tue, 19 Jun 2012 21:48:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46641)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShA1c-0001bs-Mr
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 21:48:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShA1a-0006Ud-E0
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 21:48:04 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:41955 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShA1a-0006U9-9h
	for gpsd-dev@nongnu.org; Tue, 19 Jun 2012 21:48:02 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id B5BEC40651; Tue, 19 Jun 2012 21:47:49 -0400 (EDT)
Date: Tue, 19 Jun 2012 21:47:49 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: chris@techworks.ie
Message-ID: <20120620014749.GA20051@thyrsus.com>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
	<1338913584-30825-6-git-send-email-chris@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1338913584-30825-6-git-send-email-chris@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: Christian Gagneraud <cgagneraud@techworks.ie>, gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH 5/5] Add script to test for JSON validity
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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: Wed, 20 Jun 2012 01:48:06 -0000

chris@techworks.ie <chris@techworks.ie>:
> This simple script can be used to check if the JSON cade presented on its
> standard input is valid JSON.
> It has already been very useful to chase up typos in gpsd_json.c

I haven't applied this because there was some talk on the list (which
you appeared to agree with) that a more general-purpose validator like 
jsonlint might be better suited for this application.

If you decide this specialized script is better, please wrote a patch that 
puts it in devtools/, with an explanatory comment in devtools/README.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Wed Jun 20 05:36:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ShHKl-0006Zh-NX
	for mharc-gpsd-dev@gnu.org; Wed, 20 Jun 2012 05:36:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53715)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ShHKf-0006Za-Af
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 05:36:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ShHKY-0000iY-Fm
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 05:36:12 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:53390)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ShHKY-0000i7-9n
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 05:36:06 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id ED10E5A09CB;
	Wed, 20 Jun 2012 10:36:03 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id CatCWK6QQGmX; Wed, 20 Jun 2012 10:36:02 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 35F525A021A;
	Wed, 20 Jun 2012 10:36:02 +0100 (IST)
Message-ID: <4FE199A3.20507@techworks.ie>
Date: Wed, 20 Jun 2012 10:36:35 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: esr@thyrsus.com, gpsd-dev@nongnu.org
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
	<20120605164658.GA30561@thyrsus.com>
	<4FCE397E.6040604@techworks.ie>
	<20120620015345.GB20051@thyrsus.com>
In-Reply-To: <20120620015345.GB20051@thyrsus.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: Re: [gpsd-dev] [PATCH 0/5] [AIS] Modifications with potential side
 effects
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Wed, 20 Jun 2012 09:36:18 -0000

On 20/06/12 02:53, Eric S. Raymond wrote:
> Christian Gagneraud<chris@techworks.ie>:
>>> Are these applied already?  The all look good except the change to
>>> hexdump behavior.  It's written that way for a reason - otherwise we get
>>> logfiles from NMEA devices that are unnecessarily obfuscated.
>>
>> No, nothing has been applied, I wanted your green light first.
>
> I've just merged 1, 3, and 4.  I sent you a separate note about 5.
>
>> For the hexdump, how can we move forward then?
>> Maybe we should have a wrapper function for this case, something
>> like gpsd_maybe_hexdump(), gpsd_text_or_hex_dump(), ...
>>
>> What do you think?
>
> First need to understand your testing strategy better and why you
> consider patch 2 essential to it.

Here is the test strategy:

On all the AIS data, the following tests were done:
     - AIVDM decoding
     - JSON scaled dump
     - JSON validity check on scaled dump.
     - JSON unscaled dump
     - JSON validity check on unscaled dump
     - JSON unscaled idempotency check
     - JSON unscaled/scaled idempotency check

     The last check consisted of:
     - parsing the unscaled dump
     - dumping it back in scaled mode
     - compare it with the original scaled dump.

If you consider GPSD as a black box, and look at data path using 
gpsdecode, the above will test all of them and make sure the ouputs are 
consistent:
- AIVDM -> JSON unscaled
- AIVDM -> JSON scaled
- JSON unscaled -> JSON unscaled
- JSON unscaled -> JSON scaled

> Please understand the tradeoff here.  Forcing hex dumping all the time
> may be a desirable uniformity, but it makes logs from NMEA devices
> needlessly difficult to read.

I fully understand your point. But if you try to decode these guys:
!AIVDM,1,1,,A,JB3R0GO7p>vQL8tjw0b5hqpd0706kh9d3lR2vbl0400,2*40
!AIVDM,1,1,,A,J1@@0IK70PGgT740000000000@000?D0ih1e00006JlPC9C3,0*6B
!AIVDM,1,1,,B,JaL0mr5P000DtRDMddr@0?vF06iD,0*75
!AIVDM,1,1,,A,J0@00@370>t0Lh3P0000200H:2rN92,4*14

You will see that the hex dump contains garbage (non-ascii), which 
sounds strange to me, because it means that the values failed the "if 
(!isprint(*cp) && !isspace(*cp))" test.
Maybe it's a locale issue...

A simple way to fix the problem and make everyone happy would be to 
create a gpsd_maybe_hexdump() that contains this "printable" test and 
either returns gpsd_hexdump() or the untouched buffer.

Then the coders have the choice between a real hexdump (gpsd_hexdump) 
and a "clever" hexdump (gpsd_maybe_hexdump).

Chris

-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Wed Jun 20 05:45:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ShHTg-00048R-DI
	for mharc-gpsd-dev@gnu.org; Wed, 20 Jun 2012 05:45:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45216)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ShHTZ-00047p-LW
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 05:45:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ShHTU-0003Ku-Mn
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 05:45:25 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:60479)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1ShHTU-0003KT-Cf
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 05:45:20 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id AC8EF5A03CC;
	Wed, 20 Jun 2012 10:45:18 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id cftKS7HAMR9z; Wed, 20 Jun 2012 10:45:17 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 4CD095A021A;
	Wed, 20 Jun 2012 10:45:17 +0100 (IST)
Message-ID: <4FE19BCE.1060300@techworks.ie>
Date: Wed, 20 Jun 2012 10:45:50 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: esr@thyrsus.com
References: <4FCC51A6.7070708@techworks.ie>
	<20120620005212.GA16813@thyrsus.com>
In-Reply-To: <20120620005212.GA16813@thyrsus.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tricky bug in the json parser
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Wed, 20 Jun 2012 09:45:31 -0000

On 20/06/12 01:52, Eric S. Raymond wrote:
> Christian Gagneraud<chris@techworks.ie>:
>> Hi all,
>>
>> I just have one last bug to fix from my live test campaign. and it
>> is a bit tricky to understand for me as I have to dive into the
>> hairy json.c.
>>
>> So basically, here are 2 AIS sentences which contain an array of 1 struct:
>> !AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02
>> !AIVDM,1,1,,A,6h2E3N0rThqP0600J00000000000,0*51
>>
>> The dumping doesn't seems to cause any trouble, but reading back the
>> JSON crashes gpsdecode:
>> echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode -ju
>> {"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":false,"seqno":2,"dest_mmsi":246351000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-16777216,"lat":0,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0}]}
>> echo '!AIVDM,1,1,,A,6h2E3MHrg19P0600@00000000000,0*02' | gpsdecode
>> -ju | gpsdecode -jeu
>> Segmentation fault
>>
>> I saw some other messages with arrays of 0 structures, they don't
>> crash the json parser.
>
> I'm getting back to GPSD after spending a week and a half immersed in
> another project.  Did this one get fixed?

Yes, it is in my local branch. The needed changes are part of a big 
patch that fixes all the issues found in the AIS code. I didn't try to 
split that patch, because there are really plenty of small changes all 
around the place (touching only AIS code).

Chris

-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Wed Jun 20 09:17:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ShKn5-0002KR-NP
	for mharc-gpsd-dev@gnu.org; Wed, 20 Jun 2012 09:17:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56269)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShKmy-0002FQ-Vz
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 09:17:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShKms-0000Q2-Mk
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 09:17:40 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:44282 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShKms-0000Pb-JE
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 09:17:34 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 839AD40651; Wed, 20 Jun 2012 09:17:21 -0400 (EDT)
Date: Wed, 20 Jun 2012 09:17:21 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120620131721.GA27185@thyrsus.com>
References: <1338913584-30825-1-git-send-email-chris@techworks.ie>
	<20120605164658.GA30561@thyrsus.com>
	<4FCE397E.6040604@techworks.ie>
	<20120620015345.GB20051@thyrsus.com> <4FE199A3.20507@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FE199A3.20507@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] [PATCH 0/5] [AIS] Modifications with potential side
 effects
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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: Wed, 20 Jun 2012 13:17:46 -0000

Christian Gagneraud <chris@techworks.ie>:
> A simple way to fix the problem and make everyone happy would be to
> create a gpsd_maybe_hexdump() that contains this "printable" test
> and either returns gpsd_hexdump() or the untouched buffer.
> 
> Then the coders have the choice between a real hexdump
> (gpsd_hexdump) and a "clever" hexdump (gpsd_maybe_hexdump).

I reached the same conclusion last night, and just pushed the change.  
The "clever" version is called gpsd_packetdump().

I guess this means you can push your test changes.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Wed Jun 20 09:19:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ShKoZ-0003IG-52
	for mharc-gpsd-dev@gnu.org; Wed, 20 Jun 2012 09:19:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56610)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShKoS-0003Fi-0Z
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 09:19:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShKoI-000131-2n
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 09:19:11 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:44288 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1ShKoH-00012g-V4
	for gpsd-dev@nongnu.org; Wed, 20 Jun 2012 09:19:02 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 4C40340651; Wed, 20 Jun 2012 09:18:49 -0400 (EDT)
Date: Wed, 20 Jun 2012 09:18:49 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120620131849.GB27185@thyrsus.com>
References: <4FCC51A6.7070708@techworks.ie>
	<20120620005212.GA16813@thyrsus.com>
	<4FE19BCE.1060300@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FE19BCE.1060300@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Tricky bug in the json parser
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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: Wed, 20 Jun 2012 13:19:17 -0000

Christian Gagneraud <chris@techworks.ie>:
> Yes, it is in my local branch. The needed changes are part of a big
> patch that fixes all the issues found in the AIS code. I didn't try
> to split that patch, because there are really plenty of small
> changes all around the place (touching only AIS code).

Are you waiting on anything before pushing this?  I don't know of
any reason you shouldn't, at this point.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Jun 26 17:11:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sjd3G-0004H9-3H
	for mharc-gpsd-dev@gnu.org; Tue, 26 Jun 2012 17:11:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55191)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dlahouss@mtu.edu>) id 1Sj8ND-0005hA-Gd
	for gpsd-dev@nongnu.org; Mon, 25 Jun 2012 08:26:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dlahouss@mtu.edu>) id 1Sj8N9-0001Qu-2R
	for gpsd-dev@nongnu.org; Mon, 25 Jun 2012 08:26:31 -0400
Received: from mail-yw0-f46.google.com ([209.85.213.46]:43080)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dlahouss@mtu.edu>) id 1Sj8N8-0001Qa-UB
	for gpsd-dev@nongnu.org; Mon, 25 Jun 2012 08:26:26 -0400
Received: by yhmm54 with SMTP id m54so3850492yhm.33
	for <gpsd-dev@nongnu.org>; Mon, 25 Jun 2012 05:26:24 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=message-id:subject:from:to:date:content-type:x-mailer
	:content-transfer-encoding:mime-version:x-gm-message-state;
	bh=vkZ69MkEK5SLSCy+xbGP76Rxsq7k99SZ7ZXjw4upQ0Y=;
	b=IK/H3jznNaVFqDmjHLdkNPy08+nYvbKQLo1BMFlwUIQcKVeMAUYOAlluWnTPu5k9XD
	/yMlD8tFl/avKLcbqQRfbWUHoeKzgPI8aIUPW0wmCif4M5ydD0ogTIcuSq1hBQ0gE5S1
	4d2xaSHbfmgBmMOZ3fIzOf5cQt3PIeIfrxKekS8FV4sa8RJ/VIt/p55bQiXpKFePf8/r
	ECO8qZlO/RJMMY2tHMdGDq45hed2QEXZJhGP0nUZNtm685y1UFVAgLxkkd2Xfuw4FDCG
	KcCl7dEtvH5JOifhJHmZh53waPKGIagJGXijDWU9oPkesDDlv+XN6eIOeQ4BMyHAc7YA
	klQg==
Received: by 10.50.11.225 with SMTP id t1mr7954443igb.64.1340627183740;
	Mon, 25 Jun 2012 05:26:23 -0700 (PDT)
Received: from ?IPv6:2001:4830:16b3:0:b5c5:db85:5e74:c31b?
	([2001:4830:16b3:0:b5c5:db85:5e74:c31b])
	by mx.google.com with ESMTPS id ai6sm16242225igc.0.2012.06.25.05.26.21
	(version=SSLv3 cipher=OTHER); Mon, 25 Jun 2012 05:26:22 -0700 (PDT)
Message-ID: <1340627322.2871.57.camel@fermion>
From: Derek LaHousse <dlahouss@mtu.edu>
To: gpsd-dev@nongnu.org
Date: Mon, 25 Jun 2012 08:28:42 -0400
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.2.2-1+b1 
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
X-Gm-Message-State: ALoCoQkuzDNDADReMMjr+dO5lSR7owuou8XRxlGf0H08ktWk+tU+uXIYJBq6r0aIkGYmCpvpXiF0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.213.46
X-Mailman-Approved-At: Tue, 26 Jun 2012 17:11:56 -0400
Subject: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 25 Jun 2012 12:26:37 -0000

Hello, GPSd developers.

I'd like your opinion on whether gpsd should support OBD data from
automobiles, or if it would be okay to create an obdd in gpsd's image.

Cars (in the US at least) made in the last decade have an OBDII port,
where a technician can read error codes and clear them.  It also allows
a device to ask for the speed, pedal positions, air temperature, etc.
See en.wikipedia.org/wiki/Table_of_OBD-II_Codes for more.  The interface
to the car is (sometimes) an Elm327-compatible device which converts the
variety of OBD protocols to a serial connection.

I connect the Elm327 to the car OBDII and to my computer's serial port.
My computer asks the serial port "01 0D".  Some short time later, it
receives "41 0D 20".  This exchange was me asking for my vehicle speed,
and the car responding "You asked for mode 01 (41), for speed (0D), and
the response is 32 km/h (20)."

This interaction has a few important characteristics.
- It's a serial connection, only one program can connect to it at a time
- It's polled, and can be provided more than 1 Hz.
- The more a program asks for, the less frequently it gets any
individual datum.
- It's ASCII-coded hex values which must be looked up for their meaning

Since it's from a serial device, this prompted me to think of a muxing
program, like the early gpsd.  However, the set of data is really a far
cry from TPV.  Because it's a polled connection, would a mux have to
plan when it asks?  Should a client subscribe at some rate, and let the
muxer handle the scheduling?

Current examples of obd consuming programs are "obdgpslogger" or
"scantool".  In obdgpslogger's case, it connects to the Elm327 serial
and to gpsd, and logs speed, throttle position, airflow, and engine RPM
along with the position from gpsd.  I believe it uses the timing from
gpsd to do the obd requests.  I'm unfamiliar with scantool at the
moment.

I would like to write an obdd server, where clients might use a libobd
to subscribe to data streams.  I expect there is much reuse possible of
gpsd code.  I ask for your comments and suggestions.

Derek LaHousse



From MAILER-DAEMON Tue Jun 26 19:00:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjekX-0007sy-Og
	for mharc-gpsd-dev@gnu.org; Tue, 26 Jun 2012 19:00:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44116)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@netgate.com>) id 1SjekU-0007sn-Q0
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:00:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@netgate.com>) id 1SjekS-00036v-Ed
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:00:42 -0400
Received: from mail-ob0-f173.google.com ([209.85.214.173]:63471)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@netgate.com>) id 1SjekS-00033i-9I
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:00:40 -0400
Received: by obbta14 with SMTP id ta14so568574obb.4
	for <gpsd-dev@nongnu.org>; Tue, 26 Jun 2012 16:00:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=content-type:mime-version:subject:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer
	:x-gm-message-state;
	bh=3te1zuxlLp+ogRPjLI26tpaePgCHBo9oDBkCRyaXwOw=;
	b=jDNNdTCyYcPYOWG6lUrwUJ/Ito1wzA2pdOqsC4LvVNJ+UoMGvP3arFgD88Jxng4unE
	09ZgIFq1ueDdfCQH836hFb2GGP7grflBZMpMK7+t44n0kJAb+Wv6aUK0RWTvZMYMX5NV
	aXe2IMM+JmaMDAlm7Pb2jCqi7gF9pLWwpg7pDK65JVZ1l62Nfox6pb6l1Ko20adDkIrw
	aZ7Xp1RqeoAms5ClPMiCkpU+ZFtiOJ2rYzVYwwdB/wvi6ksvUKn4Ra1ELqkhZzKrLxdF
	q+Excn1eDQT4WQlU3x5Ruxg4dIYH39ymjdYIoE7cWXYUWqH1zk7rZZcMYfTvfoW8Dxkd
	q3tw==
Received: by 10.182.111.39 with SMTP id if7mr4586665obb.56.1340751636550;
	Tue, 26 Jun 2012 16:00:36 -0700 (PDT)
Received: from kens-macbook.netgate.com (rrcs-24-153-177-138.sw.biz.rr.com.
	[24.153.177.138])
	by mx.google.com with ESMTPS id 9sm6612098obk.18.2012.06.26.16.00.35
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 26 Jun 2012 16:00:36 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1482\))
From: Jim Thompson <jim@netgate.com>
In-Reply-To: <1340627322.2871.57.camel@fermion>
Date: Tue, 26 Jun 2012 18:00:34 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <0832919A-864A-4665-8346-61838B4B2B2F@netgate.com>
References: <1340627322.2871.57.camel@fermion>
To: Derek LaHousse <dlahouss@mtu.edu>
X-Mailer: Apple Mail (2.1482)
X-Gm-Message-State: ALoCoQnGtHKyj6KLrLCdNxZFItUdb47fJXFCux9R27BEDVL17bNBexYRF7LYeaec4w53/dz7OwTn
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.173
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 26 Jun 2012 23:00:44 -0000


On Jun 25, 2012, at 7:28 AM, Derek LaHousse <dlahouss@mtu.edu> wrote:

> Hello, GPSd developers.
>=20
> I'd like your opinion on whether gpsd should support OBD data from
> automobiles, or if it would be okay to create an obdd in gpsd's image.
>=20
> Cars (in the US at least) made in the last decade have an OBDII port,
> where a technician can read error codes and clear them.  It also =
allows
> a device to ask for the speed, pedal positions, air temperature, etc.
> See en.wikipedia.org/wiki/Table_of_OBD-II_Codes for more.  The =
interface
> to the car is (sometimes) an Elm327-compatible device which converts =
the
> variety of OBD protocols to a serial connection.

The interface in the car is expressly never an ELM327-compatible device, =
as that would be a violation of Federal law.  The OBD-II specification =
cites a female 16-pin (2x8) J1962 connector, which must be located =
within 2 feet of the steering column.

SAE J1962 defines the pins as:

1. Manufacturer discretion. GM: J2411 GMLAN/SWC/Single-Wire CAN.=09
2. Bus positive Line of SAE-J1850 PWM and SAE-1850 VPW=09
3. Ford DCL(+) Argentina, Brazil (pre OBD-II) 1997-2000, USA, Europe, =
etc. Chrysler CCD Bus(+)=09
4. Chassis ground=09
5. Signal ground=09
6. CAN high (ISO 15765-4 and SAE-J2284)=09
7. K line of ISO 9141-2 and ISO 14230-4
8. -=09
9. -
10. Bus negative Line of SAE-J1850 PWM only (not SAE-1850 VPW)
11. Ford DCL(-) Argentina, Brazil (pre OBD-II) 1997-2000, USA, Europe, =
etc. Chrysler CCD Bus(-)
12. -
13. -
14. CAN low (ISO 15765-4 and SAE-J2284)
15. L line of ISO 9141-2 and ISO 14230-4
16. Battery voltage

Now, you might plug an ELM327-compatible device into the OBD-II port, =
but that, as they say, is different.

Given that, as of 2008 all vehicles sold in the US are required to =
implement CAN as one of their signaling protocols, the new sexiness is =
to read the CAN data directly off pins 6 and 14, and for this, you don't =
need (or want) an ELM-327 in the circuit.  The ELM can do it, but it's =
s-l-o-w.   The CAN bus operates at 250 kbits/sec or 500 kbits/sec, and =
the ELM-327, which is really just a pre-programmed PIC, isn't quite up =
to the task.

So there is nothing technically wrong with your proposal, but as the =
1996-2008 fleet ages out, it will become of less and less use. =20

That said, there is some CAN protocol stuff in gpsd for use with =
NMEA-2000, so perhaps that could be studied, if not re-used.

You asked.

Jim



From MAILER-DAEMON Tue Jun 26 19:14:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjexY-0001gv-C0
	for mharc-gpsd-dev@gnu.org; Tue, 26 Jun 2012 19:14:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37543)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dlahouss@mtu.edu>) id 1SjexV-0001gU-Mv
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:14:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dlahouss@mtu.edu>) id 1SjexU-0000DL-1c
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:14:09 -0400
Received: from mail-gh0-f173.google.com ([209.85.160.173]:61238)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dlahouss@mtu.edu>) id 1SjexT-0000Ck-Tb
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:14:07 -0400
Received: by ghrr14 with SMTP id r14so502350ghr.4
	for <gpsd-dev@nongnu.org>; Tue, 26 Jun 2012 16:14:05 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=message-id:subject:from:to:cc:date:in-reply-to:references
	:content-type:x-mailer:content-transfer-encoding:mime-version
	:x-gm-message-state;
	bh=2rC3WelBxgyfbK9ldtGqEW5mLDL7RH012bFQ9HtHXpk=;
	b=IUCgKgn3GwGGfjixkTEKhM5AHEstM3KraYmfPpF7kYKhk2/q+WeYRoIgfrvoJtIklo
	7d3OQYXfodEbcNxLGYxnxCZRrXKzlWsZbp1j4mf29RooK8Lf/e6hL4YpdcJ3k+BiPWoj
	HfIDL6WTDTw1680e4/FW9L/bHuQiFvSQUyH8eaXynD7brl/cRvhdywRiTTRf+FMFi4Np
	spGeC08WHZxr6gydqd77uu6BoA5tnVRTiWz5MLIUHJ/wqxqoF5z6aJlehBPcEFtEyYNH
	pHsmrj0PX6rWLi4NmYpiGySwjp7ZTTnSyXAC2MIzX6AwLEYceui9Us/Ntlssc52Kzox+
	ERGw==
Received: by 10.42.10.73 with SMTP id p9mr9518218icp.43.1340752445170;
	Tue, 26 Jun 2012 16:14:05 -0700 (PDT)
Received: from ?IPv6:2001:4830:16b3:0:b062:eddc:d93e:30a0?
	([2001:4830:16b3:0:b062:eddc:d93e:30a0])
	by mx.google.com with ESMTPS id wp10sm6446371igb.6.2012.06.26.16.14.02
	(version=SSLv3 cipher=OTHER); Tue, 26 Jun 2012 16:14:03 -0700 (PDT)
Message-ID: <1340752577.2669.10.camel@fermion>
From: Derek LaHousse <dlahouss@mtu.edu>
To: Jim Thompson <jim@netgate.com>
Date: Tue, 26 Jun 2012 19:16:17 -0400
In-Reply-To: <0832919A-864A-4665-8346-61838B4B2B2F@netgate.com>
References: <1340627322.2871.57.camel@fermion>
	<0832919A-864A-4665-8346-61838B4B2B2F@netgate.com>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.2.2-1+b1
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
X-Gm-Message-State: ALoCoQlDeQ6TBNX1nqrj8pnX1iDEpVj83l4dv5PGXp2ykX5WROyDerDrlfIi2tfaCzXI5MGYzw7F
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.173
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 26 Jun 2012 23:14:11 -0000

> The interface in the car is expressly never an ELM327-compatible device, 
> 
> Now, you might plug an ELM327-compatible device into the OBD-II port, but that, as they say, is different.

I mean that a common interface for the average computer would be through
an ELM327-compatible device, which itself is plugged into the OBDII
port.  I accept that it's slow, but it seems a good target for an
initial pass.  My Dell laptop doesn't have a CAN port accessible.
Thanks for helping me clarify.
 
> Given that, as of 2008 all vehicles sold in the US are required to implement CAN
I would hope to write something which could connect to CAN in the
future, but present the same interface to a client.  I believe this to
be like gpsd supporting different binary protocols.  An embedded
computer may present a CAN header, and it's on my wishlist.

> Slow
Limited by the device, sure.  For something like logging speed against
position, 1/s isn't so bad.  I accept I won't be polling 80 PIDs every
second.

> You asked.
I appreciate your answer.

Derek



From MAILER-DAEMON Tue Jun 26 19:27:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjfA6-0004UA-Rk
	for mharc-gpsd-dev@gnu.org; Tue, 26 Jun 2012 19:27:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59310)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1SjfA4-0004T2-33
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:27:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1SjfA1-0006Nd-TV
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:27:07 -0400
Received: from mail-ob0-f173.google.com ([209.85.214.173]:44684)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1SjfA1-0006Mo-L7
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 19:27:05 -0400
Received: by obbta14 with SMTP id ta14so599173obb.4
	for <gpsd-dev@nongnu.org>; Tue, 26 Jun 2012 16:27:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=UYXumdqAbg2I1ikxLt0dXD9mvs6+hN/xHfmHX2kxa68=;
	b=xlaxlrl+DgkpX5GQb1j9Z/znpFllmgYr6CU4xuzaAGNPj7YgerMzOoniW2nUq7IA/m
	7EQHGxaQu0z1x2QYLZExswcE/I0QufFuAwHpOGd375DtCv63maDClL8JT3kJkTKpE2io
	5Lh0krOFE2XpvRTTqBTelWPsvm46e9HmfFjNybBqggVRUZ3ZcqgHUyj89TP5hiCR4ID0
	6haONm0hFcV6UsaDYUUIZhlOcoAdm+g0f8PXHl9eIqFbRkuIRGGXFtZAJsekMuhE46AR
	d5oa/SPZ5EX6rSn/MdE4Q2RPMl0J4kUnHGbwlxo5Va3SoCH8dyW2aZcWEyUOeGz/6hew
	QAUQ==
MIME-Version: 1.0
Received: by 10.60.1.202 with SMTP id 10mr18220763oeo.15.1340753222929; Tue,
	26 Jun 2012 16:27:02 -0700 (PDT)
Received: by 10.182.216.40 with HTTP; Tue, 26 Jun 2012 16:27:02 -0700 (PDT)
Received: by 10.182.216.40 with HTTP; Tue, 26 Jun 2012 16:27:02 -0700 (PDT)
In-Reply-To: <1340752577.2669.10.camel@fermion>
References: <1340627322.2871.57.camel@fermion>
	<0832919A-864A-4665-8346-61838B4B2B2F@netgate.com>
	<1340752577.2669.10.camel@fermion>
Date: Tue, 26 Jun 2012 19:27:02 -0400
Message-ID: <CAFv7OighPvWpJjG=6ZYi7nNRr1-eA9v_LR4OZGn1GDGSHB7w2A@mail.gmail.com>
From: tz <tz2026@gmail.com>
To: Derek LaHousse <dlahouss@mtu.edu>
Content-Type: multipart/alternative; boundary=e89a8fb1fbc0958de004c3686f64
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.173
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 26 Jun 2012 23:27:09 -0000

--e89a8fb1fbc0958de004c3686f64
Content-Type: text/plain; charset=ISO-8859-1

Sometimes it is possible to decode raw vwhicle data - I don't for my harley
using my webgpsd at github.com/tz1 and there's harleydroid by stelian pop
that uses an elm327 in monitor mode.

An older project of mine on my nokia n810 did much of what you are talking
about - I think minigpsd (a precursor to webgpsd) is also up at github and
includes my radar detector as well as obd2 and harley.
On Jun 26, 2012 7:16 PM, "Derek LaHousse" <dlahouss@mtu.edu> wrote:

> > The interface in the car is expressly never an ELM327-compatible device,
> >
> > Now, you might plug an ELM327-compatible device into the OBD-II port,
> but that, as they say, is different.
>
> I mean that a common interface for the average computer would be through
> an ELM327-compatible device, which itself is plugged into the OBDII
> port.  I accept that it's slow, but it seems a good target for an
> initial pass.  My Dell laptop doesn't have a CAN port accessible.
> Thanks for helping me clarify.
>
> > Given that, as of 2008 all vehicles sold in the US are required to
> implement CAN
> I would hope to write something which could connect to CAN in the
> future, but present the same interface to a client.  I believe this to
> be like gpsd supporting different binary protocols.  An embedded
> computer may present a CAN header, and it's on my wishlist.
>
> > Slow
> Limited by the device, sure.  For something like logging speed against
> position, 1/s isn't so bad.  I accept I won't be polling 80 PIDs every
> second.
>
> > You asked.
> I appreciate your answer.
>
> Derek
>
>
>

--e89a8fb1fbc0958de004c3686f64
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Sometimes it is possible to decode raw vwhicle data - I don&#39;t for my=
 harley using my webgpsd at <a href=3D"http://github.com/tz1">github.com/tz=
1</a> and there&#39;s harleydroid by stelian pop that uses an elm327 in mon=
itor mode.</p>

<p>An older project of mine on my nokia n810 did much of what you are talki=
ng about - I think minigpsd (a precursor to webgpsd) is also up at github a=
nd includes my radar detector as well as obd2 and harley.</p>
<div class=3D"gmail_quote">On Jun 26, 2012 7:16 PM, &quot;Derek LaHousse&qu=
ot; &lt;<a href=3D"mailto:dlahouss@mtu.edu">dlahouss@mtu.edu</a>&gt; wrote:=
<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; The interface in the car is expressly never an ELM327-compatible devic=
e,<br>
&gt;<br>
&gt; Now, you might plug an ELM327-compatible device into the OBD-II port, =
but that, as they say, is different.<br>
<br>
I mean that a common interface for the average computer would be through<br=
>
an ELM327-compatible device, which itself is plugged into the OBDII<br>
port. =A0I accept that it&#39;s slow, but it seems a good target for an<br>
initial pass. =A0My Dell laptop doesn&#39;t have a CAN port accessible.<br>
Thanks for helping me clarify.<br>
<br>
&gt; Given that, as of 2008 all vehicles sold in the US are required to imp=
lement CAN<br>
I would hope to write something which could connect to CAN in the<br>
future, but present the same interface to a client. =A0I believe this to<br=
>
be like gpsd supporting different binary protocols. =A0An embedded<br>
computer may present a CAN header, and it&#39;s on my wishlist.<br>
<br>
&gt; Slow<br>
Limited by the device, sure. =A0For something like logging speed against<br=
>
position, 1/s isn&#39;t so bad. =A0I accept I won&#39;t be polling 80 PIDs =
every<br>
second.<br>
<br>
&gt; You asked.<br>
I appreciate your answer.<br>
<br>
Derek<br>
<br>
<br>
</blockquote></div>

--e89a8fb1fbc0958de004c3686f64--


From MAILER-DAEMON Tue Jun 26 21:53:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjhS5-00011l-2D
	for mharc-gpsd-dev@gnu.org; Tue, 26 Jun 2012 21:53:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43262)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1SjhS2-00010A-FU
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 21:53:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1SjhS0-0004UT-Jm
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 21:53:50 -0400
Received: from catbert.rellim.com ([204.17.205.1]:41864)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1SjhS0-0004Pu-24
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 21:53:48 -0400
Received: from localhost (spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q5R1rV62016224
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Tue, 26 Jun 2012 18:53:32 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q5R1rV62016224
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1340762012; bh=nx454BJDI4zaFqRcMGF8fS8wZbEjuNR7ey5/cn4RGh4=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	Mime-Version:Content-Type;
	b=qJkb+aqw9o9JVJntDxe2jMsVNb78u62E7dde+ogzArRR/z33bnttYf/HUDIHuu8UE
	9AR5Y4H/Mc4RFYF73X45Q==
Date: Tue, 26 Jun 2012 18:53:24 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: Derek LaHousse <dlahouss@mtu.edu>
Message-ID: <20120626185324.52fb5717.gem@rellim.com>
In-Reply-To: <1340627322.2871.57.camel@fermion>
References: <1340627322.2871.57.camel@fermion>
Organization: Rellim
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/soDTizU2Cmyg.nj+=9J.j9e";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Wed, 27 Jun 2012 01:53:51 -0000

--Sig_/soDTizU2Cmyg.nj+=9J.j9e
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo Derek!

On Mon, 25 Jun 2012 08:28:42 -0400
Derek LaHousse <dlahouss@mtu.edu> wrote:

> I'd like your opinion on whether gpsd should support OBD data from
> automobiles, or if it would be okay to create an obdd in gpsd's image.

Personnally, I see where you are coming from.  The new NMEA2000 support
in gpsd is close enough to OBD data (both are CAN based) to be a nice
start for an obdd.  OTOH, I don't see a lot of commonality in the end
goals of gpsd and obdd.  But neither do I see any great conflict.

So, speaking personally, if you submitted patches to gpsd that can
be disabled at compile time they might be accepted if you can keep the
changes fairly unintrusive to the core gpsd functions and goals.

The other option is also open to you.  Since gpsd is BSD licensed it
should be easy for you to fork the code if that eventually seems best.

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

--Sig_/soDTizU2Cmyg.nj+=9J.j9e
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAk/qZ5sACgkQBmnRqz71OvN2NgCguOusos0zI2ceAMdewyf5+r5K
gNEAoLZwyIaQ5ly8eJGm3NbKMntl3zTu
=iuCt
-----END PGP SIGNATURE-----

--Sig_/soDTizU2Cmyg.nj+=9J.j9e--


From MAILER-DAEMON Tue Jun 26 23:02:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjiW4-000093-Sq
	for mharc-gpsd-dev@gnu.org; Tue, 26 Jun 2012 23:02:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46829)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SjiW1-000089-I7
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 23:02:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SjiVz-0000WN-C0
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 23:02:01 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:58573 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1SjiVz-0000VT-6K
	for gpsd-dev@nongnu.org; Tue, 26 Jun 2012 23:01:59 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 985BA40653; Tue, 26 Jun 2012 23:01:31 -0400 (EDT)
Date: Tue, 26 Jun 2012 23:01:31 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: "Gary E. Miller" <gem@rellim.com>
Message-ID: <20120627030131.GA531@thyrsus.com>
References: <1340627322.2871.57.camel@fermion>
	<20120626185324.52fb5717.gem@rellim.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3"
Content-Disposition: inline
In-Reply-To: <20120626185324.52fb5717.gem@rellim.com>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
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: Wed, 27 Jun 2012 03:02:03 -0000


--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Gary E. Miller <gem@rellim.com>:
> So, speaking personally, if you submitted patches to gpsd that can
> be disabled at compile time they might be accepted if you can keep the
> changes fairly unintrusive to the core gpsd functions and goals.

Project lead agrees, Derek.

if you follow through on this you may pose us an interesting philosophical
challenge.  Consider this that I wrote about the architure for the antholog=
y=20
"The Architrecture of Open Source":

    Unix programmers schooled in the tradition of "do one thing well" may
    ask [...] why gpsd now handles non-GPS sensors like magnetic
    compasses and Marine AIS receivers, and why we contemplate
    possibilities like ADS-B aircraft tracking.

    These are fair questions. We can approach an answer by looking at the
    actual complexity cost of adding a new device type. For very good
    reasons, including relatively low data volumes and the high
    electrical-noise levels historically associated with serial wires to
    sensors, almost all reporting protocols for GPSs and other
    navigation-related sensors look broadly similar: small packets with a
    validation checksum of some sort. Such protocols are fiddly to handle
    but not really difficult to distinguish from each other and parse, and
    the incremental cost of adding a new one tends to be less than a KLOC
    each. Even the most complex of our supported protocols with their own
    report generators attached, such as Marine AIS, only cost on the order
    of 3 KLOC each. In aggregate, the drivers plus the packet-sniffer and
    their associated JSON report generators are about 18 KLOC total.

    Comparing this with 43 KLOC for the project as a whole, we see that
    most of the complexity cost of GPSD is actually in the framework code
    around the drivers=E2=80=94and (importantly) in the test tools and fram=
ework
    for verifying the daemon's correctness. Duplicating these would be a
    much larger project than writing any individual packet parser. So
    writing a GPSD-equivalent for a packet protocol that GPSD doesn't
    handle would be a great deal more work than adding another driver and
    test set to GPSD itself. Conversely, the most economical outcome (and
    the one with the lowest expected cumulative rate of defects) is for
    GPSD to grow packet drivers for many different sensor types.

    The "one thing" that GPSD has evolved to do well is handle any
    collection of sensors that ship distinguishable checksummed
    packets. What looks like mission creep is actually preventing many
    different and duplicative handler daemons from having to be
    written. Instead, application developers get one relatively simple API
    and the benefit of our hard-won expertise at design and testing across
    an increasing range of sensor types.

Full essay at <http://www.aosabook.org/en/gpsd.html>

I wrote that, and I stand by it, but nobody has implicitly asked us to step
quite so far away from navigational sensors before.

> The other option is also open to you.  Since gpsd is BSD licensed it
> should be easy for you to fork the code if that eventually seems best.

Given the way Derek has described the problem, I'm far from sure he could r=
euse
enough of our code to make that worthwhile.  The packet-sniffer wouldn't
help him. The dispatcher layer might, but...ugh.  Just cutting out the parts
he can't use would be a big, messy job.
--=20
		<a href=3D"http://www.catb.org/~esr/">Eric S. Raymond</a>

--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iD8DBQFP6neLrfUW04Qh8RwRAiHZAJ0doDeWZOPgF1+yH5t+0fQVPTchMACfYX1U
ILYmkHaBmyBd1X0xr8eSySE=
=Q9jT
-----END PGP SIGNATURE-----

--BOKacYhQ+x31HxR3--


From MAILER-DAEMON Wed Jun 27 07:27:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjqOl-0007if-Cv
	for mharc-gpsd-dev@gnu.org; Wed, 27 Jun 2012 07:27:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53342)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1SjqOe-0007hK-OR
	for gpsd-dev@nongnu.org; Wed, 27 Jun 2012 07:27:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1SjqOY-0007dr-IZ
	for gpsd-dev@nongnu.org; Wed, 27 Jun 2012 07:26:56 -0400
Received: from mail-ob0-f173.google.com ([209.85.214.173]:57712)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1SjqOY-0007dE-Ag
	for gpsd-dev@nongnu.org; Wed, 27 Jun 2012 07:26:50 -0400
Received: by obbta14 with SMTP id ta14so1430689obb.4
	for <gpsd-dev@nongnu.org>; Wed, 27 Jun 2012 04:26:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type;
	bh=r4KINSfMUnLOca7VcW0q9uz5de1J8yG2GJ+P4vLls38=;
	b=knGd5X0Ut6bAYfXR5U65ROi51pq7YHJ8uLjfduCYUyq36Sp05vgdyWHGWrF3dfVBXm
	DJO/omHHmIc23SSN5rOgL/XoQrHRVhjIe3SmCYeVpjX9oFwh+z1ImP7OcYhfeUA5H3ab
	6OCknh6oko8sPA0aYzuccO42EwLazSST/HxHER4X2rieBmgwLAoSJPURcgjCwwuB2pRZ
	y1w+c7EjGVrNRATawbYGTCmxxXphE/Z481LVvTwxU0r0AkeXORfdE3d7hmghRAOMlNbq
	lxc0TCrshnWm1EMugRZmmTcotlGppdMmgnluEce0FyXB2NuT0PIdN3dm+b4E5UPboEN9
	fojQ==
Received: by 10.182.116.2 with SMTP id js2mr13081926obb.38.1340796408380; Wed,
	27 Jun 2012 04:26:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.182.216.40 with HTTP; Wed, 27 Jun 2012 04:26:28 -0700 (PDT)
In-Reply-To: <CAFv7OighPvWpJjG=6ZYi7nNRr1-eA9v_LR4OZGn1GDGSHB7w2A@mail.gmail.com>
References: <1340627322.2871.57.camel@fermion>
	<0832919A-864A-4665-8346-61838B4B2B2F@netgate.com>
	<1340752577.2669.10.camel@fermion>
	<CAFv7OighPvWpJjG=6ZYi7nNRr1-eA9v_LR4OZGn1GDGSHB7w2A@mail.gmail.com>
From: tz <tz2026@gmail.com>
Date: Wed, 27 Jun 2012 07:26:28 -0400
Message-ID: <CAFv7OiiLmsqXR3vxhMLwmEjdr8FwmEAYfM3mqDKAHegJsxcn9w@mail.gmail.com>
To: Derek LaHousse <dlahouss@mtu.edu>
Content-Type: multipart/alternative; boundary=14dae9399b37a33bbd04c3727d1c
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.173
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] OBD data, suitable for GPSd inclusion?
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Wed, 27 Jun 2012 11:27:02 -0000

--14dae9399b37a33bbd04c3727d1c
Content-Type: text/plain; charset=ISO-8859-1

https://github.com/tz1/minigpsd/tree/master/miniobd2d

However it uses the annotation pipe of minigpsd which stores the data in
the shared memory for the dashboard, but it basically does requests and
parses responses.

On Tue, Jun 26, 2012 at 7:27 PM, tz <tz2026@gmail.com> wrote:

> Sometimes it is possible to decode raw vwhicle data - I don't for my
> harley using my webgpsd at github.com/tz1 and there's harleydroid by
> stelian pop that uses an elm327 in monitor mode.
>
> An older project of mine on my nokia n810 did much of what you are talking
> about - I think minigpsd (a precursor to webgpsd) is also up at github and
> includes my radar detector as well as obd2 and harley.
>

--14dae9399b37a33bbd04c3727d1c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<a href=3D"https://github.com/tz1/minigpsd/tree/master/miniobd2d">https://g=
ithub.com/tz1/minigpsd/tree/master/miniobd2d</a><br><br>However it uses the=
 annotation pipe of minigpsd which stores the data in the shared memory for=
 the dashboard, but it basically does requests and parses responses.<br>

<br><div class=3D"gmail_quote">On Tue, Jun 26, 2012 at 7:27 PM, tz <span di=
r=3D"ltr">&lt;<a href=3D"mailto:tz2026@gmail.com" target=3D"_blank">tz2026@=
gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<p>Sometimes it is possible to decode raw vwhicle data - I don&#39;t for my=
 harley using my webgpsd at <a href=3D"http://github.com/tz1" target=3D"_bl=
ank">github.com/tz1</a> and there&#39;s harleydroid by stelian pop that use=
s an elm327 in monitor mode.</p>



<p>An older project of mine on my nokia n810 did much of what you are talki=
ng about - I think minigpsd (a precursor to webgpsd) is also up at github a=
nd includes my radar detector as well as obd2 and harley.</p></blockquote>

</div>

--14dae9399b37a33bbd04c3727d1c--


From MAILER-DAEMON Fri Jun 29 21:47:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SkmmK-0003MF-1T
	for mharc-gpsd-dev@gnu.org; Fri, 29 Jun 2012 21:47:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47247)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1SkmmH-0003Lv-OI
	for gpsd-dev@nongnu.org; Fri, 29 Jun 2012 21:47:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1SkmmF-0000r7-QL
	for gpsd-dev@nongnu.org; Fri, 29 Jun 2012 21:47:13 -0400
Received: from catbert.rellim.com ([204.17.205.1]:52331)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1SkmmF-0000ps-90
	for gpsd-dev@nongnu.org; Fri, 29 Jun 2012 21:47:11 -0400
Received: from localhost (spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q5U1ktik024197
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO)
	for <gpsd-dev@nongnu.org>; Fri, 29 Jun 2012 18:46:56 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q5U1ktik024197
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1341020816; bh=A8w1tAfaKQyNgWN87JvyRvrxxe06QK9HDg+No/xI26s=;
	h=Date:From:To:Subject:Message-ID:Mime-Version:Content-Type;
	b=Y0lnaOLTZ5YVNhNlQ0W3m+AVsPZmhyBG+oqOk72PMLwL0TMNMv1XwztxRidyGYmIR
	cHF4hIf8PmFAZIVDIb/EQ==
Date: Fri, 29 Jun 2012 18:46:50 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd dev <gpsd-dev@nongnu.org>
Message-ID: <20120629184650.4496342f.gem@rellim.com>
Organization: Rellim
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/cqZYL32JXcehGEI9ICHy77R";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Subject: [gpsd-dev] timepps.h
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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: Sat, 30 Jun 2012 01:47:14 -0000

--Sig_/cqZYL32JXcehGEI9ICHy77R
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo All!

I just found two kernel PPS issues.

One, gentoo put timepps.h in /usr/include and not /usr/include/sys/

Any easy way to get scans to look both places?

Also, when gpsd head sees timepps.h, qt files!

g++ -o gpsutils-qt.os -c -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wn=
o-missing-field-initializers -Wcast-align -Wmissing-declarations -Wpointer-=
arith -Wreturn-type -O2 -fPIC -DUSE_QT -DQT_SHARED -I/usr/include/qt4 -I/us=
r/include/qt4/QtNetwork -I/usr/include/qt4/QtCore gpsutils.c
In file included from gpsd.h:323:0,
                 from gpsutils.c:22:
/usr/include/sys/timepps.h: In function 'int time_pps_destroy(pps_handle_t)=
':
/usr/include/sys/timepps.h:114:21: error: 'close' was not declared in this =
scope
scons: *** [gpsutils-qt.os] Error 1
scons: building terminated because of errors.

Why is a Qt compile using timepps.h?  Only ntpshm.c needs that file.

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

--Sig_/cqZYL32JXcehGEI9ICHy77R
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAk/uWo8ACgkQBmnRqz71OvPWtgCaA/X2Ax0hoWQCXKhj3Eo4sp4N
jpEAn1jT00znvW43PyzAMi9dNsf+imrF
=uEBO
-----END PGP SIGNATURE-----

--Sig_/cqZYL32JXcehGEI9ICHy77R--


From MAILER-DAEMON Sat Jun 30 21:08:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sl8ek-0001E3-Db
	for mharc-gpsd-dev@gnu.org; Sat, 30 Jun 2012 21:08:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47136)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sl8eh-0001Bs-WC
	for gpsd-dev@nongnu.org; Sat, 30 Jun 2012 21:08:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sl8eg-00081C-5G
	for gpsd-dev@nongnu.org; Sat, 30 Jun 2012 21:08:51 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:52052 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1Sl8eg-00080E-1C
	for gpsd-dev@nongnu.org; Sat, 30 Jun 2012 21:08:50 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 1654C4067B; Sat, 30 Jun 2012 21:08:45 -0400 (EDT)
From: esr@thyrsus.com (Eric S. Raymond)
To: gpsd-dev@nongnu.org
Message-Id: <20120701010845.1654C4067B@snark.thyrsus.com>
Date: Sat, 30 Jun 2012 21:08:45 -0400 (EDT)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Subject: [gpsd-dev] Time for a snap release due to the leapsecond change!
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 01 Jul 2012 01:08:53 -0000

It's time for a snap release due to the leap-second change! We have a 
leap-second constant in timebase.h that will have the wrong value, 
affecting time reporting from Evermore GPSes and any other sensors
that report only GPS week and TOW without the current leap second.

I should have realized this sooner, but I've been concentrating on
other projects.

Fortunately, the code has been pretty stable lately.  The only
significant changes have been Christian Gagneraud's AIS fixes
and feature additions.

Please consider this a 48-hour warning.  If you have showstopper
bugs or urgent issues, let me know ASAP.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

The American Republic will endure, until politicians realize they can
bribe the people with their own money.
	-- Alexis de Tocqueville


From MAILER-DAEMON Sat Jun 30 22:57:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SlAM0-000193-54
	for mharc-gpsd-dev@gnu.org; Sat, 30 Jun 2012 22:57:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47049)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1SlALx-00018f-ID
	for gpsd-dev@nongnu.org; Sat, 30 Jun 2012 22:57:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1SlALw-00062g-3C
	for gpsd-dev@nongnu.org; Sat, 30 Jun 2012 22:57:37 -0400
Received: from ip-64-139-1-69.sjc.megapath.net ([64.139.1.69]:54590)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1SlALv-00061N-Oi
	for gpsd-dev@nongnu.org; Sat, 30 Jun 2012 22:57:36 -0400
Received: from shuksan (localhost [127.0.0.1])
	by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id DCEE580006F; 
	Sat, 30 Jun 2012 19:57:31 -0700 (PDT)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: esr@thyrsus.com (Eric S. Raymond)
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from esr@thyrsus.com (Eric S. Raymond) of "Sat,
	30 Jun 2012 21:08:45 EDT."
	<20120701010845.1654C4067B@snark.thyrsus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Sat, 30 Jun 2012 19:57:31 -0700
Message-Id: <20120701025731.DCEE580006F@ip-64-139-1-69.sjc.megapath.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 64.139.1.69
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Time for a snap release due to the leapsecond change!
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
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, 01 Jul 2012 02:57:38 -0000

> It's time for a snap release due to the leap-second change!

Why the "snap"?.  This one is over and the next one won't happen for a year 
or two.


-- 
These are my opinions.  I hate spam.





