5.2 KiB
5.2 KiB
Install
Hardware Needed
- Raspberry Pi of any type
- Timing Specific GPS Module U-BLOX ublox LEA-M8T-0-10 HUAWEI GPS Module
- High Precision RTC Module like Adafruit DS3231 Precision RTC Breakout
- CR1220 Battery for RTC
- Female to Female jumper/dupont wires
- Raspberry Pi Case that Exposes GPIO
- (GPS Antenna)[https://www.aliexpress.us/item/3256808971033962.html]
- (Cable for GPS Antenna)[https://www.amazon.com/Superbat-coaxial-Bulkhead-Adapter-Equipment/dp/B07FC8PVZS?th=1]
- (GPS Antenna Adaptor)[https://www.amazon.com/dp/B00CVR4NN0]
- UART
- Solder Supplies (maybe)
Configuring Hardware
- Install (u-center)[https://www.u-blox.com/en/product/u-center] NOT u-center 2
- Wire UART of GPS Module to your UART
- Change baudrate to 115200
- enable timing mode?
- change cable delay to calculated value
Wiring Everything Up
GPS Module
- GPS GND to RPi Physical Pin 6 (GND)
- GPS RX to RPi Physical Pin 8 (GPIO 14 / TX (UART))
- GPS TX to RPi Physical Pin 10 (GPIO 15 / RX (UART))
- GPS PPS to RPi Physical Pin 12 (GPIO 18)
- GPS VIN to RPi Physical Pin 27 (3.3 volts)
RTC Module
- RTC GND to Rpi Physical Pin 9 (GND)
- RTC SDA to RPi Physical Pin 3 (GPIO 2 / SDA1 (I2C))
- RTC SCL to RPi Physical Pin 5 (GPIO 4 / SCL1 (I2C))
- RTC VCC to RPi Physical Pin 1 (3.3 volts)
Setup Pi
Microsd Card
- Install Raspberry Pi Imager on your PC
- Insert Microsd card to your PC
- Run Raspberry Pi Imager
- Choose Device (your Raspberry Pi Type)
- Choose OS->Raspberry Pi OS (other)->Raspberry Pi OS Lite (64-bit)
- Choose Storage (your Microsd card)
- Configure settings as you like them
- Burn
Login to Raspberry Pi
curl -s https://raw.githubusercontent.com/PrincessPi3/Precision-Timekeeping-Fuckery/refs/heads/main/installer_auto.sh?nocache=$RANDOM | $SHELLcd ~/Precision-Timekeeping-Fuckery && git pull; bash installer1.sh(will reboot)cd ~/Precision-Timekeeping-Fuckery && git pull; bash installer2.sh(will reboot)cd ~/Precision-Timekeeping-Fuckery && git pull; bash installer3.sh(will reboot)cd ~/Precision-Timekeeping-Fuckery && git pull; bash installer4.sh(will reboot)curl -s https://gitlab.com/princesspi/general-scripts-and-system-ssssssetup/-/raw/master/customscripts/install_script.sh?nocache=$RANDOM | sudo $SHELLexec $SHELLconfigure_webhook.shsudo reboot- Grafana
- open grafana web interface in a browser:
http://<ip>:3000 - username
adminpasswordadmin - set new password
- Dashboards->Import
- Upload Garfana-Visualization.json
- edit each graph and just save
- open grafana web interface in a browser:
- After 24 Hours
cd ~/Precision-Timekeeping-Fuckerybash services.sh stopbash nuke_logs.shbash reconfig_full.sh ./running-warn-level-confsudo reboot
Scripts
uninstall.shuninstalls everythingchrony_statistics.shuses the python script chrony_statistics.py and feeds it copies of tracking statistics to calculate offset *cleanup.shremove old filesdump_configs.shmake a backup of all configsfull_status.shshow status of all of the componants of Precision-Timekeeping-Fuckery one by oneinstaller_auto.shscript to initialize the install, it is run first- usage:
curl -s https://raw.githubusercontent.com/PrincessPi3/Precision-Timekeeping-Fuckery/refs/heads/main/installer_auto.sh?nocache=$RANDOM | $SHELL
- usage:
installer1.shfirst manual installer script. runs rpi-config and optionall rpi-updateinstaller2.shsecond manual installer script. performs a dist-upgrade and an autoremoveinstaller3.shthird manual installer script. adds grafana and telegram repos, uninstalls and disables unneeded junk, installs packages, adds pps-gpio to /etc/modules if not there, autoremove, gives users the right groupsinstaller4.shfinal manual installer script. runsreconfig_full.shand enables the services on bootnuke_logs.shdoes just what it says on the tinreconfig_full.shreconfigures services in one of the directories- usage:
bash reconfig_full.sh <config_directory>
- usage:
services.shruns an operation on all of the relevant services- usage:
bash services.sh [start|status|stop|restart|reload|enable|disable]
- usage:
show_running_configs.shshows the current config files, one by onecable-delay-calc.xlsxspreadsheet to estimate cable delay in ns
Files
status.txtthis shows the progress of an ongoing install, it is automatically created at the start and deleted at the endCHANGEOG.txtthis is all the latest changesversion.txtversion of Precision-Timekeeping-Fuckery
Logs
Chrony Logs
sudo tail -f /var/log/chrony/tracking.logsudo tail -f /var/log/chrony/statistics.logsudo tail -f /var/log/chrony/measurements.log
Telegraf Logs
sudo tail -f /var/log/telegraf/telegraf.log
Grafana Logs
sudo tail -f /var/log/grafana/grafana.log
Influxdb Logs
sudo tail -f /var/log/syslog
Root Crontab Logs
sudo tail -f /var/log/root-crontab.log