Awasu » Setting the current time on a Banana Pi without an internet connection
Sunday 4th October 2015 6:42 PM []

One minor problem the bPi has is that it doesn't have a battery-backed clock, which means that if you turn it off, it will have no idea what time it is when you turn it back on. Normally, we would fix this by configuring one or more NTP time servers that it could get the correct time from, but without an internet connection, this isn't going to work.

Setting up an NTP time server

So, we need to set up an NTP time server somewhere it will be accessible to the bPi[1]KANGA, in my home network.. Windows comes with a time server, but it doesn't work terribly well, so instead, we'll install the Meinberg NTP server.

Install it to run as a service using the SYSTEM account (this is apparently necessary on recent versions of Windows).

The Windows firewall[2]Run "Windows Firewall with Advanced Security", not the simple "Windows Firewall". needs to be configured to allow UDP packets in and out on port 123.

Windows also needs to be told to stop synchronizing time (otherwise it and Meinberg NTP will be fighting with each other over what time it is).

Configuring the Banana Pi for NTP

To configure the bPi to get the current time from our new NTP time server, edit /etc/ntp.conf and add the highlighted line:

To check what's happening[3]You may need to start the NTP service using sudo service ntp start. If so, you should also add this to /etc/rc.local, so that it will be done when the bPi boots.:

NTP is designed not to make sudden, large changes to the system time, so it might take a while for you see the effect it is having.
« Installing software on a Banana Pi without an internet connection

Tutorial index

Sending emails from a Banana Pi without an internet connection »

   [ + ]

1. KANGA, in my home network.
2. Run "Windows Firewall with Advanced Security", not the simple "Windows Firewall".
3. You may need to start the NTP service using sudo service ntp start. If so, you should also add this to /etc/rc.local, so that it will be done when the bPi boots.
Have your say