03daniel11
Posts: 7
Joined: Sat Nov 18, 2017 10:23 pm

gpsd autostart on RPi3

Wed Nov 29, 2017 6:29 pm

Hello everyone,
I've installed gpsd on my RPi3. Everytime I want to use it, I have to manually enter
"sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock". Is there a way to start the daemon automatically or with help of a python script?

And maybe one could help me with another problem:
To access gpsd I have installed "gps3 0.33.3" from https://pypi.python.org/pypi/gps3/.
When I'm trying to read the time-Information and output it, it seems like python misses two to three seconds from time to time.
What could be the reason?

The code-snippet:

from gps3 import gps3
gps_socket = gps3.GPSDSocket()
data_stream = gps3.DataStream()
gps_socket.connect()
gps_socket.watch()


for new_data in gps_socket:
if new_data:
data_stream.unpack(new_data)
data = data_stream.TPV['time']
print(data)

Thank you in advance,
Daniel

AJB2K3
Posts: 215
Joined: Sun Aug 11, 2013 3:25 pm

Re: gpsd autostart on RPi3

Wed Nov 29, 2017 8:03 pm

There is as I had to do it on my setup (I haven't had time to do anymore work to it)
Something to do with the Init files but can't remember or find my pi!
Search for auto start demon.
Back in the old days, we were smarter then the technology.
Nowadays technology makes us look like villages fools in front of the children!

03daniel11
Posts: 7
Joined: Sat Nov 18, 2017 10:23 pm

Re: gpsd autostart on RPi3

Wed Nov 29, 2017 8:55 pm

Hi,
thanks for your reply!
Google shows dozens of tutorials, do you remember some additional information?

And what about the (python) code, did it work for you properly?

Return to “Troubleshooting”