gpsd-users
[Top][All Lists]
Advanced

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

Re: gpsd-users Digest, Vol 104, Issue 1


From: Bradley McFadden
Subject: Re: gpsd-users Digest, Vol 104, Issue 1
Date: Thu, 3 Sep 2020 13:06:46 -0400

Hi Gary,
Thank you for your time.


> What is this XTRX you speak of?  Why?
The XTRX is a software defined radio that also happens to have an onboard gps.
The reason I'm using this is to look for activity on various cell towers in the area.
I have an application with a large (42 million line) database of these cell towers that
takes a large amount of time to search for nearby towers. I want to be remember what I found
in different locations so I can avoid searching the database. For that, I want to use the XTRX's
gps.


I've followed the setup instructions for the XTRX, directly from their github page:
https://github.com/xtrx-sdr/images#how-to-use-xtrx-gps-to-receive-nmea-data-and-pps-signal


> 1. What distro?
> 2. What version of gpsd?
> 3. Did you build gpsd, or is it from a package?
I'm running on Ubuntu 20.04, with GPSd version 3.20, which was installed by the apt package manager.


> Better to show than paraphrase.  What does this show:
> $ ls -l /dev/ttyXTRX0
The output permissions on /dev/ttyXTRX0 are as follows:
sail@gr110:~/workarea/examples$ ls -l /dev/ttyXTRX0
crw-rw---- 1 root dialout 234, 64 Sep  3 07:58 /dev/ttyXTRX0


>> I can read data from this device using:
>> stty -F /dev/ttyXTRX0 speed 9600 && cat /dev/ttyXTRX0.
> You fail to note whehter that is as root, or a user.

This command is being run as user.


> 2. "-S 3900".  Why are you using TPC port 3900??
I'm using port 3900 because port 2947 seems to be taken.
$ sudo netstat -pnlt | grep 2947
tcp         0      0 127.0.0.1:2947      0.0.0.0:*           LISTEN      1/init              
tcp6       0      0 ::1:2947                 :::*                    LISTEN      1/init


> This error doesn't make sense to me as I've checked that the user and
> gpsd are both in the dialout group.
>> Uh, remember that sudo?  You are not running as "user'.

