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: Fri, 15 Apr 2022 11:17:12 -0700

Yo Filip!

On Fri, 15 Apr 2022 11:49:03 +0200
Filip Kubicz <filip@kubicz.engineer> wrote:

> No debugging of the receiver is needed. I know it works when I send a
> certain UART payload. I just want to achieve the same payload to be
> sent through gpsd, to avoid contending with gpsd for serial port
> access.

Already understood.

> gps_send() unfortunately only sends the buffer from client to gpsd,
> but gpsd doesn't forward the buffer to the device.

Yes, the way you do it.  But it does work when properly coded.

> From inspecting gpsctl, I see that gpsctl "low-level mode" means
> "bypass gpsd". And it doesn't have a way to write to the device
> through gpsd. gpsctl uses session.device_type->control_send() to ship
> the control message. But it must be called from within gpsd session,
> not from a client using libgps. Similar thing (I think) could be
> achieved by modifying handle_gpsd_request() to actually ship the
> buffer to the device if it has a certain format.

No code changes needed, at least on the gpsd side.

People send data to their receiver through gpsd all the time.

> So I guess I have to write to the serial port outside gpsd and make
> sure I'm not doing it in the initial setup phase when gpsd might be
> sending some commands to the device.

This is common.  Send your commands, your way, then start gpsd.  Other
approaches also work.

> If there is another method to
> achieve sending a control message to a device from a client, please
> advise.

I've already pointed you to tools, like zerk, ubxtool, gpsmon, that send
to the receiver.  You just need to fix your code.  The code I last saw
was not implelemnting the protocol properly, thus the null result you
are getting.

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: pgpKjGwgpowWk.pgp
Description: OpenPGP digital signature


reply via email to

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