Wednesday, January 9, 2008

Getting EasyGPS 1.3.7 Working in Linux

Note: This guide only applies to the older, 1.3.7 version of EasyGPS. You can download it here.

Note 2 (4/22/08): EasyGPS 1.3.7 is no longer available for download from the developer. I have a copy you should be able to download here if you need it. Also, please go to Old Apps and Old Version and request they archive it too. I've sent them both a copy but it has not made it in their archives yet.

Update 3 (10/11/08) : Here is a new EasyGPS 1.3.7 download link! Also, I've tried newer 2.7
.x, 2.8.x and 2.9.x versions of EasyGPS with Wine 1.1.6 and the existing problems are still there so this looks to be your best option still.

I've spent some time recently getting an older version of EasyGPS working in Linux. Now all you Geocachers and GPS lovers can have a good all in one application to manage waypoints and transfer them to and from your GPS in Linux.

These instructions are based on wine 0.9.52 (12/28/07), EasyGPS 1.3.7, Ubuntu 7.10 and an eTrex Legend (serial) or GPSMap 60CSx GPS (usb) receiver. The Linux distribution and version likely will not matter. Any recent version of wine should be ok too but there may always be a regression bug or 2 in any release that may break something. Unfortunately, I also don't have any other GPS receivers to test this but feel free to buy me one. I'd prefer a Magellan for the variety since all I have now are Garmin. :-) I imagine any other serial GPS will work the same though. I have no idea about USB support for other brands.

Running Windows programs is made possible by Wine. If you are already here, I am going to assume you have wine installed. If you don't then install it. (or use these instructions to get the latest Wine in Ubuntu) I am running wine 0.9.52, the latest as of this writing, and you may or may not have problems with newer or older versions.

Install and Setup EasyGPS First

The first step is to download the older Windows 98 compatible EasyGPS 1.3.7. The newest version still has too many problems under wine. Then install it like you would any other Windows/wine application by double clicking on the icon or running:

wine SetupEasyGPS98.exe


Don't have the application start automatically after installation, or if it does, just close it. We will get back to the application soon.

The next step is to setup your serial ports if you haven't already. You will need to open a terminal if you don't already have one open and then do this:

cd ~/.wine/dosdevices
ln -s /dev/ttyS0 com1
ln -s /dev/ttyS1 com2
ln -s /dev/ttyS2 com3
ln -s /dev/ttyS3 com4
ln -s /dev/ttyUSB0 com5

Those commands will map your Linux serial ports to show up as Windows serial ports by creating symbolic links. You likely will not need com3 or com4 and possibly will not need com2 but it doesn't hurt to have them. Also, com5 is pointing to the USB to serial device that I use for my USB GPSMap 60CSx. /dev/ttyUSB0 will not exist unless your GPS is currently connected but it is ok to create the symbolic link even if it is not there. Your ~/.wine/dosdevices directory should then look similar to this:


Now, run EasyGPS. Go to File -> Preferences to configure your GPS receivers.


Once you select and add your GPS, you will see a dialog to select the way the GPS is connected to your computer (which serial port or USB). This is where the problems come into play. The way EasyGPS determines your available com ports does not currently work in wine. Note: If you are able to select a com port at this point, then do that and stop reading this because the bug is fixed.

On this screen you don't have to do anything unless you are using a USB GPS. If you are using a USB connection, uncheck the USB checkbox (since we are using USB over serial, EasyGPS will see it and communicate with it as a serial port). The dialog will look like the images below as serial and USB respectively.




After adding my 2 GPS receivers, the preferences dialog looks like so:


The Work Around Part

Now we can get around to the actual work around. Even though EasyGPS can not see the com ports inside the application, it stores the configured port in the registry. All we have to do is open up regedit from your terminal.

regedit

Once regedit is up, navigate to the key HKEY_CURRENT_USER\Software\TopoGrafix\Common\GPS Receivers where you will see your configured GPS receivers. For each, you need to change the com port from -1 to the com port your GPS is connected to. Change the value by double clicking on it or right click and select Modify.

Most serial GPS receivers will be connected to com1. If you configured /dev/ttyUSB0 to go to com5 as I did above, then set your USB GPS to com5. For my setup, the serial connected eTrex Legend is connected to com1 and the USB GPSMap 60CSx is connected as com5.

