Raspberry Pi Date and Time

I’ve recently treated myself to a Raspberry Pi to see what all the fuss is about. On first glance, it looks like a cute little box that can do a lot of the stuff a big server can do – albeit without the power.

But for something simple, like a long-planned APRS digipeater, it looks like a viable platform.

One of the first things I discovered is the lack of an on-board hardware clock… which means using Network Time Protocol.  So here is my first Raspberry Pi tutorial… installation and configuration of an NTP server.

Installing NTP

Installing NTP is quite straightforward:

pi@ADB-raspberrypi ~ $ sudo apt-get install ntp

The default configuration is OK at this stage, and the service should auto-start. To check the status:

pi@ADB-raspberrypi ~ $ ntpq -p

which should reply with something like:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ns1.nexellent.n 194.242.34.149   2 u   11  128  377   26.191   -1.973   0.248
*time2.ethz.ch   .PPS.            1 u   48  128  377   24.004   -1.298   0.157
-ns2.telecom.lt  212.59.3.3       2 u   22  128  377   53.125    0.269   0.213
+ns0.luns.net.uk 157.44.176.4     2 u   16  128  377   15.010   -0.477   0.138

Coming next… interfacing a GPS to provide time-synchronisation and positional data.

About Andrew

This is my website...
This entry was posted in RaspberryPi and tagged NTP, RaspberryPi. Bookmark the permalink.