skibum
Posts: 16
Joined: Fri Jan 27, 2017 1:45 pm

Problems getting adafruit ultimate gps working on 4B

Sat Aug 10, 2019 6:10 pm

I've got the adafruit ultimate gps and connected it via the uart to my 4B. I'm not seeing a thing from the serial port however. But the pps is working fine.

same device works fine on 3B+ (stretch) and zero wh (buster lite).

I'm wondering if its related to all the new uarts that the 4B as (see https://www.raspberrypi.org/forums/view ... 7&t=244827)

Anyway, my config.txt has :-

Code: Select all

core_freq=250
enable_uart=1
dtoverlay=pps-gpio,gpiopin=18
and the ppstest output shows its working fine :-

Code: Select all

sudo ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1565459505.008842534, sequence: 284 - clear  0.000000000, sequence: 0
source 0 - assert 1565459506.008826885, sequence: 285 - clear  0.000000000, sequence: 0
source 0 - assert 1565459507.008803286, sequence: 286 - clear  0.000000000, sequence: 0
source 0 - assert 1565459508.008784624, sequence: 287 - clear  0.000000000, sequence: 0
source 0 - assert 1565459509.008791343, sequence: 288 - clear  0.000000000, sequence: 0
I've obviously checked the wiring multiple times and moved it back and forward between the 3 different pi's.

dmesg has this about tty/pps :-

Code: Select all

dmesg | grep -e tty -e pps
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M video=HDMI-A-1:1920x1200@60 smsc95xx.macaddr=DC:A6:32:09:BF:45 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.000259] console [tty1] enabled
[    0.862089] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 33, base_baud = 0) is a PL011 rev2
[    0.865302] fe215040.serial: ttyS0 at MMIO 0x0 (irq = 35, base_baud = 68750000) is a 16550
[    2.220021] systemd[1]: Created slice system-getty.slice.
[    2.375097] pps_core: LinuxPPS API ver. 1 registered
[    2.375108] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.379432] pps pps0: new PPS source pps@12.-1
[    2.379501] pps pps0: Registered IRQ 58 as PPS source

Code: Select all

ll /dev/serial*
lrwxrwxrwx 1 root root 5 Aug 10 18:29 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root 7 Aug 10 18:29 /dev/serial1 -> ttyAMA0
There are no processes using ttyS0 or serial0

any one got any ideas?

I've plugged in it to physical pins 1, 6, 8, 10 & 12 (so 3v3, gnd, bcm14/txd, bcm15/rxd, bcm18/pps)

Just doing a 'cat /dev/ttyS0' does nothing, except wait. On the other pi's it outputs the nmea stream.

Obviously gpsd/gpsmon etc don't work.

I haven't tried enabling any of the other uarts yet.

trejan
Posts: 2931
Joined: Tue Jul 02, 2019 2:28 pm

Re: Problems getting adafruit ultimate gps working on 4B

Sat Aug 10, 2019 6:48 pm

I've got a GPS attached a RPi 4 here and it is working fine. The only difference is that I've disabled Bluetooth because I don't need it so TXD/RXD pins on the header are connected to the PL011 UART instead of the mini UART. Make sure to stop systemd from spawning a shell on that serial port BTW.

Code: Select all

dtoverlay=pps-gpio,gpiopin=18
dtoverlay=pi3-disable-bt
enable_uart=1

skibum
Posts: 16
Joined: Fri Jan 27, 2017 1:45 pm

Re: Problems getting adafruit ultimate gps working on 4B

Sat Aug 10, 2019 10:31 pm

Well adding uart5 and moving the tx/rx to pins 32/33 worked.

For uart0 I tried disabling bluetooth as well. That confused me for a while as it meant that /dev/ttyS0 just gave I/O errors, but then of course I should have used /dev/ttyAMA0. Using that and its just the same. Not taking to me.

Guess its back to using uart5 for now.

trejan
Posts: 2931
Joined: Tue Jul 02, 2019 2:28 pm

Re: Problems getting adafruit ultimate gps working on 4B

Sun Aug 11, 2019 1:07 am

Hmm. Strange. Have you got something else using those two pins? If there is no dtoverlay or GPIO configuration blocking it then I'd suspect something has killed the RXD pin.

User avatar
bensimmo
Posts: 4988
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Problems getting adafruit ultimate gps working on 4B

Sun Aug 11, 2019 9:31 am

Just an f.y.i.
Don't put
core_freq=250
For any pi, the uart command does it for you if needed.

You have remembered turned the console serial off?

skibum
Posts: 16
Joined: Fri Jan 27, 2017 1:45 pm

Re: Problems getting adafruit ultimate gps working on 4B

Sun Aug 11, 2019 10:40 am

Sorted out the issue.

While it wasn't connected I had installed previous the Pimoroni fanshim and the software for it.

Disabling it via systemctl and rebooting seems to have fixed it. Although stopping and disabling it didn't without the reboot.

But I think as I'll probably want to keep using the shim, I'll stick to moving it to uart5.

Return to “Troubleshooting”