Gpsd address in use using TCP/UTP

Hi,

I’m trying to use my new ax3000 router as a gps backup for if my rv gets stolen and the bad guys disable my default gps tracker. Hence the battery version.

I followed this guide:

I have a nmea gps output through ssh using cgps. Found the port with netstat -anp | grep gpsd.

But when i try to import the nmea string using the avNav app its not seeing the nmea string.

Apparently because the port is occupied by the system or only available to the system.

If i try to appoint a new port (i think) by gpsd -N udp://*:12345, i still get address in use.

How can i make the nmea string available over external tcp? Next step would be accessing the router trough tailscale

I had the same idea, but, took a different approach. I use a VPN connection back to my home network. I’ve got a shell script running on the GL-X3000 that checks to see if the speed is greater than around 1 MPH. If so, it sends a rsyslog message with the date, time, coordinates, and speed to my server at home every 60 seconds. If it isn’t moving it sends it every 15 minutes.

If you happen to be using Victron gear for your RV house power and you have a Cerbo, you can also add a GPS USB dongle to the Cerbo and then the GPS location will be reported via VRM. (I got a USB GPS stick on Aliexpress for $0.99 ). The ethernet port on the X3000 is nice for a direct connection to the Cerbo.

1 Like

Thanks for your reply. I have a different usecase. In case the default gps fails , i would like to still be able to track my rv on my android phone, so i can follow/retrieve it when its stolen.

Since you know how to write a script, is it possible to access the gpsd output remotely through tcp address/port?

Ps i dont have victron or Cerbo.

I don’t know of a way to get the information directly from UDP/TCP connection. I bet it can be done, I just don’t have the skills to do it that way.

One option might be to have a script put the information into the filesystem somewhere in the web servers folder at regular intervals. You could then retrieve it via a simple http/https request. But, I would avoid this due to all of the writing and excess wear it would cause to your flash.

Thanks, me neither :slight_smile:

I found this

But i cannot find the file.

I found this

but no systemctl

Tried to install this

but it would not install

Tried traffic route, port forwarding.

Im out of ideas. Hope someone can help. Much appreciated

PS I was able to ssh via tailscale and connect usb via tailscale. Almost there :slight_smile:

Anyone please?

I found this site

but i cant find the systemd folder or gpsd.socket.

Hi,

Could you clarify what outcome you're trying to achieve?
Are you trying to remotely access the GPSD port through Tailscale?

If so, please try configuring GPSD to listen on all addresses instead of only the loopback address.

# Install GPSD (skip if it is already installed)
opkg update && opkg install gpsd

# Set up GPSD
uci set gpsd.core.enabled='1'
uci set gpsd.core.listen_globally='1'
uci set gpsd.core.device='/dev/mhi_LOOPBACK'
uci commit gpsd

# Start GPSD
/etc/init.d/gpsd start
/etc/init.d/gpsd enable

# make sure the address is 0.0.0.0 not 127.0.0.1
root@GL-X3000:~# netstat -anpl | grep gpsd
tcp        0      0 0.0.0.0:2947            0.0.0.0:*               LISTEN      2799/gpsd
tcp        0      0 :::2947                 :::*                    LISTEN      2799/gpsd

After that, you should be able to access GPSD directly via TCP + the Tailscale IP + the port that GPSD is listening on.

Thanks Will for support.

Yes, i just want to be able to receive the nmea string remotely (tailscale) over tcp on android device.

I filled in your commands, but with below netstat command it doent display anything. Before it did. I didnt change any files

Before cgps worked, but now also not.

But gpsd is running:

gpsd -N -D5 -S 12947 /dev/mhi_LOOPBACK

gpsd -N -D5 -S 12947 /dev/mhi_LOOPBACK
gpsd:INFO: launching (Version 3.23)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port 12947
gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(1,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(2,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(3,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(4,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(5,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(6,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(7,0,0) succeeded, segment 7
gpsd:PROG: shmget(0x47505344, 26712, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 8
gpsd:INFO: stashing device /dev/mhi_LOOPBACK at slot 0
gpsd:INFO: running with effective group ID
gpsd:INFO: running with effective user ID
gpsd:INFO: startup at 2026-03-16T11:20:35.000Z (1773660035)

Maybe try resetting your router and going through the steps again?

I'm not sure if the changes you made based on the other article you mentioned earlier might have caused some issues.

Hi Will,

Well, i made avery short sidestep to openwrt. Way over my head. Bricked the xe3000 and managed to install fresh 4.8 install.

So i followed your steps again.

Still no netstat.

Then i installed nmap to see what you have without tailscale, just local.

0.0.0.0 state is not open but filtered, 192.168.8.1 is closed

If you’d like, you can follow the tutorial below to share your device with us via GoodCloud.
I’ll help you adjust the settings remotely.

Please note to send me the device’s MAC address and the password for the management panel via private message so I can access it.