Giter VIP home page Giter VIP logo

pc-ptp-ntp-guide's People

Contributors

jclark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pc-ptp-ntp-guide's Issues

ts2phc configuration file should include pin_index

Why don’t you need to specify sdp?

cat /etc/linuxptp/ts2phc-generic.cfg

[global]
ts2phc.extts_polarity both
ts2phc.pulsewidth 100000000
leapfile /usr/share/zoneinfo/leap-seconds.list
step_threshold 0.1

ts2phc.nmea_serialport /dev/ttyS9

ts2phc.nmea_baudrate 9600

logging_level 7

[enp1s0]

Verify PPS on NIC

I got an Intel i225-T1 and soldered a header into the board for SDP1. How do I verify that the card is getting a PPS signal?

LinuxPTP as a grandmaster - typo?

Following your LinuxPTP as a grandmaster and I got stumped as to why the phc2sys service wasn't starting.

  1. Should say phc2sys.service (And in your manifest the file goes into the phc.service directory.)
  2. Should say phc2sys.sysconfig

PTP GM

1/2 way through instructions - No log message entries - Failed to parse timestamp

I have a GT-U7 connected to a RS-232 driver module however the GPS PPS signal is split for testing: one goes to the serial and another goes to SDP1 on the i225-LM.

root@ptp2server:/# dmesg | grep tty
[    0.195782] printk: console [tty0] enabled
[    1.375377] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    1.395456] 0000:00:03.3: ttyS1 at I/O 0xecd8 (irq = 17, base_baud = 115200) is a 16550A

Following the LinuxPTP as a Grandmaster, these are the configs I've attempted:

Refclock
OPTIONS="-f /etc/linuxptp/ts2phc.conf"

ts2phc service

[Unit]
Description=Synchronize PTP hardware clock from external timestamp
# -s generic uses system clock as source for ToD
# so we depend on time being in sync
# In order for this to have effect, you need to also enable chrony-wait.service (or something similar)
# Comment the next line out if you change to -s nmea below
##After=time-sync.target
# This is not ideal for -s nmea, but I'm not sure what's better.
After=network-online.target

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/ts2phc
EnvironmentFile=-/etc/default/ts2phc
# If you change this to -s nmea, then comment out the ordering after time-sync.target above.
##ExecStart=/usr/sbin/ts2phc -s generic $OPTIONS
ExecStart=/usr/sbin/ts2phc -s nmea $OPTIONS

[Install]
WantedBy=multi-user.target

ts2phc.conf

# Configuration file for ts2phc
# For more information about this file, see the ts2phc(8) man page.
[global]
ts2phc.extts_polarity both
ts2phc.pulsewidth 100000000
leapfile /usr/share/zoneinfo/leap-seconds.list
step_threshold 0.1

# these are only used with -s nmea, and are ignored with -s generic
###ts2phc.nmea_serialport /dev/ttyS0
ts2phc.nmea_serialport /dev/ttyS0
# This is only supported with Linux PTP 4.x
# ts2phc.nmea_baudrate 9600

# In LinuxPTP 3.x, you need logging_level to be 7 in order to get messages showing the PPS-PHC offsets.
# With LinuxPTP 4.x, you get these messages at log level 6 (which is the default).
logging_level 7

[enp1s0]

Verify Time Stamping

root@ptp2server:/# cat /sys/class/ptp/ptp0/fifo
0 1708394388 16169995

Last 30 seconds of log messages

root@ptp2server:/# journalctl -u ts2phc -S -30s
-- No entries --

Offsets

root@ptp2server:/# phc_ctl enp1s0 cmp
phc_ctl[22958.066]: offset from CLOCK_REALTIME is 1082449982ns

Halfway through the instructions and I'm stumped on "Last 30 seconds of log messages' because something I did must not be right:

root@ptp2server:/# systemctl restart ts2phc
root@ptp2server:/# journalctl -u ts2phc -S -30s
Feb 19 21:21:28 ptp2server systemd[1]: Started ts2phc.service - Synchronize PTP hardware clock from external timestamp.
Feb 19 21:21:28 ptp2server ts2phc[1035]: no slave clocks specified
Feb 19 21:21:28 ptp2server ts2phc[1035]: usage: ts2phc [options]
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -c [dev|name]  phc slave clock (like /dev/ptp0 or eth0)
Feb 19 21:21:28 ptp2server ts2phc[1035]:                 (may be specified multiple times)
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -f [file]      read configuration from 'file'
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -h             prints this message and exits
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -l [num]       set the logging level to 'num'
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -m             print messages to stdout
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -q             do not print messages to the syslog
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -s [dev|name]  source of the PPS signal
Feb 19 21:21:28 ptp2server ts2phc[1035]:                 may take any of the following forms:
Feb 19 21:21:28 ptp2server ts2phc[1035]:                     generic   - an external 1-PPS without ToD information
Feb 19 21:21:28 ptp2server ts2phc[1035]:                     /dev/ptp0 - a local PTP Hardware Clock (PHC)
Feb 19 21:21:28 ptp2server ts2phc[1035]:                     eth0      - a local PTP Hardware Clock (PHC)
Feb 19 21:21:28 ptp2server ts2phc[1035]:                     nmea      - a gps device connected by serial port or network
Feb 19 21:21:28 ptp2server ts2phc[1035]:  -v             prints the software version and exits
Feb 19 21:21:28 ptp2server systemd[1]: ts2phc.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 19 21:21:28 ptp2server systemd[1]: ts2phc.service: Failed with result 'exit-code'.
root@ptp2server:/# journalctl -u ts2phc -S /dev/ttyS0 -30s
Failed to parse timestamp: /dev/ttyS0
root@ptp2server:/# 
root@ptp2server:/# journalctl -u ts2phc -S /dev/ttyS1 -30s
Failed to parse timestamp: /dev/ttyS1
root@ptp2server:/# 
root@ptp2server:/# journalctl -u ts2phc -S /dev/ttyS1 -30s
Failed to parse timestamp: /dev/ttyS1
root@ptp2server:/# 
root@ptp2server:/# journalctl -u ts2phc -S nmea -30s
Failed to parse timestamp: nmea

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.