9
Sony Simple Camera Protocol
Sony Simple Camera
Protocol
Introduction
Overview
Sony Simple Camera Protocol (SSCP) is a communication
protocol between your system and CNA-1. It is an ASCII
character based protocol via TCP/IP. The port number of TCP
is configurable.
It has no complex mechanism such as Application-level
session control, Keep-alive, Device identification or
Authentication. Therefore, your system can control Sony
Cameras, or can be controlled from Sony Control Panels,
using just send/receive command(s) without any complex
procedure.
Overall operation
Basically, CNA-1 listens to a specified TCP port and awaits a
connection from your system. When a connection is
established, CNA-1 is ready to send and receive control
commands immediately.
The connection behavior varies based on its emulation mode.
(See connection section.)
Specification
Network
Link layer:
Ethernet, 100BASE-TX
Network layer:
IPv4
Transport Layer:
TCP
Port number is configurable other than 7700 (CNA-1
reserved) or well known ports (1-1023)
Data structure
Packet:
Variable length depends on MTU configuration.
MTU value of CNA-1 is 1500 bytes. It is preferred that
MTU of your system is configured less than 1500.
Data:
ASCII character codes:
• Available ASCII printable characters:
– Lower alpha: “a” .. “z”
– Higher alpha: “A” .. “Z”
– Digit: “0” .. “9”
– Others: “,” (comma)
• Available ASCII control characters:
– New line: “\n”, “\r”
Note
If a packet includes unavailable characters or bytes, it is
handled as an invalid packet and discarded.
Command
A command is described by Hexadecimal data assembled by
ASCII characters above.
Lower and upper case alphabetical/numeric:
2 characters requires 1 byte
Comma:
Delimiter of each byte
New line:
Termination of a command, “\n”, “\r” and “\n\r” are
available.
Example: (Set Master Black to 0):
“23,a9,00,00\n”
Constructing a command by multi-packet is possible.
Example:
“23,”
Packet1
“a9”
Packet2
“,00,00” Packet3
“\n”
Packet4
CNA-1 will concatenate packets (1-4) and recognize that
as “23,a9,00,00\n”.
Multiple commands in a packet is possible.
Example (Set White Balance R-ch, G-ch, B-ch to 0 at the
same time):
“23,01,00,00\n23,02,00,00\n23,03,00,00\n”
Important limitation
Maximum command length: 168 byte (characters) / packet
If CNA-1 cannot find the terminator (New line) after it
receives 168 bytes, it will discard the received data.
Minimum inter-packet (including complete command(s))
interval: 50 msec
This limitation is important to avoid Camera malfunctions.
An overly short inter-packet gap can impose a heavy load
on a Camera’s processor, and interfere with its
processing. It is possible that unexpected Camera errors
might occur.
If your system needs to send a number of commands, the
commands must be concatenated and put in a packet.
In an application including periodic scan for Camera
status, it is recommended that the inter-packet-interval is
set to as long as possible, for effective Camera operation.
Terminator:
CNA-1 only sends “\n” as terminator even if it receives “\r”
and “\n\r”.
Connection
CNA-1 configured for RCP mode
1
CNA-1 searches for a Sony Camera or Sony CCU by CNS
configuration.
2
When CNA-1 connects to that, CNA-1 listens to specified
TCP port and awaits a connection from your system.
3
Your system ready to connect to CNA-1
Note
If CNA-1 loses its CNS connection (to Camera or CCU), it
terminates the connection with your system, and returns to (1).