On 8/19/2011 12:23, Ken Hornstein wrote:
I'm running NetBSD-current (downloaded about a week ago) so 5.1. The pps-api test code actually works: # ./pps-api /dev/pps1 0.000000000 0.000000000 0 0 0.000000000 1313779702.115506089 0.000000000 1 0 -1313779702.115506172Hrm. Maybe you could run "ktrace" on both the pps-api program and ntpd and see if they're using the same system calls to enable the PPS signal? It's probably some ioctl so you won't be able to see the exact arguments. --Ken
It looks like I can see the ioctl parameters and there is a slight difference between pps-api and ntpd.
I'll post those here soon but I may need to migrate the questions over to ntpd's mailing list and see if they have an answer. No matter what set of configurations I try I can't seem to get any form of PPS into ntpd.
At this point it could be that I did not say the right magic incantation during compile time (either for the kernel or ntpd), I haven't flipped the right flags in ntp.conf, and/or there is a fundamental problem in ntpd on NetBSD.
The two test programs show that at least modem signals are working, specifically the DCD input which was one of my first concerns. I had tried OpenBSD first a couple years ago but their kernel lacked all support for modem signals on the serial ports. I'm happy that NetBSD worked. In fact the install was mostly painless (minus the crazy key polling/interrupt issue which gave me fits with the menu installer). The compile of the kernel went smoothly, too. OpenBSD's kernel took me five days to compile because it would randomly crash in the middle. This same machine compiled the NetBSD kernel in about six hours without complaint.