topleft
topright

iPod Accessory Protocol

Accessory Protocol

The iPod uses an accessory protocol to facilitate communication between the iPod and attached accessories. The protocol was introduced in third generation iPods and is accessible either from the dock connector or the serial port located next to the headphone jack.

Communication is implemented using an 8 data bit – 1 stop bit serial protocol at a standard rate of 19200 baud.

Command Structure

To communicate with the iPod a message consisting of the following elements is needed:

Sync Byte: 0xFF
Sync Byte: 0×55
Length (1 Byte): Mode + Number of command bytes + parameters.
Mode (1 Byte): Modes available include 0-4 and 9.
Command (2 Bytes):
Parameter (n Bytes): Optional
Checksum (1 Byte): Subtract from 0×00 in the following order: Length, mode, command, parameter.

Header Header Length Mode Cmd Cmd Param Chk
0xFF 0×55 0×04 0×02 0×00 0×00 0×01 0xF9

Available Commands

A variety of commands can be issued to the iPod and each command is grouped into a ‘mode’. The commands available in modes 0 - 2 are as follows:

Mode 0 – Mode switching commands

0×01 0×01 – Switch to Voice Recorder mode (not available on 5th Generation)
0×01 0×02 – Switch to Remote mode.
0×01 0×04 – Switch to Advanced Remote mode.
0×03 – Get mode status.
0×05 – Switch to Advanced Remote mode.
0×06 – Switch to Remote mode.

Mode 1 – Voice Commands

0×01 0×00 – Recording started.
0×01 0×01 – Recording stopped.

Mode 2 – Remote Commands

0×00 0×00 – Button released.
0×00 0×01 – Play.
0×00 0×02 – Vol+
0×00 0×04 – Vol-
0×00 0×08 – Next track
0×00 0×10 – Previous Track
0×00 0×20 – Next Album
0×00 0×40 – Previous Album
0×00 0×80 – Stop
0×00 0×00 0×01 – Play
0×00 0×00 0×02 - Pause
0×00 0×00 0×04 – Toggle mute
0×00 0×00 0×20 – Next Playlist
0×00 0×00 0×40 – Previous Playlist
0×00 0×00 0×80 – Toggle shuffle
0×00 0×00 0×00 0×01 – Toggle repeat
0×00 0×00 0×00 0×04 – Turn off
0×00 0×00 0×00 0×08 – Turn on
0×00 0×00 0×00 0×40– Menu
0×00 0×00 0×00 0×80 – Select
0×00 0×00 0×00 0×00 0×01 – Scroll up
0×00 0×00 0×00 0×00 0×02 – Scroll down

Example command messages

Switch the iPod into remote mode:

0xFF 0×55 0×03 0×00 0×01 0×02 0xFA

Send the ‘Play’ command in Mode 2:

0xFF 0×55 0×04 0×02 0×00 0×00 0×01 0xF9

Send the ‘Button released’ command in Mode 2:

0xFF 0×55 0×03 0×02 0×00 0×00 0xFB

The ‘button released’ command should be sent within 3ms of sending a button command.

iPod Dock Connector Pinout

The iPod dock connector allows a variety of accessories to be connected with the iPod which can offer enhanced functionality. The connector connector uses 30 pins; the function of each pin is given below.

Pin Function Description
1 GND Common to pin 2.
2 GND Audio/Video ground.
3 Audio Out R Line out right channel.
4 Audio Out L Line out left channel.
5 Audio In R Line in right channel.
6 Audio In L Line in left channel.
7 - -
8 Video Out Composite video out.
9 S-Video Cro (IPOD color / photo) Chrominance
10 S-Video Lum (IPOD color / photo) Luminance
11 GND Serial ground.
12 Tx Serial Tx
13 Rx Serial Rx
14 RSV Reserved pin.
15 GND Common to pin 16.
16 GND USB ground.
17 RSV Reserved pin.
18 3.3V +3.3V accessory supply. Stepped up to 5V on camera connector.
19-20 12V FireWire +12V supply.
21 Accessory Connect to ground via resistor to indicate the presence of an accessory. Different resistance values assigned to each accessory.
22 FireWire TPA - FireWire Data
23 5V USB +5V supply.
24 FireWire TPA + FireWire Data
25 D- USB D-
26 FireWire TPB - FireWire Data
27 D+ USB D+
28 FireWire TPB + FireWire Data
29-30 GND FireWire ground.

Note: Your connector may be reversed, so always check before connecting anything! Damage may be caused to your hardware if you connect the iPod incorrectly.

Multi-processor design brings success

Practical Control have recently delivered a complex design using a mixture of Texas DSP and Xilinx FPGA processors. The product used the in-house team’s expertise to develop the 8 layer PCBs which sample and process signals at 400ns intervals as required by the client.

Developed using BGA and 0402 components, the first off production runs were manufactured and tested on site.

Our client will be incorporating the product into the realisation of a 10 year research programme for the aerospace industry.

iPod and iPhone accessory protocol

Practical Control have recently developed electronic accessories for the iPod and iPhone devices.
The embedded software development team are embarking on various new and exciting projects in this area and we will post more when we have further information!

wEmbed-prtnr_rgbISO9001.png

Related Items

(c) 2006-2009 All Rights Reserved. Practical Control Ltd. Electronics Design, Product Design, Embedded Software