I get the same output here when I do run as user:
sail@gr110:~/workarea/examples$ gpsd -n -N -D5 -S 3900 /dev/ttyXTRX0
gpsd:INFO: launching (Version 3.20)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port 3900
gpsd:PROG: NTP: shmat(1114117,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(1114118,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(1114119,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(1114120,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(1114121,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(1114122,0,0) succeeded, segment 7
gpsd:PROG: successfully connected to the DBUS system bus
gpsd:PROG: shmget(0x47505344, 24024, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 1114123
gpsd:INFO: stashing device /dev/ttyXTRX0 at slot 0
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: SER: opening GPS data source type 2 at '/dev/ttyXTRX0'
gpsd:ERROR: SER: device open of /dev/ttyXTRX0 failed: Permission denied - retrying read-only
gpsd:ERROR: SER: read-only device open of /dev/ttyXTRX0 failed: Permission denied
gpsd:ERROR: initial GPS device /dev/ttyXTRX0 open failed
gpsd:ERROR: can't run with neither control socket nor devices open


Thank you for your time again Gary.
- Bradley

On Thu, Sep 3, 2020 at 12:01 PM <gpsd-users-request@nongnu.org> wrote:
Send gpsd-users mailing list submissions to
        gpsd-users@nongnu.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.nongnu.org/mailman/listinfo/gpsd-users
or, via email, send a message with subject or body 'help' to
        gpsd-users-request@nongnu.org

You can reach the person managing the list at
        gpsd-users-owner@nongnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gpsd-users digest..."


Today's Topics:

   1. Permission Error When Opening gpsd For XTRX Device
      (Bradley McFadden)
   2. Re: Permission Error When Opening gpsd For XTRX Device
      (Gary E. Miller)


----------------------------------------------------------------------

Message: 1
Date: Wed, 2 Sep 2020 11:54:28 -0400
From: Bradley McFadden <bmcfadden@laurentian.ca>
To: gpsd-users@nongnu.org
Subject: Permission Error When Opening gpsd For XTRX Device
Message-ID:
        <CAENB13FdDSz-VFTw=fR0grcL4EhNFRdYFD0m2u=n1n28RwCkMA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello all,

I'm trying to set up gpsd to read data from the onboard gps that the XTRX
radio provides.
In the devices list, it is listed as /dev/ttyXTRX0.
I can read data from this device using:
stty -F /dev/ttyXTRX0 speed 9600 && cat /dev/ttyXTRX0.

The error I'm getting is this:
sail@gr110:~/Desktop$ sudo gpsd -n -N -D5 -S 3900 /dev/ttyXTRX0
gpsd:INFO: launching (Version 3.20)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port 3900
gpsd:PROG: NTP: shmat(20,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(21,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(22,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(23,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(24,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(25,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(26,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(27,0,0) succeeded, segment 7
gpsd:PROG: successfully connected to the DBUS system bus
gpsd:PROG: shmget(0x47505344, 24024, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 28
gpsd:INFO: stashing device /dev/ttyXTRX0 at slot 0
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: SER: opening GPS data source type 2 at '/dev/ttyXTRX0'
gpsd:ERROR: SER: device open of /dev/ttyXTRX0 failed: Permission denied -
retrying read-only
gpsd:ERROR: SER: read-only device open of /dev/ttyXTRX0 failed: Permission
denied
gpsd:ERROR: initial GPS device /dev/ttyXTRX0 open failed
gpsd:ERROR: can't run with neither control socket nor devices open

This error doesn't make sense to me as I've checked that the user and gpsd
are both in the dialout group.
If I can read the data from the device, why can't gpsd open it?

Thanks for any suggestions on how to fix this or anything pointing me in
the right direction.

--


CONFIDENTIALITY NOTE <https://laurentian.ca/confidentiality> - AVIS:
COURRIEL CONFIDENTIEL. You can view the confidentiality terms at
https://laurentian.ca/confidentiality
<https://laurentian.ca/confidentiality>. Notre avis de confidentialité est
disponible au site https://laurentienne.ca/avis
<https://laurentienne.ca/avis>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nongnu.org/archive/html/gpsd-users/attachments/20200902/883aa104/attachment.html>

------------------------------

Message: 2
Date: Wed, 2 Sep 2020 12:13:35 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd-users@nongnu.org
Subject: Re: Permission Error When Opening gpsd For XTRX Device
Message-ID: <20200902121335.62f0c3d2@rellim.com" target="_blank">20200902121335.62f0c3d2@rellim.com>
Content-Type: text/plain; charset="utf-8"

Yo Bradley!

On Wed, 2 Sep 2020 11:54:28 -0400
Bradley McFadden <bmcfadden@laurentian.ca> wrote:

> I'm trying to set up gpsd to read data from the onboard gps that the
> XTRX radio provides.

What is this XTRX you speak of?  Why?

You skipped a bunch of important details:

1. What distro?
2. What version of gpsd?
3. Did you build gpsd, or is it from a package?

> In the devices list, it is listed as /dev/ttyXTRX0.

Better to show than paraphrase.  What does this show:

$ ls -l /dev/ttyXTRX0

> I can read data from this device using:
> stty -F /dev/ttyXTRX0 speed 9600 && cat /dev/ttyXTRX0.

You fail to note whehter that is as root, or a user.

> The error I'm getting is this:
> sail@gr110:~/Desktop$ sudo gpsd -n -N -D5 -S 3900 /dev/ttyXTRX0

1. Never use sudu, it is security theater and does surprising things.

2. "-S 3900".  Why are you using TPC port 3900??

> gpsd:INFO: launching (Version 3.20)

Old version.

> gpsd:INFO: listening on port 3900

"-S 3900".  Why are you using TPC port 3900??

> gpsd:ERROR: SER: device open of /dev/ttyXTRX0 failed: Permission
> denied - retrying read-only

Back to what dies "ls -l /dev/ttyXTRX0" say?

> This error doesn't make sense to me as I've checked that the user and
> gpsd are both in the dialout group.

Uh, remember that sudo?  You are not running as "user'.

Don't use sudo!

> If I can read the data from the device, why can't gpsd open it?

Dunno, insufficient data.  See above.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.nongnu.org/archive/html/gpsd-users/attachments/20200902/2292ee43/attachment.sig>

------------------------------

Subject: Digest Footer

_______________________________________________
gpsd-users mailing list
gpsd-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/gpsd-users


------------------------------

End of gpsd-users Digest, Vol 104, Issue 1
******************************************

CONFIDENTIALITY NOTE - AVIS: COURRIEL CONFIDENTIEL. 

You can view the confidentiality terms at https://laurentian.ca/confidentiality. Notre avis de confidentialité est disponible au site https://laurentienne.ca/avis
reply via email to

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