gpsd-users
[Top][All Lists]
Advanced

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

Re: powering on gps device


From: Nachiket Gokhale
Subject: Re: powering on gps device
Date: Wed, 30 Jun 2021 16:20:20 +0530

Yo Gary!

I think I now have a reproducible solution to get TPV data out of gpsd using a client based on gps.py distributed with gpsd. I downloaded and compiled gpsd from source, so I am now running gpsd 3.22 on a Raspberry Pi. I am sending the right AT commands to get all NMEA sentences from my gps (SIMCOM 808). 

I need to do the following steps in sequence (steps 2 and 3 can be interchanged, but gpsd must be started before the turnon script):

1) /usr/local/sbin/gpsd -n -N -D3 /dev/ttyS0
2) start the client (based on gps.py in the gpsd distribution)
3) run the turnon script.  Notice that the turnon script powers the gps device on TWICE (everything is inside for ... range(2) ). This appears to be critical. After the first power on, I get a few (really, never more than 2) TPV packets and a few (really, never more than 2) SKY packets and nothing more. The continuous output of TPV and SKY packets starts only after the second power on. I usually sleep for 15 seconds in the turnon script after sending the AT command to power on.  Larger sleep times ~60s do not obviate the need to turn on the gps device twice.

Not sure why the device (and/or) gpsd is behaving this way. When gpsd is not connected to the serial port, a single command to power on the gps device is sufficient to produce output on /dev/ttyS0. 

I have tested this ~40 times and the only time this doesn't work is when the gps stops outputting NMEA sentences to /dev/ttyS0. I have produced output from the device for 5 straight hours, and a few other runs of ~ 2 hr duration, indicating that the chip and the connection with gpsd is stable. 

See below for the turn on script and output of gpsd.

As always, thank you for your time.

Final question:  I am stopping gpsd with Ctrl+C. Will this cause any problems (e.g. not shutting down the gps or the serial port cleanly). Is there a better way to stop gpsd?

Nachiket

######### Turn on script #####################################################
from time import sleep
import serial
import sys

def countdown(time_):
    time_back = time_
    while time_ > 0:
        print('Sleeping for {}s '.format(time_),end='\r')
        sleep(1)
        time_ -=1
    print(' '*60,end='\r')
    print('Slept for {}s'.format(time_back))
   
sleepsecs  = int(sys.argv[1])
runforever = int(sys.argv[2])

for ictr in range(2):
    ser = serial.Serial(
        port='/dev/ttyS0', #Replace ttyS0 with ttyAM0 for Pi1,Pi2,Pi0
        baudrate = 115200,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE,
        bytesize=serial.EIGHTBITS,
        timeout=1,
        exclusive=False
    )
 
    print ("Turn ON GPS Power (AT+CGPSPWR=1)")
    ser.write(bytes("AT+CGPSPWR=1\n", 'utf-8')) #turn on the GPS module
    # Reading response has been commented because
    # gpsd might be reading at the same time and this causes
    # serial.serialutil.SerialException
    # device reports readiness to read but returned no data
    # rx = ser.readline()
    # print (rx.decode('utf-8'))

    # sleep(30) # Wait till the module gets a fix. This typically takes between 20-60s.

    print ("Waiting for {}s to get a GPS fix...".format(sleepsecs))
    countdown(sleepsecs)
    print ("GPS output set to ALL (AT+CGPSOUT=255)")
    ser.write(bytes("AT+CGPSOUT=255\n", 'utf-8'))
    countdown(5)
# readline turned off - see notes above
# rx = ser.readline()
# print (rx.decode('utf-8'))
#print ("\n")

#if not runforever:
#    print('Exiting without turning off GPS Power or serial port close\n')
# ser.close()

try:
    while runforever:
        print('Staying alive')
        sleep(5)
except KeyboardInterrupt as e:
    print('Caught KeyboardInterrupt....')
finally:
    print('Exiting WITHOUT serial port close')
    print('NOT turning off GPS')
    #print ("Turn OFF GPS Power (AT+CGPSPWR=0)")
    #ser.write(bytes("AT+CGPSPWR=0\n", 'utf-8'))
    #readline turned off - see notes above
    #rx = ser.readline()
    #print (rx.decode('utf-8'))
    #print ("\n")
    #ser.close() # close serial port
    #sleep(5)
