|
From: | Stein, S. Joshua |
Subject: | Opening port for remote access to gpsd |
Date: | Wed, 22 Jul 2020 15:31:37 +0000 |
I have an application wherein a GPS unit is attached to a Raspian machine. I have gpsd running and receiving info from the GPS on /dev/ttyUSB0. Connection to the daemon works fine on localhost. I would like to connect to that same daemon from a remote machine using the HOST kwarg when instantiating the gps object. As it stands now, this will fail since the daemon is set up to only listen to localhost. So I change the arguments which fire off gpsd and add the ‘-G’ flag. Upon reboot, I see that gpsd has been invoked properly: ● gpsd.service - GPS (Global Positioning System) Daemon Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor preset: enabled) Active:
active (running) since Wed 2020-07-22 09:12:09 CDT; 12min ago Process: 323 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES (code=exited, status=0/SUCCESS) Main PID: 345 (gpsd) Tasks: 1 (limit: 2200) Memory: 1.2M CGroup: /system.slice/gpsd.service └─345 /usr/sbin/gpsd -G /dev/ttyUSB0 However when I attempt to connect remotely, I am prevented from doing so (ConnectionRefusedError).
If I kill the daemon process (gpsd.socket and gpsd.service) and then invoke gpsd from the command line with: >gpsd –G \dev\ttyUSB0 I am able to connect remotely just fine. So it appears the issue is with how systemd (systemctl) is firing off the daemon I then tried changing the SocketMode parameter within the gpsd.socket file from: SocketMode=0600 To SocketMode=0666 And eventually to SocketMode=0777 Neither of those made any difference. I realize this issue is likely one of my incomplete understanding of the systemd/systemctl process for handling sockets – but my hope in posting here is that someone else has encountered this issue and can point me to the “AHA!” moment. Samuel Joshua Stein (Josh) – Research Engineer Argonne Special Projects - Material Science Division Argonne National Laboratory 9700 S. Cass Ave, Argonne IL 60439 (630) 252-4105 |
[Prev in Thread] | Current Thread | [Next in Thread] |