gpsd-users
[Top][All Lists]
Advanced

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

Re: Sending commands to device while gpsd is running


From: Gary E. Miller
Subject: Re: Sending commands to device while gpsd is running
Date: Thu, 30 Dec 2021 11:01:30 -0800

Yo Filip!

On Thu, 30 Dec 2021 12:53:51 +0100
Filip Kubicz <filip@kubicz.engineer> wrote:

> I have a LC29D GNSS module that talks over UART with NMEA sentences.
> Receiving part is easy, gpsd parses the UART data and I can read the
> SKY and TPV in my client program.

Ah, the Quectel part.  I would only call it "sorta NMEA".  It has many
firmware bugs.

> However, I also need to send some commands over UART to configure it
> and then feed it with the information it needs (e.g. vehicle wheel
> ticks).

Normal.

> So far I assumed that the correct way to send such commands is with
> gpsctl -x "$COMMAND". But I see it behaves in a strange way, possibly
> trying to re-activate the device:

You are skipping a lot of details.  What version gpsd?  How are you
starting gpsd?  Are you using the "-n" option?  Was gpsd running when you
did the below?

> # gpsctl -x "$COMMAND" -D 5 /dev/ttyGPS0

Looks like you forgot the "-n" option to gpsd?  What is in $COMMAND?

> When I just send the command over UART, the command succeeds and the
> device sends back $COMMANDACKOK*16

Which, of course, is invalid NMEA...  We can deal with that "querk"
later.

> What would be the best way to send a command to a device while gpsd
> is running?

Besst depends a lot on what language you prefer.  gpsctl works, or you
can code up a bit of Python, C, etc.  The protocol is simple.

> The commands are NMEA-like text. The commands are
> independent from the daemon operation.

Yeah.  "NMEA like".  Just enough like NMEA to confuse things.  A lot.

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

Attachment: pgpD2AOsLvdno.pgp
Description: OpenPGP digital signature


reply via email to

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