######## Turn on script ends ######################################################
######## gpsd output starts ############################################################
/usr/local/sbin/gpsd -n -N -D3 /dev/ttyS0
gpsd:WARN: This system has a 32-bit time_t.  This gpsd will fail at 2038-01-19T03:14:07Z.
gpsd:INFO: launching (Version 3.22)
gpsd:INFO: listening on port gpsd
gpsd:INFO: stashing device /dev/ttyS0 at slot 0
gpsd:INFO: SER: opening GPS data source type 2 at '/dev/ttyS0'
gpsd:INFO: SER: speed 115200, 8N1
gpsd:INFO: SER: speed 9600, 8O1
gpsd:INFO: SER: speed 115200, 8N1
gpsd:INFO: SER: speed 9600, 8N1
gpsd:INFO: SER: speed 115200, 8N1
gpsd:INFO: gpsd_activate(2): activated GPS (fd 5)
gpsd:INFO: KPPS:/dev/ttyS0 RFC2783 path:/dev/pps0, fd is 6
gpsd:INFO: KPPS:/dev/ttyS0 pps_caps 0x1133
gpsd:INFO: KPPS:/dev/ttyS0 have PPS_CANWAIT
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS will be used
gpsd:INFO: PPS: activated /dev/ttyS0 ntpshm_link_activate(): Clock
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: running with effective group ID 20
gpsd:INFO: running with effective user ID 65534
gpsd:INFO: startup at 2021-06-30T10:40:50.000Z (1625049650)
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:CLIENT: => client(0): {"class":"VERSION","release":"3.22","rev":"3.22","proto_major":3,"proto_minor":14}\x0d\x0a
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true}\x0a
gpsd:CLIENT: => client(0): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyS0","activated":"2021-06-30T10:40:50.876Z","native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}]}\x0d\x0a{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}\x0d\x0a
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"nmea":true}\x0a
gpsd:CLIENT: => client(0): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyS0","activated":"2021-06-30T10:40:50.876Z","native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}]}\x0d\x0a{"class":"WATCH","enable":true,"json":true,"nmea":true,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}\x0d\x0a
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: /dev/ttyS0 identified as type NMEA0183, 10 sec @ 115200bps
gpsd:WARN: NMEA0183: can't use GGA time until after ZDA or RMC has supplied a year.
gpsd:CLIENT: => client(0): {"class":"DEVICE","path":"/dev/ttyS0","driver":"NMEA0183","activated":"2021-06-30T10:41:00.629Z","native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGGA,104100.000,1830.8645,N,07349.9738,E,1,8,1.04,575.8,M,-64.7,M,,*7B\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"lat":18.514408333,"lon":73.832896667,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"magvar":-0.2,"geoidSep":-64.700,"eph":19.760}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"lat":18.514408333,"lon":73.832896667,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epv":19.090,"magvar":-0.2,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,1,13,29,76,142,23,23,52,296,41,15,52,058,20,18,41,347,37*78\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,2,13,10,30,260,37,13,21,048,13,25,16,192,16,24,15,131,*7C\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,3,13,26,13,282,,05,11,044,,32,06,206,21,16,04,308,17*79\x0d\x0a
gpsd:INFO: PRN 29 az 142.0 el 76.0 ( 0.148942, -0.190637,  0.970296)
gpsd:INFO: PRN 23 az 296.0 el 52.0 (-0.553353,  0.269888,  0.788011)
gpsd:INFO: PRN 15 az  58.0 el 52.0 ( 0.522111,  0.326251,  0.788011)
gpsd:INFO: PRN 18 az 347.0 el 41.0 (-0.169773,  0.735366,  0.656059)
gpsd:INFO: PRN 10 az 260.0 el 30.0 (-0.852869, -0.150384,  0.500000)
gpsd:INFO: PRN 13 az  48.0 el 21.0 ( 0.693785,  0.624687,  0.358368)
gpsd:INFO: PRN 25 az 192.0 el 16.0 (-0.199858, -0.940256,  0.275637)
gpsd:INFO: PRN 32 az 206.0 el  6.0 (-0.435970, -0.893870,  0.104528)
gpsd:INFO: Sats used (8):
gpsd:CLIENT: => client(0): $GPGSV,4,4,13,193,,,*40\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"SKY","device":"/dev/ttyS0","xdop":0.78,"ydop":0.75,"vdop":0.83,"tdop":0.91,"hdop":1.04,"gdop":2.06,"pdop":1.33,"nSat":13,"uSat":8,"satellites":[{"PRN":29,"el":76.0,"az":142.0,"ss":23.0,"used":true,"gnssid":0,"svid":29},{"PRN":23,"el":52.0,"az":296.0,"ss":41.0,"used":true,"gnssid":0,"svid":23},{"PRN":15,"el":52.0,"az":58.0,"ss":20.0,"used":true,"gnssid":0,"svid":15},{"PRN":18,"el":41.0,"az":347.0,"ss":37.0,"used":true,"gnssid":0,"svid":18},{"PRN":10,"el":30.0,"az":260.0,"ss":37.0,"used":true,"gnssid":0,"svid":10},{"PRN":13,"el":21.0,"az":48.0,"ss":13.0,"used":true,"gnssid":0,"svid":13},{"PRN":25,"el":16.0,"az":192.0,"ss":16.0,"used":true,"gnssid":0,"svid":25},{"PRN":24,"el":15.0,"az":131.0,"ss":0.0,"used":false,"gnssid":0,"svid":24},{"PRN":26,"el":13.0,"az":282.0,"ss":0.0,"used":false,"gnssid":0,"svid":26},{"PRN":5,"el":11.0,"az":44.0,"ss":0.0,"used":false,"gnssid":0,"svid":5},{"PRN":32,"el":6.0,"az":206.0,"ss":21.0,"used":true,"gnssid":0,"svid":32},{"PRN":16,"el":4.0,"az":308.0,"ss":17.0,"used":false,"gnssid":0,"svid":16},{"PRN":193,"el":0.0,"az":0.0,"ss":0.0,"used":false,"gnssid":5,"svid":1}]}\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104100.000,A,1830.8645,N,07349.9738,E,0.21,295.59,300621,,,A*64\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:00.000Z","ept":0.005,"lat":18.514408333,"lon":73.832896667,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.728,"epy":11.243,"epv":19.090,"track":295.5900,"magtrack":295.4358,"magvar":-0.2,"speed":0.108,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:WARN: PPS:/dev/ttyS0 unchanged state, ppsmonitor sleeps 10
gpsd:WARN: cycle-start detector failed.
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104115.000,1830.8643,N,07349.9734,E,1,8,1.04,575.8,M,-64.7,M,,*75\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104120.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*70\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:20.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.728,"epy":11.243,"epv":19.090,"magvar":-0.2,"speed":0.079,"climb":0.000,"eps":4.69,"epc":7.64,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,1,13,29,76,142,28,23,52,296,41,15,51,058,17,18,41,347,36*75\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,2,13,10,30,261,37,13,21,048,12,25,16,192,16,24,15,131,*7C\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,3,13,26,13,282,,05,11,044,,32,06,206,24,16,04,308,18*73\x0d\x0a
gpsd:INFO: PRN 29 az 142.0 el 76.0 ( 0.148942, -0.190637,  0.970296)
gpsd:INFO: PRN 23 az 296.0 el 52.0 (-0.553353,  0.269888,  0.788011)
gpsd:INFO: PRN 15 az  58.0 el 51.0 ( 0.533694,  0.333489,  0.777146)
gpsd:INFO: PRN 18 az 347.0 el 41.0 (-0.169773,  0.735366,  0.656059)
gpsd:INFO: PRN 10 az 261.0 el 30.0 (-0.855363, -0.135476,  0.500000)
gpsd:INFO: PRN 13 az  48.0 el 21.0 ( 0.693785,  0.624687,  0.358368)
gpsd:INFO: PRN 25 az 192.0 el 16.0 (-0.199858, -0.940256,  0.275637)
gpsd:INFO: PRN 32 az 206.0 el  6.0 (-0.435970, -0.893870,  0.104528)
gpsd:INFO: Sats used (8):
gpsd:CLIENT: => client(0): $GPGSV,4,4,13,193,,,*40\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"SKY","device":"/dev/ttyS0","xdop":0.78,"ydop":0.75,"vdop":0.83,"tdop":0.91,"hdop":1.04,"gdop":2.06,"pdop":1.33,"nSat":13,"uSat":8,"satellites":[{"PRN":29,"el":76.0,"az":142.0,"ss":28.0,"used":true,"gnssid":0,"svid":29},{"PRN":23,"el":52.0,"az":296.0,"ss":41.0,"used":true,"gnssid":0,"svid":23},{"PRN":15,"el":51.0,"az":58.0,"ss":17.0,"used":true,"gnssid":0,"svid":15},{"PRN":18,"el":41.0,"az":347.0,"ss":36.0,"used":true,"gnssid":0,"svid":18},{"PRN":10,"el":30.0,"az":261.0,"ss":37.0,"used":true,"gnssid":0,"svid":10},{"PRN":13,"el":21.0,"az":48.0,"ss":12.0,"used":true,"gnssid":0,"svid":13},{"PRN":25,"el":16.0,"az":192.0,"ss":16.0,"used":true,"gnssid":0,"svid":25},{"PRN":24,"el":15.0,"az":131.0,"ss":0.0,"used":false,"gnssid":0,"svid":24},{"PRN":26,"el":13.0,"az":282.0,"ss":0.0,"used":false,"gnssid":0,"svid":26},{"PRN":5,"el":11.0,"az":44.0,"ss":0.0,"used":false,"gnssid":0,"svid":5},{"PRN":32,"el":6.0,"az":206.0,"ss":24.0,"used":true,"gnssid":0,"svid":32},{"PRN":16,"el":4.0,"az":308.0,"ss":18.0,"used":false,"gnssid":0,"svid":16},{"PRN":193,"el":0.0,"az":0.0,"ss":0.0,"used":false,"gnssid":5,"svid":1}]}\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104120.000,A,1830.8642,N,07349.9736,E,0.09,93.44,300621,,,A*5D\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:20.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"track":93.4400,"magtrack":93.2858,"magvar":-0.2,"speed":0.046,"climb":0.000,"eps":4.68,"epc":7.64,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK605*31\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"DEVICE","path":"/dev/ttyS0","driver":"MTK-3301","subtype":"AXN_2.32_3337_15010801-0000","activated":"2021-06-30T10:41:20.716Z","flags":1,"native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00,"mincycle":0.10}\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK705,AXN_2.32_3337_15010801,0000,,*2D\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK320,0*2F\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK300,1000,0,0,0.0,0.0*1C\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK001,320,3*31\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK314,0,1,0,1,1,5,1,1,0,0,0,0,0,0,0,0,0,1,0*2D\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK301,2*2E\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK001,300,3*33\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK313,1*2E\x0d\x0a
gpsd:CLIENT: => client(0): $PMTK424*30\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $PMTK001,314,3*36\x0d\x0a
gpsd:WARN: NMEA0183: MTK NACK: 301, reason: Valid but Failed
gpsd:CLIENT: => client(0): $PMTK001,301,2*33\x0d\x0a
gpsd:WARN: NMEA0183: MTK NACK: 313, reason: Unsupported
gpsd:CLIENT: => client(0): $PMTK001,313,1*33\x0d\x0a
gpsd:WARN: NMEA0183: MTK NACK: 424, reason: Unsupported
gpsd:CLIENT: => client(0): $PMTK001,424,1*30\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104121.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*71\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:21.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104121.000,A,1830.8642,N,07349.9736,E,0.04,165.74,300621,,,A*6A\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:21.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"track":165.7400,"magtrack":165.5858,"magvar":-0.2,"speed":0.021,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104122.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*72\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:22.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104122.000,A,1830.8642,N,07349.9736,E,0.09,133.74,300621,,,A*67\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:22.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"track":133.7400,"magtrack":133.5858,"magvar":-0.2,"speed":0.046,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104123.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*73\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:23.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104123.000,A,1830.8642,N,07349.9736,E,0.09,162.06,300621,,,A*67\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:23.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"track":162.0600,"magtrack":161.9058,"magvar":-0.2,"speed":0.046,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104124.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*74\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:24.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104124.000,A,1830.8642,N,07349.9736,E,0.07,39.98,300621,,,A*56\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:24.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"track":39.9800,"magtrack":39.8258,"magvar":-0.2,"speed":0.036,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104125.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*75\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:25.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.658,"epy":11.229,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.32,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,1,13,29,76,142,29,23,52,296,41,15,51,058,19,18,41,347,36*7A\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,2,13,10,30,261,37,13,21,048,11,25,16,191,16,24,15,130,*7D\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,3,13,26,13,282,,05,11,044,,32,06,206,24,16,04,308,18*73\x0d\x0a
gpsd:INFO: PRN 29 az 142.0 el 76.0 ( 0.148942, -0.190637,  0.970296)
gpsd:INFO: PRN 23 az 296.0 el 52.0 (-0.553353,  0.269888,  0.788011)
gpsd:INFO: PRN 15 az  58.0 el 51.0 ( 0.533694,  0.333489,  0.777146)
gpsd:INFO: PRN 18 az 347.0 el 41.0 (-0.169773,  0.735366,  0.656059)
gpsd:INFO: PRN 10 az 261.0 el 30.0 (-0.855363, -0.135476,  0.500000)
gpsd:INFO: PRN 13 az  48.0 el 21.0 ( 0.693785,  0.624687,  0.358368)
gpsd:INFO: PRN 25 az 191.0 el 16.0 (-0.183417, -0.943601,  0.275637)
gpsd:INFO: PRN 32 az 206.0 el  6.0 (-0.435970, -0.893870,  0.104528)
gpsd:INFO: Sats used (8):
gpsd:CLIENT: => client(0): $GPGSV,4,4,13,193,,,*40\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"SKY","device":"/dev/ttyS0","xdop":0.78,"ydop":0.75,"vdop":0.83,"tdop":0.91,"hdop":1.04,"gdop":2.06,"pdop":1.33,"nSat":13,"uSat":8,"satellites":[{"PRN":29,"el":76.0,"az":142.0,"ss":29.0,"used":true,"gnssid":0,"svid":29},{"PRN":23,"el":52.0,"az":296.0,"ss":41.0,"used":true,"gnssid":0,"svid":23},{"PRN":15,"el":51.0,"az":58.0,"ss":19.0,"used":true,"gnssid":0,"svid":15},{"PRN":18,"el":41.0,"az":347.0,"ss":36.0,"used":true,"gnssid":0,"svid":18},{"PRN":10,"el":30.0,"az":261.0,"ss":37.0,"used":true,"gnssid":0,"svid":10},{"PRN":13,"el":21.0,"az":48.0,"ss":11.0,"used":true,"gnssid":0,"svid":13},{"PRN":25,"el":16.0,"az":191.0,"ss":16.0,"used":true,"gnssid":0,"svid":25},{"PRN":24,"el":15.0,"az":130.0,"ss":0.0,"used":false,"gnssid":0,"svid":24},{"PRN":26,"el":13.0,"az":282.0,"ss":0.0,"used":false,"gnssid":0,"svid":26},{"PRN":5,"el":11.0,"az":44.0,"ss":0.0,"used":false,"gnssid":0,"svid":5},{"PRN":32,"el":6.0,"az":206.0,"ss":24.0,"used":true,"gnssid":0,"svid":32},{"PRN":16,"el":4.0,"az":308.0,"ss":18.0,"used":false,"gnssid":0,"svid":16},{"PRN":193,"el":0.0,"az":0.0,"ss":0.0,"used":false,"gnssid":5,"svid":1}]}\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104125.000,A,1830.8642,N,07349.9736,E,0.13,359.90,300621,,,A*6F\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:25.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"track":359.9000,"magtrack":359.7458,"magvar":-0.2,"speed":0.067,"climb":0.000,"eps":23.29,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104126.000,1830.8642,N,07349.9736,E,1,8,1.08,575.8,M,-64.7,M,,*7A\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:26.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.26,"epc":38.18,"geoidSep":-64.700,"eph":20.520,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.85,1.08,1.50*01\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104126.000,A,1830.8642,N,07349.9736,E,0.08,170.70,300621,,,A*61\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:26.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"track":170.7000,"magtrack":170.5458,"magvar":-0.2,"speed":0.041,"climb":0.000,"eps":23.26,"epc":38.18,"geoidSep":-64.700,"eph":20.520,"sep":25.270}\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104127.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*77\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:27.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":34.500,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.26,"epc":53.59,"geoidSep":-64.700,"eph":19.760,"sep":35.150}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104127.000,A,1830.8642,N,07349.9736,E,0.05,202.41,300621,,,A*69\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:27.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":34.500,"track":202.4100,"magtrack":202.2558,"magvar":-0.2,"speed":0.026,"climb":0.000,"eps":23.26,"epc":53.59,"geoidSep":-64.700,"eph":19.760,"sep":35.150}\x0d\x0a
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104128.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*78\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:28.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.26,"epc":53.59,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104128.000,A,1830.8642,N,07349.9736,E,0.16,223.25,300621,,,A*65\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:28.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"track":223.2500,"magtrack":223.0958,"magvar":-0.2,"speed":0.082,"climb":0.000,"eps":23.26,"epc":53.59,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104129.000,1830.8642,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*79\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:29.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.26,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104129.000,A,1830.8642,N,07349.9736,E,0.08,182.26,300621,,,A*60\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:29.000Z","ept":0.005,"lat":18.514403333,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"track":182.2600,"magtrack":182.1058,"magvar":-0.2,"speed":0.041,"climb":0.000,"eps":23.26,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104130.000,1830.8641,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*72\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:30.000Z","ept":0.005,"lat":18.514401667,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.631,"epy":11.192,"epv":19.090,"magvar":-0.2,"speed":0.184,"climb":0.000,"eps":23.26,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,1,13,29,76,143,27,23,52,296,41,15,51,058,19,18,41,347,36*75\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,2,13,10,30,261,37,13,21,048,14,25,16,191,16,24,15,130,*78\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSV,4,3,13,26,13,282,,05,11,044,,32,06,206,22,16,04,308,18*75\x0d\x0a
gpsd:INFO: PRN 29 az 143.0 el 76.0 ( 0.145592, -0.193207,  0.970296)
gpsd:INFO: PRN 23 az 296.0 el 52.0 (-0.553353,  0.269888,  0.788011)
gpsd:INFO: PRN 15 az  58.0 el 51.0 ( 0.533694,  0.333489,  0.777146)
gpsd:INFO: PRN 18 az 347.0 el 41.0 (-0.169773,  0.735366,  0.656059)
gpsd:INFO: PRN 10 az 261.0 el 30.0 (-0.855363, -0.135476,  0.500000)
gpsd:INFO: PRN 13 az  48.0 el 21.0 ( 0.693785,  0.624687,  0.358368)
gpsd:INFO: PRN 25 az 191.0 el 16.0 (-0.183417, -0.943601,  0.275637)
gpsd:INFO: PRN 32 az 206.0 el  6.0 (-0.435970, -0.893870,  0.104528)
gpsd:INFO: Sats used (8):
gpsd:CLIENT: => client(0): $GPGSV,4,4,13,193,,,*40\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"SKY","device":"/dev/ttyS0","xdop":0.78,"ydop":0.75,"vdop":0.83,"tdop":0.91,"hdop":1.04,"gdop":2.06,"pdop":1.33,"nSat":13,"uSat":8,"satellites":[{"PRN":29,"el":76.0,"az":143.0,"ss":27.0,"used":true,"gnssid":0,"svid":29},{"PRN":23,"el":52.0,"az":296.0,"ss":41.0,"used":true,"gnssid":0,"svid":23},{"PRN":15,"el":51.0,"az":58.0,"ss":19.0,"used":true,"gnssid":0,"svid":15},{"PRN":18,"el":41.0,"az":347.0,"ss":36.0,"used":true,"gnssid":0,"svid":18},{"PRN":10,"el":30.0,"az":261.0,"ss":37.0,"used":true,"gnssid":0,"svid":10},{"PRN":13,"el":21.0,"az":48.0,"ss":14.0,"used":true,"gnssid":0,"svid":13},{"PRN":25,"el":16.0,"az":191.0,"ss":16.0,"used":true,"gnssid":0,"svid":25},{"PRN":24,"el":15.0,"az":130.0,"ss":0.0,"used":false,"gnssid":0,"svid":24},{"PRN":26,"el":13.0,"az":282.0,"ss":0.0,"used":false,"gnssid":0,"svid":26},{"PRN":5,"el":11.0,"az":44.0,"ss":0.0,"used":false,"gnssid":0,"svid":5},{"PRN":32,"el":6.0,"az":206.0,"ss":22.0,"used":true,"gnssid":0,"svid":32},{"PRN":16,"el":4.0,"az":308.0,"ss":18.0,"used":false,"gnssid":0,"svid":16},{"PRN":193,"el":0.0,"az":0.0,"ss":0.0,"used":false,"gnssid":5,"svid":1}]}\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104130.000,A,1830.8641,N,07349.9736,E,0.04,242.17,300621,,,A*6A\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:30.000Z","ept":0.005,"lat":18.514401667,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.637,"epy":11.187,"epv":19.090,"track":242.1700,"magtrack":242.0158,"magvar":-0.2,"speed":0.021,"climb":0.000,"eps":23.27,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:INFO: KPPS:/dev/ttyS0 kernel PPS timeout unknown error
gpsd:WARN: cycle-start detector failed.
gpsd:CLIENT: => client(0): $GPGGA,104131.000,1830.8641,N,07349.9736,E,1,8,1.04,575.8,M,-64.7,M,,*73\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:31.000Z","ept":0.005,"lat":18.514401667,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.637,"epy":11.187,"epv":19.090,"magvar":-0.2,"speed":0.000,"climb":0.000,"eps":23.27,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
gpsd:CLIENT: => client(0): $GPGSA,A,3,15,10,13,18,29,25,32,23,,,,,1.33,1.04,0.83*0F\x0d\x0a
gpsd:CLIENT: => client(0): $GPRMC,104131.000,A,1830.8641,N,07349.9736,E,0.05,351.20,300621,,,A*6D\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"TPV","device":"/dev/ttyS0","mode":3,"time":"2021-06-30T10:41:31.000Z","ept":0.005,"lat":18.514401667,"lon":73.832893333,"altHAE":511.1000,"altMSL":575.8000,"alt":575.8000,"epx":11.637,"epy":11.187,"epv":19.090,"track":351.2000,"magtrack":351.0458,"magvar":-0.2,"speed":0.026,"climb":0.000,"eps":23.27,"epc":38.18,"geoidSep":-64.700,"eph":19.760,"sep":25.270}\x0d\x0a
^Cgpsd:WARN: received terminating signal 2.
gpsd:INFO: closing GPS=/dev/ttyS0 (5)
gpsd:WARN: exiting.
gpsd:INFO: detaching 127.0.0.1 (sub 0, fd 7) in detach_client
gpsd:WARN: shmctl for IPC_RMID failed, errno = 1 (Operation not permitted)
root@pi3b:~#
############### gpsd output ends ######################################


On Fri, Jun 25, 2021 at 4:03 PM Nachiket Gokhale <gokhalen@gmail.com> wrote:
Yo Gary!

Things are not as rosy as I thought they were yesterday. Yes, sending the right AT commands to the device helped. But I am not able to reliably repeat yesterday's results. As of now, I am trying to figure out whether this is due to my gps shutting down.

Nachiket

On Thu, Jun 24, 2021 at 10:57 PM Gary E. Miller <gem@rellim.com> wrote:
Yo Nachiket!

On Thu, 24 Jun 2021 17:42:07 +0530
Nachiket Gokhale <gokhalen@gmail.com> wrote:

> After I sent the previous email, I had an idea. I made the gps write
> out all the data (GGA,GLL,GSA,GSV, RMC,VTG,ZDA) it had to the serial
> port. After doing so, I seem to get TPV classes in my client. I will
> verify this again tomorrow, and ask again if I have any questions.

If you share, here, what you did that worked, it will help others in the
future with the same issue.

Also, if you have any doc on that device, please share as well.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

reply via email to

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