asi card.md

ASI Card Configuration Tool

Installation & Usage

The configuration tool is installed as part of the cRPM ASI driver installation. It is available from the following location on the M1 or G8 platform:

/opt/mediakind/utility/bin/asi_config/

To get help on the command line options, add -h to the command line.

Example: ./asi_config -h or ./asi_config set connector -h

By default, the ASI configuration tool connects to the Multiplexer ASI API on the machine where the tool is running, i.e., localhost.

To tell the tool to connect to a different server, use the --host optional command line argument: Example: ./asi_config --host <controller_vip>

For commands that produce output, you can use the optional argument --json to request that the output is rendered in as a JSON document. This can be useful if the content is used for further processing.

Known Server Types & Aliases

Many of the commands require the user to identify a specific card for the ASI API.

To simplify this for the users, the tool allows server definition files to be created, in which one or more aliases can be associated with a pre-defined PCI bus number/slot number pair.

If you provide your own servers, you can create your own server definition files by using the existing ones (for example: m1.json) as templates.

Server Type Description File Definition

Each server description file is a JSON document and is composed of an array of objects, one for each board location.

Each board entry in the array has three properties: pciBusNumber, pciSlotNumber and aliases.

To help with identifying bus numbers and device slots in usage, you can use the lspci command. This provides the location of every PCI device in the format [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]. The domain is optional, or only shown if various domains are present.

Info: All values are hexadecimal.

Here is an example output of the lspci command for an M1 with 2 Dektec cards, on bus 01 and 02:

[root@m1-225 asi_config]# lspci | grep DekTec
01:00.0 Non-VGA unclassified device: DekTec Digital Video B.V. Device 0882
02:00.0 Non-VGA unclassified device: DekTec Digital Video B.V. Device b87e

Commands

get servers

Displays a list of the ASI servers configured for the system.

Example of usage:

[root@m1-227 asi_config]# ./asi_config get servers
m1-217
m1-227

Gets the configured ASI servers for localhost.

get connectors

Displays a list of the configured connectors.

Required arguments in order:

asi_server_name: The name of the ASI server to show ASI information for.

Optional arguments:

Example of usage:

Example with output:

[root@m1-227 asi_config]# ./asi_config get connectors m1-227
Server: m1-227

REST ID | Direction | PCI Bus No. | PCI Slot No. | Connector | Interface | Multicast      | Port | Input Packet Length | Alias
================================================================================================================================
1        |   input   |      1      |      0       |     1     |    lo     |  239.123.1.1   | 1234 |        auto         |
2        |   input   |      1      |      0       |     2     |    lo     |  239.123.1.2   | 1234 |        auto         |
3        |   input   |      1      |      0       |     3     |    lo     |  239.123.1.3   | 1234 |        auto         |
4        |   input   |      1      |      0       |     4     |    lo     |  239.123.1.4   | 1234 |        auto         |

remove server

Removes all the connectors associated with the specified server.

Example of usage:

remove connector

Removes a single connector.

Required arguments in order:

  1. asi_server_name: The name of the ASI server to update.
  2. server_type_or_pci_bus_number: The type of server when using an alias or the actual PCI bus number (int) of the board being removed.
  3. alias_or_slot_number: The alias for the board or the actual slot number (int) for the board.
  4. connector: The physical connector index (1 based) on the board.

Example of usage:

remove api-connector

Removes a single connector identified by its API number (REST ID in the table from get connectors).

Required arguments in order:

  1. asi_server_name: The name of the ASI server to update.
  2. api_connector: The API connector number associated with the connector to remove. This is the value that is set in Multiplexer configurations.

Example of usage:

set connector

Sets the properties for a connector. Connectors can be identified via the board and index.

Required arguments in order:

  1. server: The name of the ASI server to update.
  2. server_type_or_pci_bus_number: The type of server when using an alias or the actual PCI bus number (int) of the board being removed.
  3. alias_or_slot_number: The alias for the board or the actual slot number (int) for the board.
  4. connector: The physical connector index (1 based) on the board.

After these arguments, you must specify either input or output.

input

Sets the connector as an ASI input.

Optional arguments:

Example of usage:

[root@m1-227 asi_config]# ./asi_config set connector m1-227 1 0 1 input --interface lo --multicast udp://239.123.1.1:1234 -ipl 204
 REST ID | Direction | PCI Bus No. | PCI Slot No. | Connector | Interface | Multicast      | Port | Input Packet Length | Alias
================================================================================================================================
1        |   input   |      1      |      0       |     1     |    lo     |  239.123.1.1   | 1234 |         204         |

Configures the API connector with the ID of 1 to be an input and have the multicast and port values. Additionally, it configures the input packet length to be 204 bytes. Please note that supported Dektec cards always operate in auto mode. Output packet length can be configured in the Multiplexer output settings.

output

Sets the connector as an ASI output.

Optional arguments:

Example of usage:

[root@m1-227 asi_config]# ./asi_config set connector m1-227 1 0 1 output
 REST ID | Direction | PCI Bus No. | PCI Slot No. | Connector | Interface | Multicast      | Port | Input Packet Length | Alias
================================================================================================================================
1        |  output   |      1      |      0       |     1     |    lo     |  239.123.1.1   | 1234 |         204         |

Configures the API connector with the ID of 1 to be an output.

Interface, Multicast, Port and Input Packet Length values in the table do not apply to output connectors.

set api-connector

Changes an existing connector using its REST ID.

Required arguments in order:

  1. asi_server_name: The name of the ASI server to update.
  2. api_connector: The API connector number associated with the connector. This is the value that is set in Multiplexer configurations.

After these arguments, you must specify either input or output. The same optional arguments as in set connector are supported.

Example of usage:

[root@m1-227 asi_config]# ./asi_config set api-connector m1-227 1 input --multicast udp://239.123.1.6:1234 -ipl auto
 REST ID | Direction | PCI Bus No. | PCI Slot No. | Connector | Interface | Multicast      | Port | Input Packet Length | Alias
================================================================================================================================
1        |   input   |     -1      |      -1      |     1     |    lo     |  239.123.1.6   | 1234 |        auto         |

export

Exports the current configuration to a file.

Required arguments in order:

Optional arguments:

Example of usage:

import

Imports the ASI configuration from a file.

Required arguments in order:

Optional arguments:

Example of usage: