0
\$\begingroup\$

I attached Adafruit's Ultimate V3 breakout board to my Racpi 3B by using its UART wires. It used to work indoors (I live right under the roof) quite fine for a couple of years when attaching an external antenna, but some one year ago it suddendly stopped getting any satellite fixes. Nothing! Replacing the antenna and making it hang out of the window did not help. Here is what I get from the cgps utility:

┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       n/a                        ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:   n/a                        ││                                 │
│    Longitude:  n/a                        ││                                 │
│    Altitude:   n/a                        ││                                 │
│    Speed:      n/a                        ││                                 │
│    Heading:    n/a                        ││                                 │
│    Climb:      n/a                        ││                                 │
│    Status:     NO FIX (0 secs)            ││                                 │
│    Longitude Err:   n/a                   ││                                 │
│    Latitude Err:    n/a                   ││                                 │
│    Altitude Err:    n/a                   ││                                 │
│    Course Err:      n/a                   ││                                 │
│    Speed Err:       n/a                   ││                                 │
│    Time offset:     n/a                   ││                                 │
│    Grid Square:     n/a                   ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘
{"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":1
2}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"

9600,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"
timing":false,"split24":false,"pps":false}

Some 2 minutes later I only get a timeout, and cgps exits.

gpsd seems to run fine:

pi@autoradio:~ $ sudo systemctl status --no-pager -l gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2022-03-30 21:12:33 CEST; 44min ago
  Process: 464 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES (code=exited, status=0/SUCCESS)
 Main PID: 492 (gpsd)
    Tasks: 1 (limit: 2059)
   CGroup: /system.slice/gpsd.service
           └─492 /usr/sbin/gpsd -D 3 /dev/ttyS0

Mär 30 21:28:18 autoradio gpsd[492]: gpsd:CLIENT: => client(1): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyS0","activated":"2022-03-30T19:12:37.746Z","native":0,"bps":9600,"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
Mär 30 21:30:19 autoradio gpsd[492]: gpsd:INFO: detaching ::1 (sub 1, fd 10) in detach_client
Mär 30 21:37:40 autoradio gpsd[492]: gpsd:CLIENT: => client(1): {"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":12}\x0d\x0a
Mär 30 21:37:40 autoradio gpsd[492]: gpsd:CLIENT: <= client(1): ?WATCH={"enable":true,"json":true};\x0a
Mär 30 21:37:40 autoradio gpsd[492]: gpsd:CLIENT: => client(1): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyS0","activated":"2022-03-30T19:12:37.746Z","native":0,"bps":9600,"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
Mär 30 21:39:42 autoradio gpsd[492]: gpsd:INFO: detaching ::1 (sub 1, fd 10) in detach_client
Mär 30 21:48:31 autoradio gpsd[492]: gpsd:CLIENT: => client(1): {"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":12}\x0d\x0a
Mär 30 21:48:31 autoradio gpsd[492]: gpsd:CLIENT: <= client(1): ?WATCH={"enable":true,"json":true};\x0a
Mär 30 21:48:31 autoradio gpsd[492]: gpsd:CLIENT: => client(1): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyS0","activated":"2022-03-30T19:12:37.746Z","native":0,"bps":9600,"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
Mär 30 21:50:32 autoradio gpsd[492]: gpsd:INFO: detaching ::1 (sub 1, fd 10) in detach_client

