mainGPSD - Support: sr #109683, gpsd only allows starting cgps once

 
 

sr #109683: gpsd only allows starting cgps once

Submitter:  None
Submitted:  Mon 13 May 2019 01:17:04 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 13 May 2019 01:17:04 PM UTC, original submission:  

Activating gps device:

      SerialWrite "ATE0"
      SerialWrite "AT+CGNSPWR=1"
      SerialWrite "AT+CGNSSEQ=\"RMC\""
      SerialWrite "AT+CGNSINF"
      SerialWrite "AT+CGNSURC=2"
      SerialWrite "AT+CGNSTST=1"


Wait for PPS signal to appear, then start gpsd:

systemctl start gpsd


gpsd starts fine. It is started as root, opening devices, then switching to user gpsd:

gpsd      6253  0.0  0.3   7124  3164 ?        S<s  14:28   0:00 /usr/sbin/gpsd -N /dev/ttyAMA0


This user is allowed to read/write from/to /dev/ttyAMA0:

crw-rw---- 1 root dialout 204, 64 Mai 13 14:28 /dev/ttyAMA0


Group dialout:

dialout:x:20:pi,gpsd


Starting cgps it immediately shows:

┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       2019-05-13T12:39:33.000Z   ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:    48.221333 N               ││  87    88    026    32      Y   │
│    Longitude:   11.589967 E               ││  77    75    153    17      Y   │
│    Altitude:   483.0 m                    ││  78    47    320    45      Y   │
│    Speed:      0.0 kph                    ││  86    26    038    42      Y   │
│    Heading:    176.5 deg (true)           ││  70    08    017    25      Y   │
│    Climb:      n/a                        ││                                 │
│    Status:     3D FIX (0 secs)            ││                                 │
│    Longitude Err:   +/- 28 m              ││                                 │
│    Latitude Err:    +/- 52 m              ││                                 │
│    Altitude Err:    +/- 20 m              ││                                 │
│    Course Err:      n/a                   ││                                 │
│    Speed Err:       n/a                   ││                                 │
│    Time offset:     0.677                 ││                                 │
│    Grid Square:     JN58tf                ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘
{"class":"VERSION","release":"3.16","rev":"3.16-4","proto_major":3,"proto_minor":11}


But it does not update. After some time:

cgps: GPS timeout


looks like /etc/gpsd/device-hook not called as expected or -- whatever it does is overwritten by some later commands send to /dev/ttyAMA0.

I can indeed:
# start gpsd
# then reinitialize /dev/ttyAMA0 (reverting whatever gpsd does) by calling

/etc/gpsd/device-hook /dev/ttyAMA0 ACTIVATE


gpsd then will read /dev/ttyAMA0 and update cgps as expected.

This problem exists with

  • gpsd: 3.16 (revision 3.16-4)
  • gpsd as found at: ttps://git.savannah.nongnu.org/git/gpsd.git



Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code