Sunday, August 31, 2008

Using the I-BLUE 747 with bt747

The application bt747 is a GPS control software for several GPS datalogger including the I-BLUE 747. It is an opensource program written in Java and it runs on Windows, Palm, WinCE, Linux and on the Mac.

Running Java programs on OpenSuse can tricky sometimes. "Regular" applications are fine but if you need to install Java extensions to which you do not find a supported OpenSuse package you might fail. I had to face this fact already on another occasion.

The solution is to take the plunge:

  1. deinstall all java packages
  2. install java from sun
  3. install the needed Java extensions
  4. download and install bt747

For bt747 I had to take this route on OpenSuse 11.0. Your mileage may vary, so just give it a go on your distro.

Installation instructions for OpenSuse 11.0

1. Deinstall all Java packages

rpm -qa | grep java | xargs rpm -e

2. Download the generic Java package from Sun


install the package (execute as root)

>sh jre-6u7-linux-i586-rpm.bin

3. Install the rxtx Java extension

RXTX is a native lib providing serial and parallel communication for the Java Development Toolkit.

The file INSTALL tells us what to do, so as root do this:

>cp rxtx-2.1-7-bins-r2/RXTXcomm.jar /usr/java/jre1.6.0_07/lib/ext/
>cp rxtx-2.1-7-bins-r2/Linux/i686-unknown-linux-gnu/ /usr/java/jre1.6.0_07/lib/i386/

The last thing you will have to do is to add the users that are supposed to use bt747 to the "uucp" group on your machine. This is supposedly needed to make lock files work.

On OpenSuse use yast2 to add users to the group.

4. Install bt747

Download the latest installation package from here.

Create a directory to hold the installation files, as the archive does not have subdirectories. I hate it when packagers do that...

>mkdir bt747
>cd bt747
>unzip /PATH/TO/

To start the application do this:

This script will start the new version of the application, which looks nice but has to be considered beta or even alpha at this moment.

This script will start the older version which looks really awful but works well.

So much for now. Stay tuned to find out how to use bt747.

Cheers Juergen

Friday, August 29, 2008

Using the I-Blue 747 with gpsbabel

Gpsbabel is the swiss army knife when it comes to GPS devices. With the application you can read waypoints, tracks and routes from a great number of devices in many different formats. At th same time you can convert between all those formats as well as manipulate the data in the proceedings.

The I-Blue 747 is a mtk loging device. Rather than storing a gpx formated text file with the GPS information it does store that data in a binary file format. It is able to read the binary mtk information and write it to any of the supported gps data formats such as the popular gpx as well as the kml file being used by Google Earth.

1. Installation of gpsbabel
You can try to install gpsbabel using the software package manager that comes with your favorite Linux distro. When doing so under OpenSuse 11.0 it did install an oder version of gpsbabel which did not recognize the mtk file format. So I went to the gpsbabel website and downloaded a precompiled i386 binary which I then did install:

>rpm -Uhv gpsbabel-1.3.5-0.i386.rpm

2. Reading the data from the device
Most GPS data programs support the gpx file format. If you like to use the GPS data to add it as meta data to your images from a shoot this is the way to go in most case. In order to read from the device you will have to connect it via the USB mini cable and switch to logging mode. In the following example we will read the data and convert it on the fly to a gpx data file:

>gpsbabel -t -w -i mtk -f /dev/ttyUSB0 -o gpx -F OUTFILE.gpx

If you would like to do some houese keeping at the same time you can delete the data you have just read from the device, freeing the memory and have it spring clean for the next trip or shoot:

>gpsbabel -t -w -i mtk,erase -f /dev/ttyUSB0 -o gpx -F OUTFILE.gpx

If you need the same GPS data in different file formats, you can add another output option along with another output file. The next example will read the GPS data and convert it to a gpx file for geotagging. The second output section will create a kml file with which the trip can be viewed using google earth:

>gpsbabel -t -w -i mtk,erase -f /dev/ttyUSB0 -o gpx -F OUTFILE.gpx \
-o kml -F OUTFILE.kml

So there you go. I myself have banged together a little bash script that will download the data add a time stamp and save the data in a defined directory on my machine:

#Read the matk binary data from mtk device, such as an I-BLUE 747.
#Convert the data to gpx and kml format.
#Store the data in $HOME/Documents/gps adding a time stamp
#and a unique file identifier by adding the process ID of
#the script ($$) to the file name.

DATE=`date +%Y%m%d`

gpsbabel -t -w -i mtk,erase -f /dev/ttyUSB0 -o gpx -F $BASE/GPS_$DATE_$$.gpx \
-o kml $BASE/GPS_$DATE_$$.kml

Feel free to use and or modify the script to your personal needs. If the script burns down your house or kills your cat I am not to be hold responsible :-) You the script at your own risk!