The logic analyser shows me this (wth Tx (attached to pin #8 on the Pi) in green and Rx (attached to pin #10) in yellow):

logic analyser output

What's wrong here? Maybe a broken receiver module? Why can't I get any satellite fixes any more?

UPDATE: After double-checking all connections, cgps does not timeout any more, but I still get not the desired fix. The FIX LED blinks once a second for some 4 minutes and after that once per 15 secs:

┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       n/a                        ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:   n/a                        ││                                 │
│    Longitude:  n/a                        ││                                 │
│    Altitude:   n/a                        ││                                 │
│    Speed:      n/a                        ││                                 │
│    Heading:    n/a                        ││                                 │
│    Climb:      n/a                        ││                                 │
│    Status:     NO FIX (83 secs)           ││                                 │
│    Longitude Err:   n/a                   ││                                 │
│    Latitude Err:    n/a                   ││                                 │
│    Altitude Err:    n/a                   ││                                 │
│    Course Err:      n/a                   ││                                 │
│    Speed Err:       n/a                   ││                                 │
│    Time offset:     n/a                   ││                                 │
│    Grid Square:     n/a                   ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘
{"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":1
2}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"

9600,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"
timing":false,"split24":false,"pps":false}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}
{"class":"DEVICE","path":"/dev/ttyS0","activated":0}

At least the output of the logic analyser (recording for 250 ms) looks slightly healthier:

logic analyser output

But: The output of systemctl now gives me a strange error message, which looks as if the GPS device hasn't been detected:

pi@autoradio:~ $ systemctl status --no-pager --full gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2022-04-01 23:29:40 CEST; 54min ago
  Process: 431 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES (code=exited, status=0/SUCCESS)
 Main PID: 466 (gpsd)
    Tasks: 1 (limit: 2059)
   CGroup: /system.slice/gpsd.service
           └─466 /usr/sbin/gpsd -D 3 /dev/ttyS0

Apr 02 00:18:54 autoradio gpsd[466]: gpsd:INFO: SER: speed 4800, 7N2
Apr 02 00:18:56 autoradio gpsd[466]: gpsd:INFO: SER: speed 9600, 7N2
Apr 02 00:18:57 autoradio gpsd[466]: gpsd:INFO: SER: speed 19200, 7N2
Apr 02 00:18:57 autoradio gpsd[466]: gpsd:INFO: SER: speed 38400, 7N2
Apr 02 00:18:58 autoradio gpsd[466]: gpsd:INFO: SER: speed 57600, 7N2
Apr 02 00:18:58 autoradio gpsd[466]: gpsd:INFO: SER: speed 115200, 7N2
Apr 02 00:18:58 autoradio gpsd[466]: gpsd:INFO: SER: speed 230400, 7N2
Apr 02 00:18:59 autoradio gpsd[466]: gpsd:INFO: hunt on /dev/ttyS0 failed (10.507734 sec since data)
Apr 02 00:18:59 autoradio gpsd[466]: gpsd:WARN: device read of /dev/ttyS0 returned error or packet sniffer failed sync (flags {ERROR})
Apr 02 00:18:59 autoradio gpsd[466]: gpsd:INFO: closing GPS=/dev/ttyS0 (9)
\$\endgroup\$
15
  • 1
    \$\begingroup\$ Do I get it right, you actually DO have RX traffic to Pi? From what I see on the logic analyzer? \$\endgroup\$
    – Ilya
    Mar 30, 2022 at 20:33
  • \$\begingroup\$ The green channel is the one transmitting data from the GPS sensor to the Pi, so it's the Tx on the GPS board and the Rx on the Pi. \$\endgroup\$
    – Neppomuk
    Mar 30, 2022 at 20:56
  • 2
    \$\begingroup\$ That's not the answer. I asked a very specific question which transmission is missing. If Pi to GPS is missing, then it's either line is shorted (because Pi pin is shorted or GPS pin is shorted), or Pi is actually not sending anything, so it's a problem on Pi side. If Pi is only supposed to receive data, then GPS is actually sending data, but Pi fails to receive/process it. In either case, the problem is most likely on Pi side. \$\endgroup\$
    – Ilya
    Mar 30, 2022 at 21:21
  • 2
    \$\begingroup\$ The data sent start with $GPG which is standard NMEA, but we don’t have an horizontal scale so I don’t know what speed the data is sent at. Try the usual suspects (4800, 19200, 38400, 115200…). You may want to try with any terminal program (e.g. minicom or screen) to get the raw data before feeding that into a GPS parser. \$\endgroup\$
    – jcaron
    Mar 31, 2022 at 23:38
  • 1
    \$\begingroup\$ 9600 is what you have configured both to use, but you should try other speeds. Or tell us the horizontal (time) scale of your capture. \$\endgroup\$
    – jcaron
    Apr 1, 2022 at 21:26

1 Answer 1

1
\$\begingroup\$

Well yeah, the problem seems to be not only on the Pi's side, but also more serious than expected. This is what the gpiotest utility tells me:

pi@autoradio:/import/valen/autoradio $ ./gpiotest
[…]
Testing...
Write 1 to gpio 2 failed.
Pull up on gpio 2 failed.
[…]
Skipped non-user gpios: 0 1 28 29 30 31
Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
Failed user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 

So there must be some trouble with the Pi's circuitry.

UPDATE: Getting another Pi and attaching the GPS module to it really gives me sensible results, so it was really a faulty GPIO on the old Pi:

cpgs working

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.