(Note: I tried setting the BaudRate for the USB GPS to 115200 and 57600 but neither of those changes made transfers faster. I am confident the USB transfer could be faster because the GPS beeps indicating the transfer is complete well before all the waypoints are fully downloaded so I think the hold up is just the serial part of the translation. It isn't slow enough, yet, for me to spend any more time on it though.)

Be sure to restart EasyGPS so it will read in your com port changes and that is all there is to it! Have a blast transferring waypoints to and from EasyGPS!


Ubuntu Desktop Screenshot of the Day #4

Victory! This is a screen shot I took transferring waypoints from my GPS using EasyGPS running under wine. All the details will be in a post that will soon follow this one.


As you can see there are a ton of icons on my desktop. That is from actually using Linux. I am messy and leave lots of icons on my desktop all the time on any OS I use. The theme is the default Ubuntu 7.10 Human theme (I switched to that for some other tutorial screen shots) and the background is a picture I took in Switzerland of the Mönchsjoch hut next to Mönch, near Jungfrau and near the top of the Aletsch Glacier. Go there! Take the train! It is beautiful!!

Tuesday, January 8, 2008

EasyGPS in Linux Using Wine

Update: Read my EasyGPS in Linux tutorial to get it working. This is for an older version of EasyGPS though.

I haven't posted as much lately because I've gotten into a side project. I am now the Wine AppDB maintainer for EasyGPS. EasyGPS is an application used to manage and transfer waypoints to and from GPSs. I use it all the time for Geocaching.

Unfortunately in Linux, there aren't any great solutions that I have found that are like EasyGPS. Linux has an assorted set of tools, the most useful and well known being gpsbabel, but I have not found an EasyGPS replacement. GPSBabel runs on Windows too by the way.

So I decided I would try EasyGPS out on wine. The latest version, 2.7.5, didn't work very well. It locked up and threw errors all over the place. There are definitely some implementations missing or wrong there. I was able to eventually ignore those problems, connect to my GPS and transfer waypoints from my GPS but then it threw errors again. I am guessing part of the problem is the use of the XML based GPX format and the incomplete msxml3 implementation. After downloading waypoints, nothing shows up except for error dialogs.

I also found an old version of EasyGPS that is the last supported version on Windows 98 or earlier. This version, 1.3.7, works great. Everything works except the crucial part of transferring waypoints to and from your GPS. This is because the code that finds the available serial ports always returns empty. I emailed support and had a very helpful email dialog with developer Dan Foster who clued me into some of the api calls that were breaking on me in both versions.

In my investigating, I haven't figured out exactly why no serial ports are showing up but I did figure out a great work around to get the older 1.3.7 version working almost perfectly. I plan to post detailed [EasyGPS 1.3.7 in Linux instructions] to that in a later post this week.

I also hope to get to working on getting all these issues resolved so Linux Geocachers can easily use the latest EasyGPS and its sister products ExpertGPS and GeoBuddy.

I've already installed git, gcc, flex, bison and several dozen -dev packages so that I can build wine myself. I was surprised how easy getting and building the latest wine was. Now all I have to do is figure out some of these little pieces of the Windows API.

And because I can, here are my Geocaching stats: View my Profile

Sunday, January 6, 2008

Collaborative Debugging Tools Eh?

I spent a good bit of time yesterday playing with wine and a few applications I'd really like to get running like EasyGPS. I figured the wine irc channel would be a good place for help. While in there, I was noticing people kept posting urls to configuration files. Turns out there are numerous sites that allow you to upload snippets of text from code, to config files to debug output for sharing over email, irc, im, etc. You can also select the text type on most of these sites and it will format it and use colored syntax highlighting. I am really wondering why I have never seen these sites before??

And if you want to use some of the collaborative debugging sites, you can find them here, here, here, here, here, here, here, and here. Many of these are running the same software too by the way.

Friday, January 4, 2008

SkiFree Rules! Thanks For The Nostalgic Times Wine!

I was working on setting up Samba tonight so my wife could access content from my system (more on that later) and I stumbled across a little application shared in My Documents on her system (my old one). It was none other than SkiFree!!!!!

SkiFree was released way back in 1991 as part of the Windows Entertainment Pack. I don't even remember what ele was included in that because SkiFree was by far the BEST of the games. I think I have a floppy disk around here somewhere with the entertainment pack on it. Of course, finding a floppy drive to read the disk would take some work.

Anyway, SkiFree was released in the Windows 3.0 days. Windows 3.1 would not be released until early 1992. I remember playing this on the only Windows 3.0 system I ever used in my 8th grade yearbook class when I wasn't stuck laying out pages in PageMaker (3.1 had been released by this time but that was the only install of Windows 3.0 I ever saw/used).

I have also been playing with Wine (Wine Is Not and Emulator) a bit more lately too. (Yes, that is a recursive acronym just like GNU, bunch of nerds!) When I discovered ski.exe, I figured why not give it a go. And boy did it go. It turns out, SkiFree is a platinum rated application running on Wine. That is as good as it gets. I also found out that my old crappy SkiFree 1.0 is only compiled for 16bit Windows and the author fixed some bugs and recompiled it for 32bit systems in October 2005. Sweet!


So thank you Wine team for implmenting all those API calls from Windows 3.0 so that SkiFree could run. And for all of you out there who want to play it yourself, it is freeware now! Go download SkiFree from the author's site and read up on some history of the application and his licensing it to Microsoft for 100 shares of stock (I hope he hung on to them for a while).

Wednesday, January 2, 2008

Ubuntu Desktop Screenshot of the Day #3

Today is going to be a busy day at work catching up with everything that piled up over the holidays so I am going to be lazy and go ahead and post another desktop screen shot. This is one from my laptop and the first SSotD from it. The laptop is a Pentium M 1.4 GHz with 512MB of RAM.

Isn't it awesome that a Sudoku game comes with Gnome by default? 16 games come with Gnome out of the box actually. That sure is a lot better than just a stupid minesweeper and solitaire game! I just wish I didn't suck so bad at sudoku. But then again, my wife stole my sudoku book that I got last Christmas and did all the puzzles in it before I got a chance to get good.

It also would be nice to watch an episode of The Office one day and see Pam playing Gnome Sudoku instead of boring old Windows solitaire. Pam is a sudoku master after all: "Suduko. Level moderate, 18 minutes. Suck on that, Halpert." She sure wouldn't have gotten that virus while trying to download a celebrity sex tape if she was running Linux either.

Ah yes, and the background is GNOME Flowers.

Tuesday, January 1, 2008

Running the Latest Version of Wine in Ubuntu

I've been trying to get some applications to work in Wine today. I was working on submitting an application to the Wine Application DB but the version of Wine that comes with Ubuntu 7.10 was not listed. Wine puts out releases rather frequently so they don't wont to bother with old versions and possibly old and now resolved issues. The current version of Wine is 0.9.52 but I was running 0.9.46 with no default update from Ubuntu. The Wine AppDB submission form would only accept applications tested as far back as 0.9.47.

I did find an easy way to upgrade my copy of Wine to the latest release though. All you have to do is uninstall the current version of Wine, add a repository, and then in Synaptic Package Manager, add the new version of Wine back. All the details of updating it can be found in this Ubuntu Forum.