Hi there!
I'm trying to write a very simple python client for Gpsd, but I have this error after some time of execute the script:
Traceback (most recent call last):
File "gps_cap.py", line 13, in <module>
g.stream()
File "/usr/lib/python2.6/site-packages/gps/gps.py", line 348, in stream
gpsjson.stream(self, flags)
File "/usr/lib/python2.6/site-packages/gps/client.py", line 176, in stream
return self.send(arg + "}")
File "/usr/lib/python2.6/site-packages/gps/client.py", line 111, in send
self.sock.send(commands)
socket.error: [Errno 104] Connection reset by peer
and this is my python code:
import os
from gps import *
from time import *
g = gps(mode=WATCH_ENABLE)
while 1:
os.system('clear')
g.poll()
if PACKET_SET:
g.stream()
print
print ' GPS reading'
print '----------------------------------------'
print 'latitude ' , g.fix.latitude
print 'longitude ' , g.fix.longitude
print 'time utc ' , g.utc,' + ', g.fix.time
print 'altitude ' , g.fix.altitude
print 'epc ' , g.fix.epc
print 'epd ' , g.fix.epd
print 'eps ' , g.fix.eps
print 'epx ' , g.fix.epx
print 'epv ' , g.fix.epv
print 'ept ' , g.fix.ept
print 'speed ' , g.fix.speed
print 'climb ' , g.fix.climb
print 'track ' , g.fix.track
print 'mode ' , g.fix.mode
print
print 'sats ' , g.satellites
sleep(1)
Maybe anyone can help with this issue? I'm runnig Gpsd 2.95 in a ArchLinux box.
Thanks!