Kernel PPS not avaliable

Raspberry Pi 2

Kernel PPS not avaliable

Postby qupfer » Sun Feb 07, 2016 4:19 pm

Hi, I try to switch form a rasbian to archlinuxarm for my GPS based NTP Server.
But I have trouble to get the PPS signal working.

The GPS itself works fine:
$this->bbcode_second_pass_code('', '
┌───────────────────────────────────────────┐
│ Time: 2016-02-07T13:38:00.000Z │
│ Latitude: 55 55' 555.555" N │
│ Longitude: 22 22' 22.222" E │
│ Altitude: 252.5 m │
│ Speed: 0.1 kph │
│ Heading: 153.4 deg (true) │
│ Climb: 1.3 m/min │
│ Status: 3D FIX (271 secs) │
│ Longitude Err: +/- 1 m │
│ Latitude Err: +/- 2 m │
│ Altitude Err: +/- 8 m │
│ Course Err: n/a │
│ Speed Err: +/- 2 kph │
│ Time offset: 0.100 │
│ Grid Square: AB88BA │
└───────────────────────────────────────────┘
')

Even the PPS looks good
$this->bbcode_second_pass_code('', '
$ 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 1454860962.002928319, sequence: 1073 - clear 0.000000000, sequence: 0
source 0 - assert 1454860963.002923628, sequence: 1074 - clear 0.000000000, sequence: 0
source 0 - assert 1454860964.002922901, sequence: 1075 - clear 0.000000000, sequence: 0
')

I also compiled ntp new and configured it with "--enable-ATOM" (this option is enabled by default, but just to make sure).
The "new" ntp is also used
$this->bbcode_second_pass_code('', '
ntpd --version
ntpd 4.3.91@1.2483-o Sun Feb 7 10:48:07 UTC 2016 (2)
')

My ntp.conf is also just copied from my "old" rasbian
$this->bbcode_second_pass_code('', '
# coarse time ref-clock
server 127.127.28.0 minpoll 1 maxpoll 1 #prefer
fudge 127.127.28.0 time1 +0.00 flag1 1 refid GPS1 stratum 14

# Kernel-mode PPS ref-clock for the precise seconds
server 127.127.22.0 minpoll 3 maxpoll 3
fudge 127.127.22.0 flag3 1 refid GPS2
')

But GPS2 is not "used" by ntpd (I also tried flag3 0)
$this->bbcode_second_pass_code('', '
$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
-SHM(0) .GPS1. 14 l - 8 377 0.000 -92.913 2.506
*ptbtime1.ptb.de .PTB. 1 u 64 64 377 24.379 -1.751 1.144
+stratum2-3.NTP. 129.70.130.71 2 u 34 64 377 25.392 1.754 1.637
-towiski.de 122.227.206.195 3 u 25 64 377 32.485 3.031 1.629
+stratum2-3.NTP. 129.70.130.70 2 u 32 64 377 27.668 -0.181 1.871
-gn.webcache1.fu 131.188.3.221 2 u 38 64 377 34.297 -3.959 0.951
')


The problem may be related to the kernel PPS, because if I run gpsd manual,
I see the following line (which is not showed on my raspbian):
gpsd:WARN: KPPS:/dev/ttyAMA0 kernel PPS unavailable, PPS accuracy will suffer
$this->bbcode_second_pass_code('', '
$ sudo gpsd -b -N -D 3 -n -F /var/run/gpsd.sock /dev/ttyAMA0 [sudo] Passwort für henning:
gpsd:INFO: launching (Version 3.16)
gpsd:INFO: listening on port gpsd
gpsd:INFO: stashing device /dev/ttyAMA0 at slot 0
gpsd:INFO: opening read-only GPS data source type 2 and at '/dev/ttyAMA0'
gpsd:INFO: speed 9600, 8N1
gpsd:INFO: gpsd_activate(2): activated GPS (fd 7)
gpsd:WARN: KPPS:/dev/ttyAMA0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:INFO: PPS:/dev/ttyAMA0 ntpshm_link_activate: 1
gpsd:INFO: device /dev/ttyAMA0 activated
gpsd:INFO: running with effective group ID 14
gpsd:INFO: running with effective user ID 99
[...]
')

Any Ideas?

Thanks
qupfer
qupfer
 
Posts: 5
Joined: Mon Feb 16, 2015 10:21 am

Re: Kernel PPS not avaliable

Postby WarheadsSE » Mon Feb 08, 2016 2:49 pm

/dev/ttyAMA0 is the primary serial console on the device is it not?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Kernel PPS not avaliable

Postby qupfer » Mon Feb 08, 2016 4:33 pm

No, its not. I disabled the serial console to make the gps module working.

$this->bbcode_second_pass_code('', '
$ cat /boot/cmdline.txt
root=/dev/mmcblk0p2 rw rootwait console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 elevator=noop
')

and i add to /boot/config.txt
$this->bbcode_second_pass_code('', '
dtoverlay=pps-gpio,gpiopin=25
')
qupfer
 
Posts: 5
Joined: Mon Feb 16, 2015 10:21 am

Re: Kernel PPS not avaliable

Postby WarheadsSE » Mon Feb 08, 2016 6:50 pm

Did you make sure to also disable the serial getting on ttyAMA0 ? Just to be dead sure?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Kernel PPS not avaliable

Postby qupfer » Mon Feb 08, 2016 9:50 pm

Can you tell me, how I can disable it? :oops:
qupfer
 
Posts: 5
Joined: Mon Feb 16, 2015 10:21 am

Re: Kernel PPS not avaliable

Postby WarheadsSE » Mon Feb 08, 2016 11:21 pm

See if serial-getty@ttyAMA0 is active., and disable as necessary. Also check the securetty setting.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Kernel PPS not avaliable

Postby qupfer » Tue Feb 09, 2016 7:00 am

thanks for your response, but I would say, its off :-D

$this->bbcode_second_pass_code('', '
$ sudo systemctl status serial-getty@ttyAMA0
● serial-getty@ttyAMA0.service - Serial Getty on ttyAMA0
Loaded: loaded (/usr/lib/systemd/system/serial-getty@.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:agetty(8)
man:systemd-getty-generator(8)
http://0pointer.de/blog/projects/serial-console.html
')

and securetty
$this->bbcode_second_pass_code('', '
# /etc/securetty
#

console
tty1
tty2
tty3
tty4
tty5
tty6
ttyS0
hvc0

# End of file
')
qupfer
 
Posts: 5
Joined: Mon Feb 16, 2015 10:21 am

Re: Kernel PPS not avaliable

Postby sdjf » Tue Feb 09, 2016 6:08 pm

The command you entered used /dev/ttyAMA0 as an argument, per your listing above, maybe it might help to enter the correct device name.

$this->bbcode_second_pass_quote('', '
') $ sudo gpsd -b -N -D 3 -n -F /var/run/gpsd.sock /dev/ttyAMA0 [sudo] Passwort für henning:


Shouldn't that be /dev/pps0?
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: Kernel PPS not avaliable

Postby qupfer » Tue Feb 09, 2016 7:43 pm

No, I'm pretty sure /dev/ttyAMA0 is correct. It works on Rasbian and also the guidelines I used say that:
https://github.com/mcauser/Raspberry-Pi ... GPS-NEO-6M (<-- its al my gps module)
http://www.satsignal.eu/ntp/Raspberry-P ... start.html
qupfer
 
Posts: 5
Joined: Mon Feb 16, 2015 10:21 am

Re: Kernel PPS not avaliable

Postby sdjf » Thu Feb 11, 2016 4:13 pm

I am wondering if your device might be getting seen by the system at boot as the wrong kind of device, and if a systemd rule might be needed to associate it with the right driver at boot time, or to prevent it from being seen as a serial device instead of what it needs to be seen as? lsusb -v might tell you what driver/module it is associated with, or something in /proc. Maybe it might not matter?
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm


Return to Broadcom

Who is online

Users browsing this forum: No registered users and 14 guests