gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Re-scan devices on client connect?


From: Gary E. Miller
Subject: Re: [gpsd-users] Re-scan devices on client connect?
Date: Mon, 8 Apr 2019 11:49:40 -0700

Yo Larry!

On Mon, 8 Apr 2019 07:44:41 -0400
Larry Boyd <address@hidden> wrote:

> > > When gpsd is started with a list of devices to probe for hardware,
> > > and it turns out that none of those devices are present at the
> > > time, then it removes those paths from the list and never re-adds
> > > them except if you manually re-add them using gpsctl.  
> >
> > Sounds right to me.  gpsd has dropped root priviledges and can't
> > open devices anymore.
> >  
> 
> That doesn't sound right to me. If gpsctl can instruct gpsd to open
> the device, then gpsd must still have all needed privileges to open
> the device. Further, if gpsd has all the needed privileges to *use*
> the device, then it must have all the privileges needed.

Except, gpsctl can not instruct gpsd to open a new device.  udev
can do that via the socket (-F socket) interface.

> The issue isn't privilege based, its based on the fact that if gpsd
> finds that a manually listed device is unavailable, it permanently
> removes that device from the list and won't even add it back even
> under the two conditions that (a) it has been added back, and (b)
> there are NO devices in the list.

Once again, because it can not, because it dropped priviledges.

> After all, the purpose of being able to list devices on the
> commandline is to force it to look at those particular devices, is it
> not?

Yes, but only at the moment of startup.  For after startup use the
socket (-F socket) interface.


> > > It would be nice if it could re-add the original device list
> > > automatically when a client connects, if the current device list
> > > is empty.  
> >
> > Which is what udev is for, to add devices as they appear.  Maybe
> > you can add a cronjob to keep rerunning gpsctl?
> >  
> 
> There are two problems with that approach;

Not problems, just issues looking for solutions.

> 1) typically, platforms that don't have udev, also don't have crond
> (for example, Android).

Neither udev, nor chronyd, are required to use the socket (-F socket)
interface.

> 2) since crond can only run periodically,

So don't use chronyd.

> This would be a fairly simple addition to gpsd. On client connect, if
> the device list is empty, try to re-add the devices listed on the
> commandline.

If is is simple, send us a patch.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  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: pgp4BLW9Yz5y0.pgp
Description: OpenPGP digital signature


reply via email to

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