Time synchronisation is not supported in rockbox 3.3. You should wait till 3.4 or use a daily snapshot newer than r22259.
We have have successful report for :
- iPod mini 2G running rockbox r22307.
- iPod nano 2G (not supported by rockbox) running the original firmware (1.1.3).
- iPod Video 5.5g.
- Sansa e200 (r22648)
Linux users must use
ipod-time-sync
.
Installing ipod-time-sync
ipod-time-sync
can be found in tools directory of
libgpod
(version >= 0.7.2) archive. If the
libgpod
package of your linux distribution provide
ipod-time-sync
just install it.
With
ipod-time-sync
installed, you can synchronise your DAP clock with:
ipod-time-sync /dev/sdX # where sdX is your DAP SCSI linux device
Alternatively, you can find an adapted version in
utils/time-sync
in Rockbox SVN. Just run:
make
make install
and it'll be installed in
/usr/local/bin/time-sync
Compile it your-self
Get
libgpod
>= 0.7.2 archive. You must have
glib-2
and
sg_utils
include/lib installed.
tar xvfz libgpod-0.7.2.tar.gz
cd libgpod-0.7.2/tools
gcc `pkg-config --cflags glib-2.0` -c ipod-scsi.c
gcc `pkg-config --cflags glib-2.0` -c ipod-time-sync.c
gcc -o ipod-time-sync `pkg-config --libs glib-2.0` ipod-time-sync.o ipod-scsi.o -lsgutils2
cp -p ipod-time-sync /usr/local/bin
Configuring udev
Under Linux, udev can run
ipod-time-sync
automaticaly for you every time you plug your DAP. It's must easier than running
ipod-time-sync
by hand.
Get your DAP usb id
They are many different way to get those id.
the easier : lsusb
Just type "lsusb" in a shell and look for your DAP.
$ lsusb
Bus 001 Device 004: ID 05ac:1205 Apple, Inc. iPod Mini 1.Gen/2.Gen
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 046d:c044 Logitech, Inc. LX3 Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Here idVendor is 05ac and idProduct is 1205.
search in syslog log file
You can find them in your syslog log (
/var/log/messages
on Fedora).
Aug 21 12:03:40 kalis kernel: usb 1-3: new high speed USB device using ehci_hcd and address 7
Aug 21 12:03:40 kalis kernel: usb 1-3: configuration #1 chosen from 1 choice
Aug 21 12:03:40 kalis kernel: scsi7 : SCSI emulation for USB Mass Storage devices
Aug 21 12:03:40 kalis kernel: input: Rockbox.org Rockbox media player as /devices/pci0000:00/0000:00:02.1/usb1/1-3/1-3:1.1/input/input7
Aug 21 12:03:40 kalis kernel: input,hidraw1: USB HID v1.10 Keyboard [Rockbox.org Rockbox media player] on usb-0000:00:02.1-3
Aug 21 12:03:40 kalis kernel: usb 1-3: New USB device found, idVendor=05ac, idProduct=1205
Aug 21 12:03:40 kalis kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 21 12:03:40 kalis kernel: usb 1-3: Product: Rockbox media player
Aug 21 12:03:40 kalis kernel: usb 1-3: Manufacturer: Rockbox.org
Aug 21 12:03:40 kalis kernel: usb 1-3: SerialNumber: 900000000000A27001423DE92
idVendor is 05ac and idProduct is 1205.
the hard way : udevinfo
udevinfo
give you a lot of info about your usb device. So it can be a little confusing.
You must know the SCSI device used by your DAP. Mine is sdc.
# udevinfo -a -p /sys/block/sdc
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-3':
KERNELS=="1-3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 2"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bMaxPower}=="500mA"
ATTRS{urbnum}=="856"
ATTRS{idVendor}=="05ac"
ATTRS{idProduct}=="1205"
ATTRS{bcdDevice}=="0100"
ATTRS{bDeviceClass}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="1"
ATTRS{devnum}=="7"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Rockbox.org"
ATTRS{product}=="Rockbox media player"
ATTRS{serial}=="900000000000A27001423DE92"
idVendor is 05ac and idProduct is 1205.
Writing udev rule
You must have 3 values to setup udev :
- your DAP idVendor (05ac in this example).
- your DAP idProduct (1205 in this example).
- the full path of
ipod-time-sync
( /usr/local/bin
in this example).
The following setup has been tested on Fedora Core 10. I guess it should works on many other linux distrubution.
udev rules files are generaly located in
/etc/udev/rules.d
. Create a file
99-local.rules
or add the 2 following lines:
# automaticaly adjust my Rockboxed DAP RTC
ACTION=="add", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1205", KERNEL=="sd?", NAME="%k", RUN+="/usr/local/bin/ipod-time-sync /dev/%k"
Testing your setup
The clock is only adjusted when your DAP in plugged in. Your DAP get the date and time for your linux system, so if it is wrong on linux, it will be wrong on your DAP.
To test your setup: - unplug your DAP - set the time to a wrong value - plug your DAP
If everything is fine, the time should change.
Copyright © by the contributing authors.