_passthrough_CLI cmd
On a Makito X Series encoder with serial ports (such as the Makito X with SDI, the Makito X1 Rugged, or the the Makito X4 Rugged), you can enable bi-directional serial passthrough for controlling serially attached devices such as PTZ controlled cameras. Both RS-232 and RS-422 are supported. The passthrough command is used to manage passthrough settings.
Synopsis
passthrough start |
Actions
Action | Description |
---|---|
start | Starts listening for passthrough clients. |
stop | Stops passthrough and disconnects any clients that were connected. |
set | Configures passthrough settings. A series of one or more parameter=value pairs can be specified at once. See Parameters below. |
get | Displays passthrough information. You can specify configuration, statistics, or all information. Tip To display a summary of all the encoders in a table format, you can use passthrough all get table. |
clear | Clears passthrough statistics. |
help | Displays usage information for the passthrough command. |
enable_passthrough_on_serial_port | Enables passthrough from the serial port. |
Parameters
Parameter | Default | Description/Values |
---|---|---|
standard | RS232 | Specifies the transceiver mode for the passthrough:
|
baudrate | 9600 | Specifies the baud rate for the passthrough:
|
databits | 8 | Specifies the number of data bits in each character.
|
stopbits | 1 | Specifies the number of stop bits sent at the end of every character.
|
flowctrl | none | The flow control for the serial port:
Xon/Xoff is a protocol for controlling the flow of data between devices on an asynchronous serial connection. Tip Flow control is useful in atypical cases such as when the remote controlling device's serial port is set to a much higher baud rate than the encoder's serial port. |
port | 7777 | The TCP port on which to listen for passthrough clients. |
timeout | 0 (no timeout) | Specifies the amount of time in seconds a TCP connection will be kept open when no data is being received from the remote client. The timeout can be up to 10 minutes (0..600 seconds). The idle timeout is important when you have more than one remote end point controlling the serial port: if a remote application is left running with the TCP connection active, no one else will be able to control the COM port. Tip You can use 0 for an infinite timeout to keep the connection open until the client closes it. |
Example
This example shows how to use TCP port 8888 to listen for passthrough clients. The camera has an RS232 COM port running at 9600 bps: # passthrough set port=8888 baudrate=9600 standard=rs232 Passthrough configured successfully. # passthrough get If passthrough is not started, you will have to start it: # passthrough get stats # passthrough start # passthrough get stats |
Passthrough Statistics
When a remote client is connected, the state will show up as CONNECTED and the IP address of the client will be displayed.
The statistics are divided in two sections: network and serial.
- The network stats show what is going in terms of the TCP connection with the remote controller, i.e., how many bytes were received from and sent to the remote controller.
- The serial stats show how many bytes were sent to the serial device connected to the encoder and how many were received from it.
In normal operation the number of bytes received on the TCP connection would match the number of bytes sent on the serial port and the number of bytes received on the serial port would match the number sent on TCP. However, if the device connected to the Makito X sends serial data when no client is connected, these numbers won't match.
Additional stats can show up under special conditions, as explained below:
Statistic | Description |
---|---|
Network dropped bytes | This counter shows the number of bytes received on the encoder's serial port that could not be sent over the TCP link. The network connection will always be orders of magnitude faster than the serial port connection so this statistic is seldom seen |
Serial Dropped bytes | This counter shows the number of bytes received on the network connection that could not be sent on the serial link. Again if the controlling remote device and the encoder are set to the same baud rate, it is unlikely that the encoder would receive data at a rate that can’t be accommodated. If, however, the baud rates don’t match and the remote device is set to a higher value, this could occur. In that case, it is a good idea to reconfigure the remote device or use flow control. |
Flow Control Stats | When flow control is used, the network section of the stats will display the number of XON and XOFF control bytes sent to the remote device over TCP. This indicates whether or not data from the controlling device was sent too fast to be forwarded to the encoder’s serial port. When flow control is used, the Makito X will queue up to 2 seconds of serial data at 115,200 bps locally from the remote device. If the remote device also supports XON XOFF (otherwise, do not use flow control), this ensures that no data is ever lost from it. |