Host Synchronization with PTP

It is required to run the IEEE-1588 Precision Time Protocol (PTP) service with distributed PolySync systems, specifically while performing Record or Replay functionalities.

Without the PTP service, hosts defined on the same network will have differing system times and PolySync data will not be aligned.

1. Start PTP services

To start PTP services an Ethernet interface must have already been designated. This was demonstrated in the distributed host set up. The developer must grant sudo level permission for the PolySync Manager to start PTP services:

$ sudo -E /usr/local/polysync/bin/polysync-core-manager -p

It is advised to leave PolySync PTP services running at all times. However, if necessary the PTP service can be stopped with the PolySync Manager as well:

$ sudo -E /usr/local/polysync/bin/polysync-core-manager -l

2. Start PTP services during host start-Up

To start PTP services during the host start-up (boot) routine, users can follow these steps:

  1. Create a bash script file located in /etc/init.d/ named psync-startup.sh, then copy the following lines:

    #!/bin/bash
    # source the environment
    . /usr/local/polysync/utils/set_env.sh
    # start PolySync PTP services, called as sudo during ECU booting
    /usr/local/polysync/bin/polysync-core-manager -p
    
  2. Make the script executable:

    $ chmod +x /etc/init.d/psync-startup.sh
    
  3. Create a symbolic link to the appropriate runtime level (user runtime level) in which to execute the script:

    $ sudo ln -s /etc/init.d/psync-startup.sh /etc/rc4.d/S30psync-startup.sh