[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Only one client at a time (Debian, Raspbian)
From: |
Carles Pina i Estany |
Subject: |
Re: Only one client at a time (Debian, Raspbian) |
Date: |
Thu, 29 Jul 2021 22:58:20 +0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hi,
On Jul/29/2021, Gary E. Miller wrote:
Thanks for all your work on gpsd! .-)
> Yo Carles!
Hi Gary!
Thanks for your answer - I'm new with gpsd - if I do "strange things"
making my life difficult please let me know, I might not have discovered
the easy way!
> On Wed, 28 Jul 2021 22:19:24 +0200
> Carles Pina i Estany <carles@pina.cat> wrote:
>
> > I have a Garmin eTrex 30x GPS connected using USB to either my
> > computer (Debian Buster) or to a Raspberry pi (Buster as well).
>
> I'm curious how you got any NMEA out of the eTrex. Many people
> report failure at that.
I have now:
pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
pi@raspberrypi:~ $ gpsd -V
gpsd: 3.20 (revision 3.20)
# (this gpsd is from buster-backports)
pi@raspberrypi:~ $ cat /etc/default/gpsd
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES=""
# Other options you want to pass to gpsd
GPSD_OPTIONS=""
# Automatically hot add/remove USB GPS devices via gpsdctl
USBAUTO="true"
START_DAEMON="true"
Then I connect the eTrex, I answer "No" for the "USB Mass Storage".
In the Pi things like cgps or gpsmon work fine.
Then I use kplex with this setup:
pi@raspberrypi:~ $ cat .kplex.conf
[tcp]
gpsd=yes
direction=in
mode=client
address=localhost
persist=yes
retry=10
[tcp]
direction=out
mode=server
port=10110
[file]
filename=/home/pi/gps.txt
direction=out
append=yes
And I get the NMEA strings doing "telnet 192.168.1.4 10110" (or
localhost...) and in the file.
Quick question if you don't mind: off the top of your head: do you
expect "Garmin GLO 2" device to work? I think that it's this one:
https://buy.garmin.com/es-ES/ES/p/645104#overview
I'm new in all this world and I don't know how often things "just work"
(like a USB memory stick, in a standard way) or if they are very
specific to each device.
> > I installed "gpsd" Debian package and then I'm trying to have two
> > different software access the gpsd over the port TCP 2947:
>
> I can't speak to the Debian package, that is not from us.
I updated gpsd Debian package to a newer version solved the problem that
I had (but I might have new problems! - after 10 or 20 min it seems to
sometimes just stop. I haven't done more testing yet).
>
> > -kplex for reading it and saving into files / send NMEA string over
> > the network
>
> New one on me. Why use it?
Ideally I would like gpsd to get the positions from the eTrex 30x
(whatever the on-wire protocol between gpsd and eTrex use) and then I
would like gpsd to:
-Save NMEAs to a file
-Make NMEAs available over a TCP port
My understanding is that gpsd cannot do this. If it can let me know
please. kplex is a gpsd client as well (recently, last time that I had
used in 2017 didn't have this capability) and can save into a file and
make it available over a TCP port (pushing the NMEA strings).
How could I do it without kplex?
> > -qgis (which doesn't have TCP NMEA alike but gpsd)
>
> I do not understand that last bit: "(which doesn't have TCP NMEA alike
> but gpsd)"
qgis has a gpsd client (as, it can connect to the port 2947 and
communicate using the gpsd protocol like:
?WATCH={"enable":true,"json":true} and alike).
As far as I know qgis cannot connect to a port and read NMEA strings
like OpenCPN can do (or like I do with "telnet IP PORT" and I just get
it from kplex).
OpenCPN has both: connect and read NMEA strings or do the gpsd client
version. I was just discussing my setup in case that it was relevant.
> > I realise that gpsd 2947 port in Debian/Raspbian is handled by systemd
> > socket activation (which I've never used before... so I might be
> > missing something).
>
> I also do not use systemd(umb), but I know it causes daily complaints
> on this email list.
For what I saw yesterday: I'm not surprised, I found it confusing how
things work, auto-activate, systemd socket activation to the port, etc.
> > As soon as one software (e.g. kplex) uses it, the other one (qgis)
> > cannot use it.
>
> I often connect multiple clients over port 2947 with no problem. For
> example: xgps, xgps and gpspipe all at the same time.
>
> Can you connect two cgps? Or one cgps and one xgps?
I could connect two cgps after upgrading gpsd to a newer version than
what I had in Debian Buster (3.17 to 3.20)
> > If I do it using telnet:
> >
> > Terminal 1:
> > pi@raspberrypi:~ $ telnet localhost 2947
> > Trying ::1...
> > Connected to localhost.
> > Escape character is '^]'.
> > {"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":12}
>
> 3.17 is ancient. 3.23 is to be releassed bext week.
with 3.20 it works fine... (different clients) for a while! After a
while (10, 20 min) it stops working and I need to disconnect and connect
the GPS. Still using systemd.
>
> > I've been trying to not have systemd and use just gpsd but I had other
> > problems - that I can show step by step but hopefully not needed. I'm
> > happy to fix what I have not to replace everything.
>
> Remove gpsd fro systemd(rool), then just start gpsd normally, as root:
> gpsd -n /dev/ttyXX
will do when I have problems.
--
Carles Pina i Estany
https://carles.pina.cat