Installation

A bit tricky, but don't worry, you'll get through it

These instructions are talyored for Ubuntu 8.10

Dependencies

Currently, wxDatalinkUSB depends on four things: a patched version of libdlusb for watch communication, libical for importing iCals, libcsv for importing CSV files, and wxWidgets for drawing the user interface.

Installing wxWidgets

Go to the wxWidgets download page follow the instructions for your distribution. In Ubuntu we open /etc/apt/sources.list and add the following to the file:

Open apt's source list:
$ sudo gedit /etc/apt/sources.list

Add wxWidgets' source to the file:
deb http://apt.wxwidgets.org/ gutsy-wx main

Finally, update apt and download wxWidgets:

Update apt and verify source:
$ wget http://apt.wxwidgets.org/key.asc && sudo apt-key add key.asc && rm key.asc
$ sudo apt-get update

Finally, install wxWidgets:
$ sudo apt-get install libwxgtk2.8-dev

Installing libdlusb

Even if you already have libdlusb you need to patch it

Libdlusb requires libusb-dev. Obtain libusb-dev through your package manager. In Ubuntu, we can use apt:

Install libusb-dev:
$ sudo apt-get install libusb-dev

If for some reason you don't already have gcc and g++ you will need them to compile the software. In Ubuntu, we can again use apt:

Install gcc and g++
$ sudo apt-get install gcc g++

As of this writing, the current version (0.0.9c) of libdlusb does not support all of the features that wxDatalinkUSB requires, so you need either use a patch-file or download the already patched source.

Here we are going to assume that you downloaded the already-patched source.

First, unpack the archive:

$ tar -xzvf libdlusb-wxdlusb-0.0.9c.tar.gz

Next, change into the directory and run configure:

$ cd libdlusb-0.0.9c
$ ./configure

Now compile the library, become root, and then install it. Note that in some distributions this is usually accomplished by using the su command instead of sudo.

$ make
$ sudo make install

Installing libical

Here we can just use apt-get again:

Install libical:
$ sudo apt-get install libical-dev

Installing libcsv

One last library, and then we can install wxDatalinkUSB. This one is libcsv, which is used for importing CSV formatted contacts. As usual, first download libcsv.

The installation procedure is basically the same except that libcsv doesn't have configure:

Unpack the archive:
$ tar -xzvf libcsv-2.0.1.tar.gz
$ cd libcsv-2.0.1


Note for 64-bit installations

Because libcsv does not have configure you have to do one extra step. First, open the makefile:

$ gedit Makefile

Find the following lines (line 34-35):
libcsv.o: libcsv.c csv.h
$(CC) $< -c -o $@

And change them to this:
libcsv.o: libcsv.c csv.h
$(CC) $< -c -fPIC -o $@

Run make:
$ make

Install:
$ sudo make install

Installing wxDatalinkUSB

Congratulations! All the required dependencies have been installed! That wasn't too bad, right? Installation for wxDatalinkUSB basically the same. First, get the archive.

Next, unpack it, configure, make, and make install

Unpack the archive:
$ tar -xzvf wxDatalinkUSB-0.0.4.tar.gz

Run configure and then make:
$ cd wxDatalinkUSB-0.0.4
$ ./configure
$ make

Install:
$ sudo make install

Configuring your system

You now have everything installed. Check to make sure that everything is working by running wxDatalinkUSB:

$ wxDatalinkUSB

If you see a nice window pop-up, you have installed everything correctly. However on most systems you need to configure your system to allow you to access the USB watch. To do this, we are going to configure udev to allow access to the watch.

First, create a new file called 10-timex.rules in /etc/udev/rules.d using your favorite text editor. Here we are using gedit.

Create udev rule:
$ sudo gedit /etc/udev/rules.d/10-timex.rules

Put the following text in the file:

# udev rules file for libdlusb
# Timex Datalink USB Watch
BUS=="usb", SYSFS{idVendor}=="0cc2", SYSFS{idProduct}=="d700", GROUP="plugdev"

This file tells your computer to recognize the watch and to give access to it.
Finally, we need to restart udev. This can be done by rebooting or typing:

Restart udev:
$ sudo /etc/init.d/udev restart

Congratulations! You have successfully installed wxDatalinkUSB. Now just run

$ wxDatalinkUSB

and enjoy a user-friendly interface to the Timex Datalink USB watch.