Control of external devices via pass-through, 1) reservation of pass-through feature via api – JVC 4ch Network Encoder VN-E4 User Manual

Page 73

Advertising
background image

73

8. API for Controlling External Devices Connected to VN-E4 _

8.2. Control

of External Devices via Pass-through

By using the pass-through feature, data sent to VN-E4 via the network will be output from the serial port of VN-E4. In addition, Ack received
by the serial port of VN-E4 will be returned to the client via the network.
Reserve the pass-through feature via API, connect the TCP for transmission of pass-through data (49152 for serial port 1 and 49153 for serial
port 2), followed by sending the data.

(1) Reservation of Pass-through Feature via API

API Character String

/api/receive?from=network&from.ip=Data1&from.protocol=Data2&to=serial(Number)

Example

/api/receive?from=network&from.ip=10.0.0.100&from.protocol=tcp_passive&

from.ip_translate=on&to=serial(2)

from.ip

Specify the IP address of the client.

from.protocol

Specify as tcp_passive. This indicates establishment of TCP connection to TCP49152 from the client.

to.serial(Number)

Specify the serial port used in Number. Specify as 1 or 2.

from.ip_translate

When from.ip_translate is set to off, VN-E4 will standby to receive the pass-through data from the IP address
specified at from.ip. When from.ip_translate is set to on, VN-E4 will ignore from.ip and standby to receive the
pass-through data from the source IP address of this API.

Example of Response

HTTP/1.1 200 OK<CRLF>

Connection: Keep-Alive<CRLF>

Content-Length: 104<CRLF>

content-type: text/plain<CRLF>

date: Fri, 13 MAY 2005 07:33:12 GMT<CRLF>

server: VN-E4 API Server/1.0.0<CRLF>

keep-alive: timeout=5, max=5<CRLF>

x-vne4_response:

from=network&from.ip=10.0.0.100&from.protocol=tcp_passive&from.session=ra

w&from.ip_translate=on&to.serial(2)&to.baud=9600&to.bit=8&to.stopbit=1&to

.parity=none<CRLF><CRLF>

200 OK<CRLF>

Interpretation

Reserve the pass-through feature of VN-E4 . The following error will be returned when the specified serial
port in currently being used by another client.

Example of Error
Response

HTTP/1.1 200 OK<CRLF>

Connection: Keep-Alive<CRLF>

Content-Length: 104<CRLF>

content-type: text/plain<CRLF>

date: Fri, 13 MAY 2005 07:33:12 GMT<CRLF>

server: VN-E4 API Server/1.0.0<CRLF>

keep-alive: timeout=5, max=5<CRLF>

x-vne4_response:

from=network&from.ip=10.0.0.100&from.protocol=tcp_passive&from.session=ra

w&from.ip_translate=on&to.serial(2)&to.baud=9600&to.bit=8&to.stopbit=1(to

.parity=none<CRLF><CRLF>

403 Forbidden<CRLF>

Allowed users

admin, operator

Reservation of serial port 1 will be disabled when Service at the rear panel of VN-E4 is selected. When an API
is sent in this case, an error will be returned.

8.2. Control of External Devices via Pass-through

Advertising