Serial Command Injection for Lightware Fiber

Lightware Command Injection
Serial Command Injection for Lightware Fiber Extenders
with MX Series Matrix Frames
Introduction
Serial commands can be injected from the matrix router frame into the serial port of attached Fiber
extenders that have serial ports. This reduces the need to separately extend serial ports to attached
sources or destinations. Responses from the attached serial device are returned to the external
control system.
Supported extenders include the following fiber extenders: HDMI-OPT-TX100R / RX100R, HDMI-OPTTX200R / RX200R, HDMI-3D-OPT-RX150RA.
Supported input and output boards include: the MX-HDMI-OPT-IB series, and the MX-HDMI-OPT-OB
series.
There is a maximum amount of data that can be sent or recived at a given time. Fiber Extenders can
send 64 bytes and receive 64 bytes of data to/from the serial ports. Due to this, the command
injection system is designed for short control messages only, not for transferring files or performing
firmware upgrades via serial. Heavy traffic on this interface should be avoided. If any data returned
from an attached serial device is over 64 bytes and is sent without at least a 100ms break for each 64
bytes, data could be lost.
Baud rates can be set individually for each port, and can be different on each port.
For the HDMI-OPT-TX100R / TX200R, the baud rate is set by a rotary switch on the TX unit. For all
other devices, the baud rate is set via the matrix frame, either from the control software or by using
the SERIAL command. This is explained in the last section of this guide - Page 4.
1
Lightware Command Injection
Sending data from the matrix frame to the extender
Data can be sent from the matrix frame to the serial port on a supported extender as ASCII or Binary.
ASCII:
The format for sending command injection with ASCII text is:
{:S#X@SY=[ASCII text up to 64 characters]}
Where:
X = the port number
Y = "I" for an input port, "O" for an output port
The ASCII text section can contain any character except "{" and "}", as these characters are used to frame the
commands in the Lightware control protocol. If you need to use these characters, use the HEX values: 7B for "{"
and 7D for "}".
The text also suports escape sequences:




\r
\n
\t
\x[hex code]
Examples:
To send "power on" to Output port #1:
To send "power off" to Input port #3 with Carriage Return:
{:S#1@SO=power on}
{:S#3@SI=power off\r\n}
Binary:
The format for sending command injection with Binary Data is:
{:B#X@SY=[HEX string up to 128 characters]}
Where:
X = the port number
Y = "I" for an input port, "O" for an output port
Each 2 characters represents a hexadecimal code. Since the maximum length of the transmitted data is 64
characters, the maximum length of the hex string in the command is 128 characters.
Examples:
To send the binary "736f6d" to Output port #5:
To send the binary "736f6d" to Output port #5 with carriage return:
{:B#5@SO=736f6d}
{:B#5@SO=736f6dcr}
2
Lightware Command Injection
Receiving data from the extender via the matrix frame
Each port must be configured to receive data as ASCII or BINARY. This can be done from the control software or
via the SERIAL command. All ports default as ASCII. Instructions on this setting are found on page 4.
When the device attached to the extender's serial port sends data, it is transmitted to the matrix frame, and the
matrix frame will send a message to the external controller in the following format:
ASCII:
(S#XY=[Received text]}
Where:
X = "I" for an input port, "O" for an output port
Y = the port number
Examples:
"Powered On" is received from Output port #1:
"Powered Off" is received from Input port #3:
(S#O1=Powered On)
(S#I3=Powered Off)
Notes:
The maximum length of received data is 64 bytes.
The characters "(" and ")" are used as frame delimiters in responses, and cannot be inside a message. All "("
characters will be replaced with \x28, and all ")" characters will be replaced with \x29.
The character "\" will be replaced by "\\".
Binary:
(B#XY=[Received text as binary data]}
Where:
X = "I" for an input port, "O" for an output port
Y = the port number
Examples:
"Powered On" is received from Output port #1:
"Powered Off" is received from Input port #3:
(B#O1=706F7765726564206F6E)
(B#I3=706F7765726564206F6666)
3
Lightware Command Injection
Setting the serial port to ASCII or BINARY,
and Baud Rates
Each output port on the matrix can be independently set regarding the Baud Rate. Input Ports have the baud rate
set using rotary switches on the attached TX unit. Serial data can be set to be ASCII or Binary. This can be done
with the Device Controller software, or by using the SERIAL command.
Using the Device Control Software:
While connected to the Matrix frame with the Lightware Device Controller software, select the
CROSSPOINT section from the top menu area, then select either GRID VIEW or TILE VIEW:
 In the GRID VIEW, double-click on the Input or Output port you want to change.
 In the TILE VIEW select the Input or Output you want to change, and click PARAMETERS in the
lower right section.
A pop up window will appear with the properties of the input or output you have selected. The right
column will show "Serial Port Extension parameters".
Here you will find a pulldown selection for the SERIAL PASSTHRU - choose ENABLED or DISABLED.
Then select the "Periphery Receive" to determine whether you will receive ASCII data or Binary data
form the attached serial device.
For Fiber Inputs, the BAUD RATE is set at the TX unit itself, using rotary switches. For Fiber Outputs, the
Baud rate is set with a pulldown here. There is always 1 Stop Bit and no Parity Bit.
Once the Serial Passthrough is enabled, a terminal window will appear below, where you can directly
type in data that should appear at the extended serial port. This is valuable for testing.
There is no need to SAVE these settings, they are automatically saved as soon as you make a selection.
4
Lightware Command Injection
Using the SERIAL command:
The format for using the SERIAL command to set the serial port for an extender on the matrix frame:
Input Boards:
{:SERIAL#X@SY=a;b;}
Where:
X = the port number
Y = "I" for an input port, "O" for an output port
a = Receive Mode: 0 for disabled, 1 for ASCII, 2 for Binary (Sending is always enabled)
b = Serial Pass Through Enable: 0 = disabled, 1 = enabled
Example:
To enable Serial commands in ASCII mode on Input Port #1:
(Response from Frame):
{:SERIAL#1@SI=1;1;}
(:SERIAL#1@SI=1;1;9600;1;)
Response:
(:SERIAL#X@SY=a;b;c;d;)
Where:
X = the port number
Y = "I" for an input port, "O" for an output port
a = Receive Mode: 0 for disabled, 1 for ASCII, 2 for Binary (Sending is always enabled)
b = Serial Pass Through Enable: 0 = disabled, 1 = enabled
c = Baud rate: 9600, 14400, 19200, 38400, or 57600
d = Serial Pass through TX unit present: 0 = No TX unit with Serial Attached, 1 = TX Unit with
serial attached
Output Boards:
Output boards use a similar command as Input boards, but have the capability to set the BAUD RATE. Note that
the order of the parameters is different than the input board.
{:SERIAL#X@SY=a;b;c;}
Where:
X = the port number
Y = "I" for an input port, "O" for an output port
a = Receive Mode: 0 for disabled, 1 for ASCII, 2 for Binary (Sending is always enabled)
b = Baud rate : 9600, 14400, 19200, 38400, or 57600
c = Serial Pass Through Enable: 0 = disabled, 1 = enabled
Example:
To enable Serial at 9600 in ASCII mode on Output Port #1:
(Response from Frame):
{:SERIAL#1@SO=1;9600;1;}
(:SERIAL#1@SO=1;9600;1;1;)
5
Lightware Command Injection
Response:
(:SERIAL#X@SY=a;b;c;d;)
Where:
X = the port number
Y = "I" for an input port, "O" for an output port
a = Receive Mode: 0 for disabled, 1 for ASCII, 2 for Binary (Sending is always enabled)
b = Serial Pass Through Enable: 0 = disabled, 1 = enabled
c = Baud rate: 9600, 14400, 19200, 38400, or 57600
d = Serial Pass through TX unit present: 0 = No TX unit with Serial Attached, 1 = TX Unit with
serial attached
6
Download PDF