How to enable PTP Profiles on Ouster Sensor

This article provides instructions on setting the Precision Time Protocol (PTP) profile of the Ouster sensor to generalized PTP. gPTP is the common name for the IEEE standard 802.1AS-2011 which improves the interoperability of PTP by simplifying the supported options. The gPTP profile is useful when using the sensor with gPTP compatible hardware such as an Audio Visual Bridge (AVB), i.e. MOTU AVB.

PTP HTTP API

The PTP profile of the sensor is changed using an HTTP PUT request. This can be done using several different tools such as httpie, curl, Advanced REST Client, etc.

  • The request URL is: http://<sensor_hostname>/api/v1/time/ptp/profile/

  • Valid values are (““, are included):

    • ”default”

    • ”default-relaxed”

      • this profile will jump to the grandmaster time anytime the offset is greater than 1 sec.

    • “gptp”

    • ”gptp-relaxed”

      • this profile will jump to the grandmaster time anytime the offset is greater than 1 sec.

    • “automotive-slave”

Changing the PTP profile does not require reinitialization or writing the configuration text file to be persistent. It is persistent as soon a valid PUT request is executed and a valid response is received.

Enabling the “gptp” profile

Below are some examples using popular command-line tools.

Example using Httpie

  • Command

    • http PUT http://<sensor_hostname>/api/v1/time/ptp/profile <<< '"gptp"'

  • Response

    • HTTP/1.1 200 OK content-length: 9 content-type: application/json; charset=UTF-8 "gptp"

Example using cURL

  • Command

    • curl -X PUT -H "Content-Type: application/json" -d '"gptp"' http://<sensor_hostname>/api/v1/time/ptp/profile/

  • Response

    • "gptp"%

Enabling the “default” profile

Below are some examples using popular command-line tools.

Example using Httpie

  • Command

    • http PUT http://<sensor_hostname>/api/v1/time/ptp/profile <<< '"default"'

  • Response

    • HTTP/1.1 200 OK content-length: 9 content-type: application/json; charset=UTF-8 "default"

Example using cURL

  • Command

    • curl -X PUT -H "Content-Type: application/json" -d '"default"' http://<sensor_hostname>/api/v1/time/ptp/profile/

  • Response