Standard of the Camera & Imaging Products AssociationWhite PaperofCIPA DC-005-2005“Picture Transfer Protocol” over TCP/IP networks

8. November. 2005

Published byCamera & Imaging Products Association(portions of this document are Copyright © 2004-2005 FotoNation Inc.)1. Overview and Scope
This document explains the background, the objective, the features, the technical outline, andthe basic operation of a communication protocol specified by CIPA standard “CIPADC-005-2005”, “Picture Transfer Protocol” over TCP/IP networks (Hereafter “PTP-IP”).
The goal of PTP-IP is to define a standard transport layer for devices and applications that would
achieve interoperability of the transport layer for “Picture Transfer Protocol” [1] (Hereafter “PTP”)
in networking environments based on TCP/IP. The scope of PTP-IP does not specify suchaspects of networking applications as network configuration, device discovery, device bonding,user authentication etc. Additional methods and conventions shall need to be specified in orderto achieve interoperability of products utilizing PTP in networking environments.

2. Outline of PTP
PTP was primarily standardized by PIMA (currently I3A[2]) and is now an ISO standard. It is astandard protocol for bi-directional image communications. It defines communication mechanism
to ensure the interoperability between imaging devices, such as digital still cameras (Hereafter“DSC”), printers, desktop computers, and hand held devices.
PTP is supported by major OS-es and applications for PC and provides uniform mechanisms for
direct transfer for images between DSCs and PCs without a need for vendor-specific drivers.
Furthermore, it is adopted by PictBridge[3] standardized by CIPA in 2003 as its underlying
transport protocol and most of modern DSCs and photo printers have implemented it with thespread of PictBridge in recent years.
One of the most important features of PTP is that it is a transport-independent protocol. Although
presently only a USB[4] transport layer for PTP is standardized, other solutions are available for
PTP over different transport layers.

3. Background and Objective
As more and more devices in home and office environments become networked and wireless,there is a growing need to support this trend in the digital imaging domain, in particular DSCsand Photo printers. Currently, the most popular way of connecting such devices with PCs is byusing USB.
In order to fulfill this need, PTP-IP has been specified as a new layer in the PTP communication
stack to map PTP onto TCP/IP which is a standard network protocol. PTP-IP enables PTP-based
applications over the IP-based networks with minimal changes in the application code and does
not impose a heavy implementation burden on a device. Therefore, PTP-based applications on
PC and PictBridge devices can become networked or wireless with minimal implementation
burden of PTP-IP.

1

4. Features
The main features of PTP-IP are:● It is able to work over any network running TCP/IP, both wireless and wired.
● It preserves all of PTP features such as picture transfer, camera control and manufacturer
specific extensions.
● It does not affect any higher application-level protocols over PTP (e.g. PictBridge).
● It can support multiple concurrent sessions (multiple Initiators can connect to same
Responder simultaneously), which is impossible in case of USB connections.

5. Outline of PTP-IP
5.1. PTP-IP layer model
The communication between PTP and PTP-IP is based on PTP transactions model, as follows.
●●●●The Responder responds with Response to Operation Request from the Initiator.
In Data-In, data is transferred from the Responder to the Initiator.
In Data-Out, data is transferred from the Initiator to the Responder.
In Event, PTP event is transferred from the Responder to the Initiator.

The PTP-IP layer model is shown in Figure 1.

Data

Operation Request

Response

PTP-IP

PTP-IP

TCP

TCP

IP

IP

NetworkNetwork

Initiator

Responder
Figure 1

2Connection /Disconnection

PTP Events

Response

PTP Events

PTP

Connection /Disconnection

Operation Request

DataPTP5.2. PTP-IP as a part of the Communication Stack
PTP-IP uses TCP as its transport layer. Mapping PTP onto TCP provides a suitable means ofcommunication between two PTP devices (i.e. the Initiator and Responder of PTP). The place of
the PTP-IP in the communication stack is presented in Figure 2.

PTP

PTP Protocol

PTP

PTP-IP

PTP-IP Protocol

PTP-IPTCP

TCP Protocol

TCPIP

IP Protocol

IP

Network

