MTP PTP-IP Transport Overview

PTP-IP is one of the supported MTP transport modes. This section describes the PTP-IP Transport plug-in and its sub-components (the PTP-IP Connection Controller and related APIs).

Required Background

Before you start, you must be familiar with the following:

  • The data type, communication layers, and transport model of PTP-IP can be found in the PTP-IP specification.

  • Socket programming.

Architecture

The diagram below shows the components and sub-components provided by the Symbian platform in green and those that a device creator must implement in blue. They run in two processes:

  • The PTP-IP Controller process is responsible for setting up the TCP/IP connection and PTP-IP connection. According to the PTP-IP specification, PTP-IP is the layer above the TCP/IP.

    Note: Once a PTP-IP connection is established, the Listener rejects new connection requests until the current connection stops.

  • The MTP process loads the PTP-IP Transport plug-in and transfers MTP data over the Symbian TCP/IP Stack between a host PC and a device.

Figure 1. MTP Architecture with PTP-IP Transport Plug-in

MTP over PTP-IP is initiated in the following way:

  1. A Listener listens on a specific port to accept a PTP-IP connection (based on TCP/IP) request from a host PC. It calls the TCP/IP Stack to establish the TCP/IP connection between the host PC (initiator) and the Symbian device (responder).

    A Listener must be implemented by a device creator. For more information about implementing a Listener, refer to Implementing a Listener.

  2. Once the TCP/IP connection is established, the Listener calls the PTP-IP Connection Controller to set up the PTP-IP connection.

    For more information about using PTP-IP Controller, refer to Using PTP-IP Controller.

  3. The PTP-IP Connection Controller validates whether to accept the request for a PTP-IP connection by calling a Filter.

    The Filter (MPTPIPHostFilter and CPTPIPHostFilterInterface) must be implemented by a device creator. For more information about implementing a Filter, refer to Implementing a Filter.

  4. Once the PTP-IP connection request is accepted and the PTP-IP connection is established, the PTP-IP Connection Controller calls the MTP Client API to send the StartTransport command to the MTP Framework.

  5. The MTP Framework loads the MTP PTP-IP Transport plug-in.

  6. Requests and responses can be issued and MTP data can be transferred between the host PC and the Symbian device over the TCP/IP Stack.

APIs

The MTP PTP-IP Transport includes the following key APIs:

API Description

CPTPIPHostFilterInterface

Provides an ECom plug-in interface for the Connection Controller to load the right Filter implementation.

RPTPIPFramework

Gets an instance of the MPTPIPController instance.

Typical uses

The MTP PTP-IP Transport can be used to

  • Validate and set up a PTP-IP connection between a host PC and a Symbian device.

  • Provide MTP over PTP-IP transport support.