Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
- Bu sahifa navigatsiya:
- Example configuration for GPSD to feed Chrony
PPS Support
Chrony supports various PPS types natively. It can use kernel PPS API as well as PTP hardware clock. Most general GPS receivers can be leveraged via GPSD. The latter (and potentially more) can be accessed via SHM or via a socket (recommended). All of the above can be used to augment chrony with additional high quality time sources for better accuracy, jitter, drift, longer-or-short term accuracy (Usually each kind of clock type is good at one of those, but non-perfect at the others). For more details on configuration see some of the external PPS/GPSD resource listed below. Note: at the release of 20.04 there was a bug which until fixed you might want to add this content to your /etc/apparmor.d/local/usr.sbin.gpsd. Example configuration for GPSD to feed Chrony For the setup you need $ sudo apt install gpsd chrony But you will want to test/debug your setup and especially the GPS reception, therefore also install $ sudo apt install pps−tools gpsd−clients GPS devices usually will communicate via serial interfaces, yet the most common type these days are USB GPS devices which have a serial converter behind USB. If you want to use this for PPS please be aware that the majority does not signal PPS via USB. Check the GPSD hardware list for details. The examples below were run with a Navisys GR701-W. 63 When plugging in such a device (or at boot time) dmesg should report serial connection of some sorts, example: [ 5 2 . 4 4 2 1 9 9 ] usb 1 −1.1: new f u l l −s p e e d USB d e v i c e number 3 u s i n g xhci_hcd [ 5 2 . 5 4 6 6 3 9 ] usb 1 −1.1: New USB d e v i c e found , idVendor =067b , i d P r o d u c t =2303 , bcdDevice= 4 . 0 0 [ 5 2 . 5 4 6 6 5 4 ] usb 1 −1.1: New USB d e v i c e s t r i n g s : Mfr=1, Product =2, SerialNumber=0 [ 5 2 . 5 4 6 6 6 5 ] usb 1 −1.1: Product : USB−S e r i a l C o n t r o l l e r D [ 5 2 . 5 4 6 6 7 5 ] usb 1 −1.1: Manufacturer : P r o l i f i c Technology I n c . [ 5 2 . 6 0 2 1 0 3 ] u s b c o r e : r e g i s t e r e d new i n t e r f a c e d r i v e r u s b s e r i a l _ g e n e r i c [ 5 2 . 6 0 2 2 4 4 ] u s b s e r i a l : USB S e r i a l s u p p o r t r e g i s t e r e d f o r g e n e r i c [ 5 2 . 6 0 9 4 7 1 ] u s b c o r e : r e g i s t e r e d new i n t e r f a c e d r i v e r p l 2 3 0 3 [ 5 2 . 6 0 9 5 0 3 ] u s b s e r i a l : USB S e r i a l s u p p o r t r e g i s t e r e d f o r p l 2 3 0 3 [ 5 2 . 6 0 9 5 6 4 ] p l 2 3 0 3 1 − 1 . 1 : 1 . 0 : p l 2 3 0 3 c o n v e r t e r d e t e c t e d [ 5 2 . 6 1 8 3 6 6 ] usb 1 −1.1: p l 2 3 0 3 c o n v e r t e r now a t t a c h e d t o ttyUSB0 We see above that it appeared as ttyUSB0. To later on have chrony accept being feeded time information by that we have to set it up in /etc/chrony/chrony.conf (Please replace USB0 to whatever applies to your setup): r e f c l o c k SHM 0 r e f i d GPS p r e c i s i o n 1 e−1 o f f s e t 0 . 9 9 9 9 d e l a y 0 . 2 r e f c l o c k SOCK / var / run / chrony . ttyUSB0 . s o c k r e f i d PPS Then restart chrony to make the socket available and waiting. sudo systemctl restart chrony Next one needs to tell gpsd which device to manager, therefore in /etc/default/gpsd we set: DEVICES=”/ dev/ttyUSB0” Furthermore the default use-case of gpsd is, well for gps position tracking. Therefore it will normally not consume any cpu since it is not running the service but waiting on a socket for clients. Furthermore the client will then tell gpsd what it requests and gpsd will only do that. For the use case of gpsd as PPS-providing- daemon you want to set the option to: • immediately start even without a client connected, this can be set in GPSD_OPTIONS of /etc/default /gpsd: Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling