Avnu / gptp

BSD 3-Clause "New" or "Revised" License
97 stars 58 forks source link

.. image:: https://api.travis-ci.org/AVnu/gptp.svg?branch=master :target: https://travis-ci.org/AVnu/gptp

Introduction

This is an example Intel provided gptp daemon which can be used on Linux and Windows platforms. There are a number of other ptp daemons available for Linux which can be used to establish clock synchronization, although not all may export the required APIs needed for an AVB system.

The daemon communicates with other processes through a named pipe. The pipe name and message format is defined in ipcdef.hpp. The pipe name is "gptp-update". A Windows example is in the project named_pipe_test.

The message format is:

Integer64   <master-local phase offset>

Integer64   <local-system phase offset>

Float   <master-local frequency offset>

Float   <local-system frequency offset>

UInteger64  <local time of last update>

Meaning of IPC provided values ++++++++++++++++++++++++++++++

Linux Specific ++++++++++++++

Requirements for documentation on a ubuntu based system:

To build, execute the linux/build makefile.

To build for I210:

ARCH=I210 make clean all

To build for 'generic' Linux:

make clean all

To build for Intel CE 5100 Platforms:

ARCH=IntelCE make clean all

To execute, run ./daemon_cl such as ./daemon_cl eth0

The daemon creates a shared memory segment with the 'ptp' group. Some distributions may not have this group installed. The IPC interface will not available unless the 'ptp' group is available.

Windows Specific ++++++++++++++++

Registry Changes

Build Dependencies

The following environment variables must be defined:

To run from the command line:

daemon_cl.exe xx-xx-xx-xx-xx-xx

where xx-xx-xx-xx-xx-xx is the mac address of the local interface

Windows Wireless Specific +++++++++++++++++++++++++

Additional Driver/Hardware Requirements:

The wireless software can be downloaded from:

https://downloadcenter.intel.com/ (Search)

Running the daemon:

Currently, the driver only works with peer-to-peer wireless connections. The connection must be established prior to running the daemon.

./gptp.exe -w

Other limitations:

Some versions of Windows(R) 10 do not allow WinPcap(R) to inject frames and the BMCA algorithm can't complete. The result is both peers assume the master role. To fix this, force one peer to be slave with the following command line:

./gptp.exe -w -R 255

Other Available PTP Daemons

There are a number of existing ptp daemon projects. Some of the other known ptp daemons are listed below. Intel has not tested Open AVB with the following ptp daemons.