This site hosted by Free.ProHosting.com
Google

Installation | Operating | Menus | Disclaimers | Getting Java

Norm's GPS Communicator

This downloadable zip file contains a java program that will communicate with a Garmin 12XL GPS (and models: 126, 128, 48, II Plus) via your computer's serial port. It uses the same format files as my Waypoint applet . It's about 260Kb in size.
This program was written to the specifications in Garmin's GARMIN GPS Interface Specification which was downloaded from www.garmin.com/support/commProtocol.html.



Installation instructions

  1. Create the folder: C:\Work\GPSCommunicator\. This is where the programs parts will reside. It's referenced by the two shortcuts.
  2. Unzip the downloaded zip file into C:\Work\GPSCommunicator\. There are 11 files:
    • comm.jar - Contains Sun's class files
    • GPSDevComm.jar - contains the program files
    • GPSDeviceCommunicator.ini - the program parameter file.
    • DocumentViewerWParser.jar - contains the help program files
    • win32comm.dll - Sun's serial port communication program
    • GPS Device Communicator - Shortcut to execute the program using Sun's Java interpreter.
    • GPS Device using JVIEW - Shortcut to execute the program using Microsoft's JVIEW program.
    • javax.comm.properties - Used by Sun's serial port code.
    • 3 icon files: *Icon.jpg - These go on the upper left of the windows


  3. Copy win32com.dll to the C:\Windows\ folder. This file must be on your command search path. Please let me know if you already have this file.
     
  4. Modify the GPSDeviceCommunicator.ini file to suit your needs. It contains Name=value pairs that you can set by editting with Notepad or Wordpad. Set Owner= to your name. For example: Owner=George

    Following is a list of the .ini file Names with their default values (comments follow the #):

    • GPSBrand=Garmin # Later versions could allow Magellan or Icom or ??
    • SerialPort=1 # or 2 if you're using serial port 2
    • AllowUpLoad=Yes # =No will not allow writes to the GPS
    • BaudRate=9600 # what you serial port baud rate is
    • Owner=Somename # This is the name that will be written to disk file
    • ShowMsgsOnLog=Yes # Messages will be written to the log vs its own window
    • TimeOutMS=1000 # set how long (in millisecs) to wait for a response from the GPS
    • WaypointsDir=last directory used with a waypoints file


     

  5. Copy the shortcuts (extension = .LNK) to your desk top. Or they can be clicked on/executed where they were unzipped. These shortcuts can be tailored by right clicking them and selecting Properties and choosing the Shortcut tab and changing the displayed fields: Target or Start In.
    •   Target - contains the command that is to be issued. You would add -options here. A Target value if you're using Java 1.1:
         <javaPath>\bin\java.exe -classpath <javaPath>\lib\classes.zip;GPSDevComm.jar;DocumentViewerWParser.jar;comm.jar;. WayPointApps.GPSDevices.GPSDeviceCommunicator -debug -MsgsOnLog -WrtCons
        where <javaPath>\ is the path to the Java 1.1 files.
      If you are using Microsoft JVIEW:
         C:\WINDOWS\jview.exe /cp GPSDevComm.jar;DocumentViewerWParser.jar;comm.jar WayPointApps.GPSDevices.GPSDeviceCommunicator -debug -MsgsOnLog -WrtCons -JVIEW
      If you are using Java2 then the Target value is:
         C:\WINDOWS\java.exe -jar GPSDevComm.jar -debugXX -WrtCons

    •   Start In - contains the path to the folder where all the program parts are. For example: E:\Work\GPSCommunicator



Operating instructions

Connect the GPS to its cable (for the Garmin the cable part no. is 010-10141-00) and connect that cable to a serial port on your computer. Be sure the SerialPort= value is set to the port you are using (usually 1 or 2).

Start the GPS. I set it to Simulator mode in the Setup|System menu. Go to the Setup|Interface menu to watch for messages from the GPS. The top line should say GRMN/GRMN and the seond line HOST. If the interaction with the computer gets hung and the GPS hasn't completed its transfer of packets, page up to the Setup menu and return to the Interface menu. Then select the second line down, press enter and change the display until it says HOST and press Enter.

On your computer, click on one of the shortcuts to start the program.

Select the GPS|Open GPS menu item to connect to the GPS. If you get an error message, check all your connections and the contents of the .ini file.
If no luck contact me at radder@hotmail.com.

After a successful connection, read the waypoints from the GPS into the computer's memory by selecting the GPS|Read Wpts from GPS menu item. You'll get a display that contains all the waypoints.

Read all the Routes from the GPS by selecting the GPS|Read Rtes fm GPS menu item. The routes will be read and saved in memory. You can look at individual routes by selecting the GPS|Display Rte... menu item and selecting the route you want.

Updating and saving waypoint files

To edit an existing waypoints file (they have extension of .wps) use the File|Open Wpts file... menu item to open it. After opening, the waypoints will be displayed in an Edit window with a menubar, an input area for the description, a list of the waypoints, some buttons and display areas.
Each waypoint is displayed as a single line without formatting. To make changes, select a line and click the Edit button.


The Edit window buttons:


At the bottom are three more buttons used to compute the course and distance between two waypoints in the list.


The Edit window menu bar items:

To edit a waypoint, select it and press the Edit button. You'll get a new window that formats the waypoint and allows each field to be changed. After making your changes press the Save button to save the changes.

To create a new waypoint file use the GPS Communicator File|New Wpts... menu item. Be sure to use the extension wps. You'll be prompted for the filename and a description of the file before being placed in the Waypoints edit window described above. Add your waypoints and press the Save button to save them to disk.


Writing Waypoints and Routes to your GPS

After reading all the Waypoints and Routes from your GPS, open a Waypoints file from your disk using File|Open Wpts File....The waypoints will be displayed in an Edit window. If there is more than one Edit window open, be sure to use the File|Select Active window item to select the one to be written.
Select the GPS|Write Wpts to GPS to write all the waypoints from the active window to the GPS
or select GPS|Write A Route to GPS... which will prompt you for the route number to use when writing the route.

For Garmin you can watch the screen of the GPS to see the progress of the write.

Verifying successful writing of Waypoints to the GPS

On some GPSs there is no feedback that the write of a waypoint was successful. To verify that the waypoints were successfully written, read all the waypoints from the GPS again and verify that the new one(s) are there. If there a several to be checked, an easy way to do the verification is to try to write the original waypoints again as a route. The program will check that all the waypoints are on the GPS and give an error message if any are not there. Before doing the write turn off the Allow Write flag to prevent the route actually being written.


Menu Items

File:

GPS:

 

Options:

There can be a menu item for a particular GPS:

Micrologic:


Command line options

You can tailor how the program works by adding any of the following options following the -debugXX word in either shortcut. See above. Any options ending with XX are ignored. Removing the XX from -debugXX will produce a lot of output useful for solving a problem.

Both the java and JVIEW commands have a black console in addition to the GPS Communicator window. I use that console to write informational messages that help in solving problems.



Disclaimers

Use this program at your own risk. I don't know of any way it can harm your GPS other than overwriting any existing Waypoints or Routes. The program does several tests before writing to the GPS to be sure that you are not going to overwrite anything. You should save all your waypoints to your computer before trying to write any. By setting the .ini file parameter: AllowUpload=NO the program won't try to write to the GPS.



Getting a Java interpreter

If the Microsoft JVIEW program doesn't work for you (there are old versions that don't) then download and install Sun's java interpreter. If you use the -JVIEW commandline option, the prompts for Filenames will be very simple and won't check if the file exists. A quick fix on my part to allow the program to work with JVIEW.


A Java interpreter is a free download from the Sun java site: java.sun.com/products/jdk/1.1/jre/download-jre-windows.html. Look for the Java Runtime Environment (JRE) download. It's over 3Mb of data. Be sure to print off and follow the installation instructions.

A better but larger (5M) version of Java is downloadable from java.sun.com/products/jdk/1.2/jre/.

Last updated 16 November 2002