WBT-201 & Fedora 10 (building RPMs)

4 minute read

Of course I wanted my Wintec WBT-201 gps logging device to work with Fedora as it did with Debian/Ubuntu (see this post). And after playing around a little it finally did.

So, this is what I wanted:

  • gpsbabel (accessing and converting gps data)
  • gtk-g-rays2 (managing the WBT-201)
  • gpscorrelate (automatically adding gps data to exif tags of my pictures)


Installing gpsbabel is very easy:

$ su -c "yum install gpsbabel"`

Building rpm of gtk-g-rays2

gtk-g-rays2 is a handy application to manage and download data from the WBT-201 device. Sadly, it’s not in the repos, so I wanted to build my own rpm. I didn’t have any experience in building rpms, but I got along with the help of this post in “Brad’s Blog” (Thanks!). Basically, you need a working spec file - that’s all! ;-) OK, I’ll repeat what I did to build the package here. I followed the advices in “Brad’s Blog”:

Install rpmdevtool and rpmlint by

$ su -c "yum install rpmdevtools rpmlint"

Now create the buildtree in your home directory

$ cd  
$ rpmdev-setuptree

Download the source tarball of gtk-g-rays2 from here (by the time of writing it’s version 1.11) and copy it to ~/rpmbuild/SOURCES. Then create a spec file in ~/rpmbuild/SPECS. Well, creating this spec file is actually the hard part…

Before we go on, extract the source somewhere else and see if it compiles cleanly:

$ cd /tmp  
$ tar xvf ~/rpmbuild/SOURCES/gtk-g-rays2-1.11.tar.bz2  
$ cd gtk-g-rays2-1.11  
$ ./configure  
$ make

Skip make install as we want to install it later by rpm. If you receive any errors, chances are high it’s due to missing “devel” packages. You need at least two:

$ su -c "yum install gtk2-devel libglade2-devel"

Then try again. If everything works, you may go on.

Now back to the spec file: this file has all the information needed to build a package and you may create a more or less empty one following this:

$ cd ~/rpmbuild/SPECS  
$ rpmdev-newspec

Again, filling this file with the necessary information isn’t this easy. So, what I did is downloading source rpms of other packages, extracted them (rpm2cpio _whatever_.src.rpm | cpio -idmv) and took a look at their spec files. You can follow this procedure or you may just want to download my spec file from here:

gtk-g-rays2.spec.gz (md5sum: 53b833c2470fec1002d61851aded2540) => not available anymore

How ever you manage this, copy this spec file to ~/rpmbuild/SPECS and name it i.e. gtk-g-rays2.spec (you’re free to name it however you like). Now we can actually build the rpm by

$ cd ~/rpmbuild/SPECS  
$ rpmbuild -bb gtk-g-rays2.spec

… and install it

$ cd ../RPMS/`uname -m`  
$ su  
$ rpm -ihv gtk-g-rays2-1.11-2.fc10.*


Gaining access to WBT-201 as non root user

When you connect the WBT-201 through USB you will notice the new device as /dev/ttyUSBX (X = 0,1,2,3… that depends). By default only root and users in the group uucp have read/write access to this device.

$ ls -la /dev/ttyUSB0  
crw-rw---- 1 root uucp 5, 0 23. Dez 2008  /dev/ttyUSB0

To change this we need to create a new udev rule. (I found the solution on the gpsbabel website.) As root create a new rule file /etc/udev/rules.d/60-wintec.rules with the following content:

# rules for Wintec WBT-201 GPS device  
SYSFS{idVendor}=="10c4", SYSFS{idProduct}=="ea60", MODE="0666"

You can find out the correct “idVendor” and “idProduct” values when running dmesg right after plugging in your WBT-201. Once done, reconnect the WBT-201 and run gtk-g-rays2 - it should work now. You can also check by

$ ls -la /dev/ttyUSB0  
crw-rw-rw- 1 root uucp 5, 0 23. Dez 2008  /dev/ttyUSB0


To install gpscorrelate, which is a nice application to write your gps tracks to the exif tags of your pictures, we’re going to repeat all steps from the “installing gtk-g-rays2”-part above. So, first download the source package from here (by the time of writing it’s version 1.5.8), then install some requirements:

$ su -c "yum install gtk2-devel libxml2-devel exiv2-devel"

The application installs itself to /usr/local by default. I prefer to install non-packaged software to this location. So, I unpacked the source first, edited “Makefile”, re-packed everything again and put this “new” archive to ~/rpmbuild/SOURCES. I guess, it would be better to create a patch file, but I haven’t looked into this. So I did the “quick” way. So, this is what I did in detail (and you need to redo this when using my spec file):

$ tar xvf gpscorrelate-1.5.8.tar.gz  
$ rm gpscorrelate-1.5.8.tar.gz

Now edit gpscorrelate-1.5.8/Makefile at line 11:

Change prefix = /usr/local to prefix = /usr. Save the file and create the archive again by

$ tar cvf ~/rpmbuild/SOURCES/gpscorrelate-1.5.8.tar.gz gpscorrelate-1.5.8

You can download my spec file from here an copy it to ~/rpmbuild/SPECS:

gpscorrelate.zip (md5sum: 9e75a56674a932dcdb1ddb7da6f5c00a)

Now build and install the package:

$ cd ~/rpmbuild/SPECS  
$ rpmbuild -bb gpscorrelate.spec  
$ cd ../RPMS/`uname -m`  
$ su  
$ rpm -ihv gpscorrelate-1.5.8-2.fc10*

Now you should have all software installed to manage your WBT-201 and geo-tag your pictures.


If you want, you can download both rpms from here, but at this time I can offer them for x86_64 only:

gtk-g-rays2-1.11 64Bit RPM (compiled on Fedora 10 x86_64) + signature:

gpscorrelate-1.5.8 64Bit RPM (compiled on Fedora 10 x86_64) + signature: