gpsd-dev
[Top][All Lists]
Advanced

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

Re: How to get raw data from gpsd?


From: 张延涛
Subject: Re: How to get raw data from gpsd?
Date: Mon, 1 Apr 2024 19:04:57 +0800

Hi Gary!

> Can you get me documentation on the binary protocol?

I'm sorry, we are unable to obtain the protocol documentation from the GNSS chip manufacturer as well. In our current operations, we only need to provide an interface to the chip manufacturer, enabling them to retrieve raw data through this interface. Once the chip manufacturer receives the raw data, the specific parsing rules are left to them to handle. It would be great if you could add an interface to gpsd that allows for the retrieval of completely raw data!

> Can you build gpsd from git head and test?

Yes, I can compile gpsd from the git head and write test programs.

>  Do you have sample parts you can send me?

Regarding your request for sample parts, raw data is essentially a black box for us as well. Therefore, we don't have any samples to provide for your reference.

Best regards,
Yantao Zhang


Gary E. Miller <gem@rellim.com> 于2024年3月30日周六 04:13写道:
Yo 张延涛!

On Fri, 29 Mar 2024 19:20:05 +0800
张延涛 <zh6tao@gmail.com> wrote:

> Thanks for your reply. The GNSS receiver I am using is the ALLYSTAR
> HD8040.

Interesting.  The first time I have heard of it.  I can find little
documentation on the protocol.  I found some information on much
older chips.  Do you have any documenttion on the binary protocol?

> I have collected the gpsd running logs, which can be found in the
> attached file gpsd.log. At the same time, I have also collected the
> logs from the GNSS receiver, which can be found in the attached file
> serial.log.

Thanks.  Looks like the ALLYSTAR binary is a sloppy copy of the UBX
protocol.  An incompatible one.

> I have tried the superraw mode, but I could not receive any textual
> data other than NMEA. My experimental method was to manually send
> textual data to ttyS3, but `gpspipe -R` did not print out the textual
> data I sent to ttyS3.

"Superraw" is not completely raw.

> Then, I carefully read the gpsd source code and found that the data
> transmission process is roughly as follows:
>
> GNSS receiver --> ttyS3 --> GPSD calls read() function -->
> lexer.inbuffer --> lexer.outbuffer --> upper-layer applications 

Yes, gpsd does not pass on data that it can not at least identify is
a valid sentence.  It does not need to understand each message, but
the header and checksum must validate.  Since gpsd knows nothing of
ALLYSTAR, it will not pass on the sentences, even in superraw mode.

This is usually a good think as a lot of junk can come into a serial
port, but not in your case.

> Therefore, I would like to know if there is an API that can directly
> access the data in `lexer.inbuffer`?

Nope, sorry.  But I am working on code in gpsd git head that understands
the basic ALLYSTAR message structure.  When that works, superraw mode
will work for you.  If you can send me documentation on the binary
messages, I can get gpsd to decode them.

In summary:
    Can you get me documentation on the binary protocol?
    Can you build gpsd from git head and test?
    Do you have sample parts you can send me?

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

reply via email to

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