## Limitations and considerations for ST2110 and PTP

Observe the following limits when preparing an ST 2110 source:

- ST 2110 streams are carried over RTP. RTP header extension is not supported and should be turned off on the source, as described in [RFC 3550, section 5.3.1](https://datatracker.ietf.org/doc/html/rfc3550#section-5.3.1).

- PTP domain of value 0 is the only domain supported. A workaround is to manually set the value in a file.

- ST 2110 support is limited to HD resolutions.

## Configure SDP files on CE1

ST 2110 can be configured using SDP files on the **Input** tab of the Live Encoder component (see [Configure an SMPTE ST 2110 input](/traditional-products-and-appliances/products/ce1/configure-feed-components/live-encoder#smpte-st-2110-input)).

The SDP files can be entered either as:

- A URL where the SDP files can be retrieved from.
- A path to the location of the file stored on the server:
  - On the host, the SDP file(s) need to be in the `/var/appliance/assets` directory.
  - When configuring the Encode service, use this directory to specify the SDP file location.

SDP files can be transferred to the server either by SSH or by uploading via the UI.

If the Asset Management feature is enabled, follow these steps:

1. Navigate to the **Asset Management** > **Assets** page.

2. Click **Add** to add a new asset.

3. Select the SDP file, then check the **Protect the Asset when it is uploaded** checkbox.

4. Click **Start Upload** to upload it.

If the Asset Management feature is not enabled, follow these steps:

1. Copy the files to the server via SCP. In MobaXterm, replace `<SSH_USER>` and `<CE1_ADDRESS>` with your SSH account and the address of your unit:

   ```bash
   scp /cygdrive/c/sdp-2110-20.sdp <SSH_USER>@<CE1_ADDRESS>:/tmp
   ```

2. Connect to the unit via SSH and copy the files to `/var/appliance/assets`:

   ```bash
   sudo mv /tmp/sdp-2110-20.sdp /var/appliance/assets
   ```

After copying over the SDP file, configure it on the Encode service user interface using the following path: `/var/appliance/assets/sdp-2110-20.sdp`

## Setup the PTP for ST 2110

<blockquote data-callout="note"><strong>Note</strong><p>PTP is required for ST 2110 operation.</p></blockquote>

To configure PTP, follow these steps:

### Disable chronyd

1. SSH onto the unit.

2. Run the following commands:

   ```bash
   sudo systemctl stop chronyd
   sudo systemctl disable chronyd
   ```

### Disable NTPD in case it was enabled

```bash
sudo systemctl disable ntpd.service
sudo systemctl stop ntpd.service
```

### Stop PTP service, in case it is running

```bash
sudo systemctl stop ptp4l.service
```

### Set the interface

1. Edit the config file:

   ```bash
   sudo vi /etc/ptp4l.conf
   ```

2. Go to the last line of the file (shift G).

3. **To configure a single port for PTP**, change eth0 to the required interface.\
   For example to change eth0 to eth3, ensure you are on the line and type `f0r3` to replace `0` by `3`. The last line of `/etc/ptp4l.conf` will look like:

   ```bash
   [eth3]
   ```

4. **To configure two PTP ports**, please amend the previous step so the last two lines of the `/etc/ptp4l.conf` file shows the two ports as followed:

   In the example below, 2 x PTP are received, one in port eth2 and one in port eth3.

   ```bash
   [eth2]
   boundary_clock_jbod 1
   [eth3]
   boundary_clock_jbod 1
   ```

5. Save the file (for example by using the command `ZZ`).

### Set the PTP domain

In some cases, the PTP domain is not zero and needs to be amended manually:

- The PTP domain is specified in the last number in the `ts-refclk:ptp` setting of an SDP file (`127` in the example below, where `<CLOCK_ID>` is the clock identity):

  ```bash
  a=ts-refclk:ptp=IEEE1588-2008:<CLOCK_ID>:127
  ```

- The PTP domain is configured in the following systemd services:
  - **ptp4l**: systemd service that implements the PTP clock.
  - **phc2sys**: systemd service that synchronizes the system clock to the PTP clock.

1. In the `ptp4l` configuration file, `/etc/ptp4l.conf`, configure the `domainNumber` parameter in the global section:

   ```bash
   [global]
   :
   domainNumber 127
   :
   ```

2. In the `phc2sys` configuration file,`/etc/sysconfig/phc2sys`, configure the `-n` option:

   ```bash
   sudo vi /etc/sysconfig/phc2sys
   # -a -r syncrhonise to ptp4l
   # -l log level (max 6)
   # -n domain number (default 0)
   # The front panel controls this file so be careful if manually changing it
   OPTIONS="-a -r -l 5 -n 127 -E linreg"
   ```

### Start PTP services

```bash
sudo systemctl start ptp4l.service
sudo systemctl start phc2sys.service
```

### Make change persist over reboots (but not software upgrades)

```bash
sudo systemctl enable ptp4l.service
sudo systemctl enable phc2sys.service
```

### Check services are running (loaded and active)

- **systemctl status ptp4l.service**

  ```bash
  ptp4l.service - Precision Time Protocol (PTP) service
  Loaded: loaded (/usr/lib/systemd/system/ptp4l.service; enabled;
  vendor preset: disabled)
  Active: active (running) since
  ```

- **systemctl status phc2sys.service**

  ```bash
  phc2sys.service - Synchronize system clock or PTP hardware clock (PHC)
  Loaded: loaded (/usr/lib/systemd/system/phc2sys.service; enabled;
  vendor preset: disabled)
  Active: active (running) since
  ```

### Check grand master

Confirm that `gmPresent` is `true`.

In the example below, PTP domain 0 is used (`-d 0`): modify the “`-d`” option to specify a different PTP domain.

```bash
sudo pmc -u -b 0 -d 0 'GET TIME_STATUS_NP'
sending: GET TIME_STATUS_NP
  <LOCAL_CLOCK_ID>-0 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP
         master_offset 13
         ingress_time 1620380188201784144
         cumulativeScaledRateOffset +0.000000000
         scaledLastGmPhaseChange 0
         gmTimeBaseIndicator 0 lastGmPhaseChange 0x0000'0000000000000000.0000
gmPresent true
         gmIdentity <GRANDMASTER_ID>
```
