gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Data from ethernet


From: Roy Barkas
Subject: Re: [gpsd-users] Data from ethernet
Date: Thu, 24 Apr 2014 03:17:16 +1000

One other thing...

If the gps(s) are sending data  to your server as tcp clients, you will have to put something in the middle so that your server receives data from the client gps(s) and makes it available to other clients (like gpsd) on a different port.  I don't believe that gpsd can act as a tcp server, just as a client.  If I'm wrong you can ignore this.  (if gpsd can run as a tcp server rather than as a client could someone let us know please).

One way to do this is to use a tool like socat which is a network swiss army knife.

you get socat by running sudo apt-get install socat

There are many examples on the web of socat usage. You can use it in many ways.  One way would be:

socat - tcp-l:2002,fork,reuseaddr | socat - tcp-l:50003,fork,reuseaddr

then point gpsd at localhost:50003.  socat receives the data from one or more gps' on port 2002 and copies everything that it receives from all of them to anybody who connects to port 50003 (like gpsd when it connects)

The alternative for you is to write some python, php, c pr other code to do the same thing

Good luck;

Roy


reply via email to

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