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 3


From: Bradley McFadden
Subject: Re: gpsd-users Digest, Vol 104, Issue 3
Date: Fri, 4 Sep 2020 12:50:36 -0400

Hey Gary!

Your help is allowing me to make some progress on this problem. Thanks!

> Does it send NMEA, by default, when you turn it on?  Otherwise not
> gonna work with gpsd.
> > > > 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.
> A user in the dialout group?

Yes, the user is in the dialout group.

sail@gr110:~/workarea/workarea/gr-fosphor/build$ groups
sail adm dialout cdrom sudo dip plugdev lxd wireshark


> What does the cat show you?

The cat seems to be showing me NMEA data. I know that the XTRX doesn't have satellite lock, but I'm more
concerned with gpsd being able to read from the device at the moment.

sail@gr110:~/workarea/workarea/gr-fosphor/build$ stty -F /dev/ttyXTRX0 speed 9600 && cat /dev/ttyXTRX0
9600
�$PMTK011,MTKGPS*08
$PMTK010,001*2E
$PMTK011,MTKGPS*08
$PMTK010,002*2D
$PMTK011,MTKGPS$PMTK001,10,1*03
$PMTK011,MTKGPS$PMTK001,10,1*03
$GNGGA,235942.870,,,,,0,0,,,M,,M,,*52
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GLGSA,A,1,,,,,,,,,,,,,,,*02
$GPGSV,1,1,00*79

> You gotta make a choice, are you going to run gpsd under systemd(umber),
> or not.  You can not do both.

I found the systemd services that gpsd used with this command:

sail@gr110:~/workarea/workarea/gr-fosphor/build$ systemctl list-unit-files | grep gpsd
gpsd.service                               disabled        enabled      
gpsdctl@.service                           static          enabled      
gpsd.socket                                disabled        enabled 

Then for each service I made sure to run disable and stop by running these commands as root:
$ systemctl stop gpsd.service
$ systemctl disable gpsd.service
$ systemctl stop gpsd.socket
$ systemctl disable gpsd.socket

After disabling the services systemd was running, port 2947 cleared up, and I no longer got an error
about port 2947 being in use.


> Try this, as root:
>       lsof /dev/ttyXRX0

root@gr110:/home/sail/workarea/workarea/gr-fosphor/build# lsof /dev/ttyXTRX0
lsof: WARNING: can't stat() fuse file system /run/user/1000/doc
      Output information may be incomplete.

> Run gpsd as root, or do not bother.  Running as not root breaks things
> that you are not prepared to deal with.

Will do. This is the output. Same permission error as before.

root@gr110:/home/sail/workarea/icmtgui-dev# gpsd -n -N /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
root@gr110:/home/sail/workarea/icmtgui-dev# gpsd -n -N -D5 /dev/ttyXTRX0
gpsd:INFO: launching (Version 3.20)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:PROG: NTP: shmat(32778,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(32779,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(32780,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(32781,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(32782,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(32783,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(32785,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(32786,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 32788
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


> Fun, another stingray clone?
Yeah, that's the idea of the project. The idea is to do the RF side of things with a software based radio
we can listen to any frequency and perform different demodulations. In this way we hope to be able to
detect and identify as much as possible with just an XTRX and a second radio that goes up to 6GHz.

Thanks for your time again Gary.
-Bradley


On Fri, Sep 4, 2020 at 12:03 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. Re: gpsd-users Digest, Vol 104, Issue 1 (Gary E. Miller)
   2. Re: gpsd-users Digest, Vol 104, Issue 1 (Frank Nicholas)


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

Message: 1
Date: Thu, 3 Sep 2020 10:23:55 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd-users@nongnu.org
Subject: Re: gpsd-users Digest, Vol 104, Issue 1
Message-ID: <20200903102355.6291a8c8@rellim.com" target="_blank">20200903102355.6291a8c8@rellim.com>
Content-Type: text/plain; charset="utf-8"

Yo Bradley!

On Thu, 3 Sep 2020 13:06:46 -0400
Bradley McFadden <bmcfadden@laurentian.ca> wrote:

> > What is this XTRX you speak of?  Why? 
> The XTRX is a software defined radio that also happens to have an
> onboard gps.

Does it send NMEA, by default, when you turn it on?  Otherwise not
gonna work with gpsd.

> The reason I'm using this is to look for activity on various cell
> towers in the area.

Fun, another stingray clone?

> 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 don't call that large.

> 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.

Sounds like you are just creating a second database of found files.  Many
other ways to skin that cat.  But no matter what you want your location,
and that is what gpsd gives you.

> 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

Wow, a lot of work to replace a $20 GPS.  And pretty distro specific.

> > 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.

You realize that package did not come from here?  We can provide general
help, but we have no control over the package.

> > 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

Since you need to start gpsd as root, that is OK.

> >> 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.

A user in the dialout group?  What does the cat show you?

> > 2. "-S 3900".  Why are you using TPC port 3900?? 
> I'm using port 3900 because port 2947 seems to be taken.

Ooops.

> $ 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

You are already running gpsd under systemd(umb)!  Don't do that!
It is not just the TCP port the two daemons are fighting for.

You gotta make a choice, are you going to run gpsd under systemd(umber),
or not.  You can not do both.

> > 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:

Run gpsd as root, or do not bother.  Running as not root breaks things
that you are not prepared to deal with.

Try this, as root:
        lsof /dev/ttyXRX0

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/20200903/5f91e340/attachment.sig>

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

Message: 2
Date: Thu, 3 Sep 2020 15:19:53 -0400
From: Frank Nicholas <frank@nicholasfamilycentral.com>
To: Bradley McFadden <bmcfadden@laurentian.ca>
Cc: gpsd <gpsd-users@nongnu.org>
Subject: Re: gpsd-users Digest, Vol 104, Issue 1
Message-ID:
        <475682C5-AC76-4C21-9C87-C8791ECA5038@nicholasfamilycentral.com" target="_blank">475682C5-AC76-4C21-9C87-C8791ECA5038@nicholasfamilycentral.com>
Content-Type: text/plain; charset="utf-8"

I smell SystemD...

> On Sep 3, 2020, at 1:06 PM, Bradley McFadden <bmcfadden@laurentian.ca> wrote:
>
> 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 <http://127.0.0.1:2947/>      0.0.0.0:*           LISTEN      1/init             
> tcp6       0      0 ::1:2947                 :::*                    LISTEN      1/init
>
>
> Thank you for your time again Gary.
> - Bradley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nongnu.org/archive/html/gpsd-users/attachments/20200903/e9458755/attachment.html>

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

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 3
******************************************

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]