Blame README.SysInfo

Packit 29108b
Starting with the iPod Classics and the Video Nanos, libgpod needs an 
Packit 29108b
additional configuration step to correctly modify the iPod content. libgpod 
Packit 29108b
needs to know the so-called iPod "firewire id", otherwise the iPod won't 
Packit 29108b
recognize what libgpod wrote to it and will behave as if it's empty.
Packit 29108b
Packit 29108b
There are several ways to set up an iPod so libgpod can find its firewire id.
Packit 29108b
Packit 29108b
The preferred method is automatic. Make sure you have hal and libsgutils
Packit 29108b
installed before running configure/autogen.sh. If you built libgpod without
Packit 29108b
them, run configure/make/make install after you install them.
Packit 29108b
Packit 29108b
A hal callout and .fdi file will be built and installed. This will query an
Packit 29108b
iPod when it is plugged in and save the SysInfoExtended file in the proper
Packit 29108b
place. This should be entirely automatic. If you have trouble with this, see
Packit 29108b
the TROUBLESHOOTING file for some hints.
Packit 29108b
Packit 29108b
If you build with libsgutils but without hal, the next best method is mostly
Packit 29108b
automatic. You should have an ipod-read-sysinfo-extended tool available. Run
Packit 29108b
it with the iPod device path and the iPod mount point /mnt/ipod) as arguments.
Packit 29108b
For example:
Packit 29108b
Packit 29108b
    $ ipod-read-sysinfo-extended /dev/sda /mnt/ipod
Packit 29108b
Packit 29108b
This may require root privileges. It reads an XML file from the iPod and
Packit 29108b
writes it as /mnt/ipod/iPod_Control/Device/SysInfoExtended. More details on
Packit 29108b
this method can be found at http://ipodlinux.org/Device_Information.
Packit 29108b
Packit 29108b
Having the SysInfoExtended file created by ipod-read-sysinfo-extended or the
Packit 29108b
hal callout is enough for libgpod to figure out the iPod firewire id.
Packit 29108b
Packit 29108b
The last method requires more manual intervention. First, you need to
Packit 29108b
determine the firewire id of the iPod. To do that on Linux, plug in the iPod
Packit 29108b
in and run (with root privileges):
Packit 29108b
Packit 29108b
    $ lsusb -v | grep -i Serial
Packit 29108b
Packit 29108b
This should print a 16 character long string like 00A1234567891231. For an
Packit 29108b
iPod Touch, this number will be much longer than 16 characters, the firewire
Packit 29108b
ID is constituted by the first 16 characters.
Packit 29108b
Packit 29108b
On FreeBSD, there is a tool to get the serial number at:
Packit 29108b
Packit 29108b
    http://50hz.ws/dev/getserial.c
Packit 29108b
Packit 29108b
Once you have the serial number, edit /mnt/ipod/iPod_Control/Device/SysInfo,
Packit 29108b
creating the file if it does not exist. (Replace /mnt/ipod with the path to
Packit 29108b
where the iPod is mounted). Add a line like this to the SysInfo file:
Packit 29108b
Packit 29108b
FirewireGuid: 0xffffffffffffffff
Packit 29108b
Packit 29108b
Replace ffffffffffffffff with the serial number you obtained in the previous
Packit 29108b
step. Don't forget the 0x before the string. After you add the FirewireGuid to
Packit 29108b
the SysInfo file you need to rewrite the iTunesDB for the change to take
Packit 29108b
effect. For example, add a new song or adjust the playcount of an existing
Packit 29108b
song and save the changes in gtkpod.
Packit 29108b
Packit 29108b
Be careful when using applications which let you manually specify the iPod
Packit 29108b
model. They may overwrite the SysInfo file and undo the changes.
Packit 29108b
Packit 29108b
Finally, if you compiled libgpod from source, you can test that libgpod can
Packit 29108b
find the firewire ID on the iPod using the test-firewire-id program in the
Packit 29108b
tests/ dir of the libgpod source. For example:
Packit 29108b
Packit 29108b
    $ cd ~/src/libgpod/tests
Packit 29108b
    $ ./test-firewire-id /ipod/mount/point