r11 - 2008-03-27 - 04:24:29 - SteveKosteckeYou are here: NTP >  Support Web > ConfiguringNTP > ConfiguringRefclocks > ConfiguringHPZ3801ARefclocks
NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

ntp-4.2.8p15 was released on 23 June 2020. It addresses 1 medium-severity security issue in ntpd, and provides 13 non-security bugfixes over 4.2.8p13.

Please see the NTP Security Notice for vulnerability and mitigation details.

Are you using Autokey in production? If so, please contact Harlan - he's got some questions for you.
REFACTOR See ConfiguringHPZ3801ARefclocksDev for discussion of this topic.

6.1.6. Configuring HP Z3801A Refclocks

The HP Z3801A is popular with hams. They also make great reference clocks for NTP. A large number of them were available surplus from the cell phone industry. The supply seems to have dried up in 2006. $400 was the ballpark price on EBay. (Round up for antenna and power supply.)

There are three parts to setting up a Z3801A: Hardware, Firmware, and the NTP config file.


The stock HP Z3801A uses RS-422. Your system probably has a RS-232 port. There are a couple of web sites describing how to patch it. It's reasonably simple if you are comfortable soldering SMT resistors.

Here is a good web page with lots of background info. https://www.realhamradio.com/GPS_Frequency_Standard.htm It doesn't include the PPS fixes. Here is another web page with lots of pictures so you can see what you are getting into: https://www.ad6a.com/Z3801A.html More info here: https://www.febo.com/time-freq/gps/z3801a/mods/index.html

Jeff Mock worked out the Z3801AReceiverModifications for PPS.

You don't need the jumpers. Just put 3 of the 0-ohm resistors that you removed back on the other set of nearby empty pads. They should be easy to find. You can check with an ohm-meter.

I used pin 10 rather than pin 8 for the PPS signal on DCD so I didn't have to cut any traces. (I was making my own DB-25 to DB-9 cable anyway.)

It also needs 48V power and a GPS antenna.


You need to setup a few parameters in the firmware. The details are all in users manual. You also need to do a Survey. That lets it run for a while in a special mode to figure out where it is. After that, normal operation uses the location to get better timing accuracy.

Here is my memory jogger:

:ptime:tcode:format F2     # Set Time format to T2
:diag:gps:utc 1            # Set to UTC mode
:GPS:POS:SURV ONCE         # Start survey.  Takes several hours.


You setup two refclocks, one for the serial port and another for the PPS signal. You can use separate device numbers, but it's probably simpler to use the same for both drivers.

You need links from /dev/hpgpsN to /dev/wherever and /dev/ppsN to /dev/wherever NB: Modern systems start with an empty /dev so you will have to recreate the links in your startup scripts, and do that before NTP gets started.

server 127.127.26.N mode 1 prefer      # Mode 1 for Z3801A, /dev/hpgpsN
fudge  127.127.26.N time1 -0.9674      # tweak this by trial and error
server 127.127.22.N                    # PPS driver: /dev/ppsN
fudge  127.127.22.N flag2 1            # falling edge

# needed for jittery prefer PPS reference
tos mindist 0.010

Synchronization hopping:

The serial port on the Z3801A jitters enough to confuse NTP. If you see things like this in your log file, you need to add the mindist line to your conf file.

10 Sep 15:11:41 ntpd[42461]: synchronized to PPS(0), stratum 0
10 Sep 15:13:51 ntpd[42461]: synchronized to GPS_HP(0), stratum 0
10 Sep 15:14:54 ntpd[42461]: synchronized to PPS(0), stratum 0
10 Sep 15:15:58 ntpd[42461]: synchronized to GPS_HP(0), stratum 0
10 Sep 15:17:03 ntpd[42461]: synchronized to PPS(0), stratum 0
10 Sep 15:19:10 ntpd[42461]: synchronized to GPS_HP(0), stratum 0

Related Topics: HpZ3801ARefclockUsers

Topic attachments
I Attachment Action Size Date Who Comment
htmlhtm z3801a.htm manage 9.5 K 2006-03-27 - 08:54 HalMurray  
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r11 < r10 < r9 < r8 < r7 | More topic actions
SSL security by CAcert
Get the CAcert Root Certificate
This site is powered by the TWiki collaboration platform
IPv6 Ready
Copyright & 1999-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding the site? Send feedback