Network Specific Protocol

NetworkResponder

Initiator
Figure 2

TCP (in the TCP/IP protocol stack) is the natural transport layer to provide reliable, error free
data communication services to PTP-IP. Furthermore, TCP is a stream based transport layer thatprovides multiple communication channels (TCP connections).

5.3. PTP-IP Connection
In order for the PTP layer on the Initiator to be able to establish a session with the remote PTP
layer on the Responder device, a PTP-IP connection needs to be first established. This consistsof two TCP/IP connections, as shown in Figure 3, one for Command/Data Connection and onefor Event Connection. The former carries PTP commands, data and responses while the latter
carries PTP events related to Command/Data Connection asynchronously.
If an Initiator requires multiple PTP sessions to the same Responder device, then multiplePTP-IP connections need to be established. In a networking environment, multiple Initiators mayattempt to open connections with the same Responder. Thus special care using Connection
Number needs to be taken in order for the Responder to make sure that dual TCP connections
are associated with the same PTP-IP connection. (See 5.4)

3

Connect ionaat
Dd/ nan tio
m necnom nioC CoctneonCnt

EventeEvComCo mann nde c /Dtio atanInitiator(Device A)

Responder(Device C)

Responder(Device B)

Figure 3

5.4. Establishment of PTP-IP Connection
The sequence of the PTP-IP connections establishment is shown in Figure 4.

Responder

Initiator
12Commnad/Data Connection Establishment

InitCmdR

4eq

InitCmdA

3ck

Event Connection Establishment

5

InitEvtReq

6
7

InitEvtAck

PTPIP Connection Established

Figure 4123

The Initiator initiates the establishment of the underlying Command/Data TCP
connection with the Responder (TCP port number 15740).
Immediately after this TCP connection is established, the Initiator sends the Init
Command Request PTP-IP packet that contains its identity (GUID and FriendlyName).
The Responder answers with Init Command Ack PTP-IP Packet.

44567After the Initiator receives Init Command Ack packet in the previous phase, it initiates
the Event TCP connection with the Responder (TCP port number 15740).
Immediately after this TCP connection is established, the Initiator sends the Responder
the Init Event Request PTP-IP Packet that carries the previously assigned Connection
Number. The Responder uses this number to associate the two TCP connections(Command/Data and Event) as belonging to same PTP-IP connection and to the same
PTP session.
In response, the Responder sends an Init Event Ack packet on the Event TCPconnection.
Once the Initiator receives the Init Event Ack packet, the PTP-IP connection isconsidered established and further data communication can take place.

6. The relationship with PictBridge
As defined in specifications CIPA DC-001, Implementer’s Guidelines and Logo Certification
Guidelines, a PictBridge compliant product is required to use PTP as an underlying transport
protocol and USB as a physical interface. If a product satisfies these requirements and passes
the logo certification test, the product is authorized to use the PictBridge logo.
If any other transport protocol or physical interface is used for a PictBridge product, newimplementer’s guidelines and logo certification guidelines should be defined in order to achieve
the interoperability between the new PictBridge products. However, any concrete definitions ofthese guidelines do not exist at this moment.
Therefore, if a vendor implements PictBridge equivalent functionality over TCP transport protocol
by using PTP-IP, the vendor should consider some methods so that customers may not
misunderstand that the functionality of the product is compliant with PictBridge in terms ofinteroperability. The examples of the methods are shown below:-It is stated in a datasheet and a manual of the product that its connectivity specification isthe vendor proprietary.
A vendor original name or logo different from PictBridge is used in order to clarify that theproduct is using the vendor original connectivity specification.

7. References[1] ISO, ISO 15740:2005, “Picture transfer protocol (PTP) for digital still photography devices”,
http://www.iso.org/[2] I3A, International Imaging Industry Association,
http://www.i3a.org/[3] CIPA, CIPA DC-001-2003, “Digital Photo Solutions for Imaging Devices”,
http://www.cipa.jp/pictbridge/contents_e/03overview_e.html[4] USB Implementers Forum, Inc., Universal Serial Bus Specification Revision 2.0,
http://www.usb.org/developers/docs/

5