release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > IpodPort > IpodItunesCommunication (r8)

Ipod/Itunes Communication

Introduction

This page attempts to document how itunes detects that a specific USB device is an ipod.

The knowledge in this page was gained during experimental attempts to get itunes to recognise non-ipod Rockbox devices running the Rockbox software USB stack and sync files to it as if it were an ipod.

How to mimic an ipod

Each of the following must be implemented in order for itunes to accept a USB device as an ipod.

Partition layout

Your partition layout needs at least the following:
  1. A data partition that must be partition 1 (unless partition 1 is of type 0). The physical location on disk is not important.
  2. A partition of type 0 - the size, position and contents isn't checked by iTunes.

The following has been confirmed working:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1010      246409+   b  W95 FAT32 - (formatted as FAT32)
/dev/sdb2            1011        1012         488    0  Empty

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               2        1000      243756    b  W95 FAT32 - (formatted as FAT32)
/dev/sdb2            1001        1012        2928   84  OS/2 hidden C: drive
/dev/sdb3               1           1         213+   0  Empty

XML info document

[TODO]

USB VID/PID

USB IDs of the various Ipod models are available on the DeviceDetection page.

Filesystem contents

It looks like the only thing that is absolutely required is the /iPod_Control directory. Everything else will be created by iTunes as needed.

Having fun by changing the ipod's capabilities

The XML info document describes the various supported file formats and other features of the ipod. The following changes have been attempted:

Success

  • Removing the AAC capability from the ipod.
  • Increasing the maximum samplerate for WAV files to 96KHz

Failure

  • Itunes will play MP2 files, but refuse to sync them to an ipod. Simply copying the MP3 info from the XML file and replacing "MP3" with "MP2" didn't succeed in making itunes sync MP2 files.

Setting the clock

  • Itunes sets the clock using a vendor specific WRITE BUFFER command.
  • To set the clock from a linux system, install sg3-utils, make a (binary) file containing (in hex here, date = 17 March 2009, 15:17:27) : 07 D9 00 4B 04 0F 11 1B 00 00 00 00
  • The fields are as follows:
    • Year 2 bytes
    • Days since 1 Jan 2 bytes
    • timezone 1 byte (0==London, 4==Paris, others still unknown)
    • hour 1 byte
    • minutes 1 byte
    • seconds 1 byte
    • four zero bytes
  • run "sg_raw --send=12 -i datefile /dev/sdb 3b 01 00 0c 00 00 00 00 00 00" (as root, with of course the ipod being /dev/sdb here)

Links

I Attachment Action Size Date Who Comment
nano-3g-1.1.3.xmlxml nano-3g-1.1.3.xml manage 11.8 K 14 Mar 2009 - 19:52 JonasHaeggqvist XML info document from Ipod Nano 3G firmware v1.1.3
Edit | Attach | Print version | History: r11 | r9 < r8 < r7 < r6 | Backlinks | View wiki text | More topic actions...
r8 - 17 Mar 2009 - 15:40:43 - FrankGevaerts

Parents: IpodPort
Copyright by the contributing authors.