gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: ✘n2k and issue #176


From: address@hidden
Subject: AW: ✘n2k and issue #176
Date: Wed, 15 Dec 2021 01:36:28 +0100 (CET)

Hello,

-----Original-Nachricht-----
Betreff: Re: ✘n2k and issue #176
Datum: 2021-12-14T01:56:15+0100
Von: "Gary E. Miller" <gem@rellim.com>
An: "gpsd-dev" <gpsd-dev@nongnu.org>

Yo Reinhard!

On Tue, 14 Dec 2021 01:26:01 +0100
Reinhard Arlt <reinhard.arlt@t-online.de> wrote:

> i have learned quite a bit, since i have written the n2K code for
> gpsd many years ago.

We all have.

> And feel, that i was (at least a bit) pushed out of this group, as
> "my" data structures for attitude are removed from gpsd.

"removed" or "replaced"?  One of the problems with gpsd is the large
amount of code duplication.  As new features get added, old ones get
mutated to avoid that code duplication.  In theory.

I expect no functionality was lost, otherwise the regression tests would
have caught it?  Except nmea2000 is the only input source with no
regression tests.  That needs to get fixed.

The n2k regression test are a bit different from the "normal" serial devices.

A testcase and a checkfile is already in the repository "gpsd/test/nmea2000/"

And i have posted, how to use this files.

> First a few comments:
> 
> 1.) A solution to respect only n2k gps and ais messages is absolutely 
> the wrong way. On a boat, you want to see as much info from the
> nmea2000 bus as possible, and convert them into JSON and nmea0183
> messages.

Not just nmea2000, pretty much all of gpsd is about finding, and passing
on data, not losing it.

> 2.) The source address a of a n2k device is static. It is only
> allowed to change the own address, if you lose an address claim, or
> your device gets a new address during an ISO address assignment.

Is that the same, or different from, the SAE J1939 Address Claim Procedure?

> On a proper working n2k bus, you can only lose the address claim, if
> a new device is added. As the address claim is broken by design (it 
> violate a basic can rule), a restart of the bus and all devices is 
> always a good idea, as you never know, if an other device is off bus 
> afterwards!

Uh, OK.

> I have no experience with the ISO bus, but i assume, that changing
> the devices on the bus will happen here more frequently.

So we are talking about two different things?  NMEA2000 and ISO XXX?

With ISO, i mean ISO 11783. In the n2k standard, there are references to this 
standard. As much as i know, ISO 11783 inherits n2k in a way.

> The central problem comes form the nmea.

More than a few...

> A "normal" device on a n2k
> bus can always get the info of the devices on the bus with a dummy
> address claim. But you need a vendor id and a device id for that
> purpose, and the nmea charge you quite a bit for it. And even more
> worse, you will lose the device id, if your device is not certified
> after a few month.

Ouch.  So what do we do about it?

As i have been aware of this problem, I have implemented the n2k driver  in 
gpsd as a "passive" device,
that do not need to send information on the n2k bus. A passive do device not 
need  a vendor and device id.

> My suggestion is: Tracking of the (j1939) address claim is not a big 
> thing. And adding a timeout for devices, that do not send messages
> any longer also not.

Why do we care?  As long as gpsd reports the CAN address with the
data, then it is a client problem?

> I can write this code, but i still think, that it is not needed.

I can see gpsd should keep the address data, and collect PVT data
by address, in case there are two GPS on the bus.  Beyond that, why?

I have programmed a "gps compass" as a client for gpsd. Here, for example, i 
need the info from two gps receiver, a real compass, and in a later version 
even the attitude  
 information.

> I have never seen an iso address assignment on a boat in the wild,
> even it is mentioned in the n2k standard as a possibility.

And I've never heard of any either.  But now issue #176 wants to extend
the gpsd nmea2000 code for the ISO case.  I'm unclear on the real
world use case.

Refer as as "commanded address".

I am clear that the nmea2000 code needs some regression tests if it
is going to be changed.

As i am not a farmer, i do not access do ISO 11873 devices, i can not provide 
log files.

But i have many real world log files from n2k bus system, and even a test 
bench, to generate specific ones.

I will look for the mail to this group, where i describe a regression test for 
n2k.

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

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

Kind regards

Reinhard



reply via email to

[Prev in Thread] Current Thread [Next in Thread]