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.

No Comments

Add your own comment...

You must be registered to leave a comment.

wEmbed-prtnr_rgbISO9001.png

Related Items

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