Scenario:
I have two Raspberry Pi 4 (4GB) running PiHole and Unbound to provide DNS services to my home network (about 70 clients on Unifi based gear). I recently decided to block all internet access to my IP Cameras due to security concerns therefore I needed to provide an internal time server so the cameras would be able to get their time updates.
Hardware/Software:
Raspberry Pi 4 - 4GB
DS3231SN RTC
Argon One case
POE Splitter to power the system
Raspbian Buster lite
Pi Hole w/ Unbound
What I did and/or tried:
I purchased the smallest RTCs I could find due to the need to fit them inside the Argon One case. I love this case so I was determined to make it work. I will attach pictures of the RTC mod along with my Arduino based mod that automatically powers on my Raspberry Pi after a power outage since this case requires the user to press the power button to do so. Given this system is acting as my DNS, I cannot afford for it to stay off after a power outage, shutdown, switch reboot, etc.
Pi Hole and Unbound were easy to install and everything is working fine. My issues started with the software needed to do the following:
1) Sync the RTC with a remote time server (NA NPS Pool)
2) Sync the RPI clock with the RTC
3) Respond to time requests from devices on my network
At first I got it working using NTPD but then I read that it was no longer the recommended software on Buster therefore I set out to figure out how. One of the posts with this theme is:
https://www.raspberrypi.org/forums/view ... p?t=178763
The issue is I can't get it to work. It would seem that the new method is only for those trying to setup a time client and not a time client AND server. If what I read most recently is true, I should actually stick with NTPD to accomplish what I want.
What I find incredibly frustrating about the Linux world is this constant churn of how things should be done. Instead of the same tool evolving, it appears the tool gets dumped in favour of the next big thing so I have to start from scratch each time.
I would appreciate it if someone can tell me how this should be done, but please keep in mind that I want to adopt the latest and greatest method to do so and not try to make something on its way out work. If NTPD is still the only and best way to do it, then I will stick with that... at least I got that to work once before.
*******************************************************************
STEPS (WILL UPDATE THEM AS I FIGURE THEM OUT)
*******************************************************************
1) Install DS3231 RTC on RPI board
2) Enable I2C using raspi-config
3) Install python-smbus and i2c-tools (I believe this enables you to check whether the RTC is working on the I2C bus)
Code: Select all
sudo apt-get install python-smbus i2c-toolsCode: Select all
sudo i2cdetect -y 14) Add kernel driver for DS3231 in /boot/config.txt by adding this line:
Code: Select all
dtoverlay=i2c-rtc,ds32315) Edit /etc/ntp.conf to list your preferred NTP servers
Default Servers commented out:
Code: Select all
# pool 0.debian.pool.ntp.org iburst
# pool 1.debian.pool.ntp.org iburst
# pool 2.debian.pool.ntp.org iburst
# pool 3.debian.pool.ntp.org iburst
Code: Select all
pool 0.north-america.pool.ntp.org iburst
pool 1.north-america.pool.ntp.org iburst
pool 2.north-america.pool.ntp.org iburst
pool 3.north-america.pool.ntp.org iburst
Code: Select all
sudo systemctl enable ntp.service