[Top][All Lists]

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

Re: GPS data from multiple android GPS sources over UDP

From: Gary E. Miller
Subject: Re: GPS data from multiple android GPS sources over UDP
Date: Tue, 18 Apr 2023 12:35:47 -0700

Yo Debashisha!

On Tue, 18 Apr 2023 08:56:13 +0200 (CEST)
Debashisha Mishra <> wrote:

> Thank you for this nice tool. I came across this tool while
> investigating a need to send the GPS data from an android phone to
> the host computer over WiFi network.

I assume you mean the gpsd tools.

> The corresponding steps are
> similar to ones [
> | described here ] .

Not ours, but looks OK.  A bit out of date.  I know people that have
done similar.  I would recommend not running gpsd under systemd(umb), or
ever using sudo.

> Now, my setup include one android phone with [
> |
> GPSd Forwarder ] app that streams the GPS data to the host computer
> IP and port. The command I use on the host computer is " gpsd -N
> udp://*:12345 ". Everything works fine and I could see the GPS data
> in the host computer using gpsmon. 

You should prolly use the "-n" option to keep the connection alive, and
avoid gpsmon, it is an old, unmaintained, deprecated debug tool, it does
not tell you what gpsd is seeing.  It bypasses gpsd.

> My question is the following. I want to send the GPS data from
> multiple android phones to the host computer in the same way I
> explained earlier.

Easy, many do similar, just put all the udp:// conenctions on the
gpsd command line.  As many as you need. Like this:

    gpsd -Nn udp://<phone-ip1>:12345 udp://<phone-ip2>:12346 \
             udp://<phone-ip3>:12347 udp://<phone-ip4>:12348

I used different UDP ports, that may not be required.

> I used the above method and install the GPS
> forwarder android app on two phones. However, I could not know which
> GPS data is coming from which android phone and how can I segregate
> the GPS sources (the android phones) in the host computer.

cgps will mush all the data together, but if you use gpspipe, then
each message is tagged with the device it came from.

> I tried with " gpsd -N udp://<phone-ip>:12345 " command on the host
> computer to listen from the particular phone IP. I could NOT make it
> work. Sorry. 

Did you confirm the phone was sending with the netcat (nc) tests that
guide suggested?

You forgot the "-n" option, and you only had one udp:// do you will only
get one feed, and only when a gpsd client is running.

Adding some logging "-D 4", and sending us the log lets us see what
you see.

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

reply via email to

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