JVC VN-E4U API Guide - Page 73

Control of External Devices via Pass-through, (1) Reservation of Pass-through Feature via API

Page 73 highlights

8. API for Controlling External Devices Connected to VN-E4 _ 8.2. Control of External Devices via Pass-through 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 Connection: Keep-Alive Content-Length: 104 content-type: text/plain date: Fri, 13 MAY 2005 07:33:12 GMT server: VN-E4 API Server/1.0.0 keep-alive: timeout=5, max=5 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 200 OK 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 Connection: Keep-Alive Content-Length: 104 content-type: text/plain date: Fri, 13 MAY 2005 07:33:12 GMT server: VN-E4 API Server/1.0.0 keep-alive: timeout=5, max=5 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 403 Forbidden 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. 73

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80

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