Thursday, August 28, 2008

Datalogger 2.5 and the I-Blue 747 under wine

The I-Blue 747 GPS data logger is recognized as a serial device only and not as a USB mass storage device. Therefore the GPS data can not be accessed directly on the device. One way to get to the GPS data is via the datalogger software that comes with the device.

The software comes on a mini CD in the device package or can be downloaded from the transcend website.

Follow the following steps to install the software on your linux box:

1. Make sure that you have installed wine on your system. Please refer to your distro documentation to find out how to do this. For OpenSuse

>zypper install wine
executed as root will do the trick. Personally I do use the latest wine from cvs (version 1.1.3) provided by the OpenSuse build service on a daily basis.

2. Unzip the archive

>cd path/to/downloaded/file >unzip

3. Install the software

>cd TsiSetup
> wine DataLog.exe

4. Prepare wine for the new serial device

Connect the I-Blue 747 to a USB port using the provided USB mini cable. If you use a recent distro the device will be automatically detected, the appropriate kernel module (cp2101) will be loaded and a new serial device be created (/dev/ttyUSB0):

hub 2-0:1.0: unable to enumerate USB device on port 4
usb 3-2: new full speed USB device using uhci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
usb 3-2: New USB device found, idVendor=10c4, idProduct=ea60
usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-2: Product: CP2102 USB to UART Bridge Controller
usb 3-2: Manufacturer: Silicon Labs
usb 3-2: SerialNumber: 0001
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for cp2101
cp2101 3-2:1.0: cp2101 converter detected
usb 3-2: reset full speed USB device using uhci_hcd and address 2
usb 3-2: cp2101 converter now attached to ttyUSB0
usbcore: registered new interface driver cp2101
drivers/usb/serial/cp2101.c: Silicon Labs CP2101/CP2102 RS232 serial adaptor driver v0.07

Your wine setup is not aware of the new serial device, as the four serial ports com1 to com4 are connected to /dev/ttyS0 to /dev/ttyS3. You will have to remove one of the existing links and add a new one pointing to /dev/ttyUSB0:

>cd ~/.wine/dosdevices >rm -rf com2 >ln -s /dev/ttyUSB0 com2

Use one of the com ports don't matter which one. Pick one you don't use for anything else...

5. Start the application

Switch the device switch to the log position. And then start the datalogger application:

wine ~/.wine/drive_c/Program\ Files/LogTool/DataLog/DataLog.exe

You will be presented with a "Configuration" tab in which you will have to choose the com port you connected the /dev/ttyUSB0 to from the drop down list:

In my example that would be "com2". Click the "Connect" button to let the software talk to the device:

Under the menu entries on the left you can setup the device. You can specify GPS data to be stored, data formats, Save intervals and methods, and the like.

Under the "Satellite Information" tab you will be able to access the current inforamtion the device is currently pulling from the connected satellites:

As nice as all this is, the application under wine has one rather significant drawback. You can not get to your stored GPS data. Whenever I try to access any data on the device using the datalogger under wine, I miserably failed. The download window pops up and stays there until I kill the whole application using xkill. There was a report on how to use the applcaiton udner wine which is no longer available.

So if anybody is using the datalogger app under wine successfully. I would be happy to receive some pointers on what step you took to make this work.

Geotagging Your Images under Linux using the I-Blue 747

Knowing where you shot certain images can be of some value. GPS devices dropping in price and adding features while getting more precise will help you add that location meta data to your images.

I guess you have been there one way or the other. You went on a day trip and took hundreds of pictures. Getting back home the images file get transferred to the computer and sit there for some time. After a while you finally get to the images and start wondering where exactly did you take those pictures? Looking at a handful you might be able to remember. If you look and a couple hundred, you're screwed...

Geotagging will help you here. While being on a shoot, you carry around a GPS device, that will save the location data in defined time intervals. The logged location data can later be connected via the time stamp with your images.

I had been thinking for a while buying such a device but could be bothered choosing one. Browsing my regular photography forums I read about a new device, called the I-Blue 747, which supposedly sport more memory than others, is reasonably priced and was supposed to be a good buy, I went to ahead to eBay and got myself one of them I-Blues.

One of the main differences to many other GPS devices is, that the I-Blue does not present itself as a USB mass storage device when connected to your machine. Instead the GPS data can only be accessed using the software that comes with the device. Fine if you are on Windows or on a Mac but not so great if your are using Linux.

But low and behold there are quite some alternatives available. And in the coming days I will try to explore some of them:

1. The original I-Blue windows software using wine
2. bt747, a java application
3. gpsbabel
4. mtkbabel, a perl program
5. directly using the GPS information in geotag, a java geotagging application

So stay tuned to get some insight into how to use the I-Blue and get the most out of it under Linux.