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
- Create the folder: C:\Work\GPSCommunicator\. This is where the
programs parts will reside. It's referenced by the two
shortcuts.
- 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
- 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.
- 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
- 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:
- Edit - opens window to edit the selected waypoint.
- New - opens window to create a new waypoint.
- Move Up - moves the selected waypoint up 1 line.
- Move Down - moves the selected waypoint down 1 line
- Delete - deletes the selected waypoint from the list
- Save - saves the current list of waypoints to a disk file. See
the File|Set Save filename... menuitem on the main panel
for setting the filename.
- Copy to work - will copy the selected waypoint to the Work
window which is created by the File|Create Wpts Work File item.
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:
- File
- PlotWP - will display these waypoints on a plot.
- Edit
- Find
- Find Next
- Copy - copies selected waypoint for pasting later
- Cut - copies selected waypoint for pasting later and
deletes it
- Paste - pastes copied waypoint after selected waypoint
- Endleg - inserts a End Of Leg record after the selected
waypoint
- Info
- Show Info - displays information about the waypoint
entry: Description, filename and owner.
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:
- New Wpts File... - Creates new Edit window to create waypoints
in
- OpenWpt File... - Opens an existing waypoints file in an Edit
window. Note only one of the these two windows can be open at one
time.
- Create Wpts Work File - Creates an Edit window that waypoints
can be copied to from other windows.
- Select Active window... - Allows you to chose which window
will be used for uploading from or other updates done by the
program.
- Set Save filename... - Presents a dialog to allow you to set
the filename that the active window will be written to if its
Save button is pressed.
- Close - Closes the active window??
- Exit - Exits the program
GPS:
- Open GPS - Opens connection to the GPS using the serial
port.
- Display NMEA... - Will read and display NMEA output from the
GPS. The GPS must be configured to output NMEA data.
- Read Wpts from GPS - Will read all the waypoints from the GPS
and display them in an Edit window.
- Display Wpts - Will re-display the Edit window of GPS
waypoints.
- Read Rtes fm GPS - Will read all the routes from the GPS.
- Display Rte... - Will allow you to select which route is to be
displayed in an Edit window.
- Read tracklog from GPS - Reads the tracklog waypoints and
displays them in an Edit window.
- Write Wpts to GPS - Writes the waypoints from the active
window to the GPS.
- Write A Route to GPS... - Asks for route number to use and
then writes a route to the GPS using the waypoints from the active
window.
- Write tracklog to GPS - Not implemented!
- Abort transfer - will stop writing to the GPS.
- Close GPS - Closes the connection to the GPS.
Options:
- AutoCreate WptName - Will try to create a valid GPS name for
the waypoint . The name is stored in the waypoint name following
the letters: &GPS=
- Allow Write - When this is not checked, the program
will do all the checks of the waypoints it normally does, but will
not write to the GPS. This is useful to when testing or checking
the validity of your waypoints before writing them to the GPS.
When checked, writes to the GPS will proceed.
- Set GPS... - Use this to chose the type of GPS you are
using.
- Clear Log - Clears the contents of the Status log.
- Save .ini on exit - When checked, the program will write a new
.ini file (see above) containing any changes you have made.
- Save console to file - This item only appears if you use the
command option: -WrtCons. Its used to save error messages
written to the console in a log file.
There can be a menu item for a particular GPS:
Micrologic:
- Assign waypoint numbers - Will assign waypoint numbers
starting at the next available one to the waypoints in the active
window.
- Change waypoint name,etc for matching positions - Will change
the name, etc of waypoints in the active window to match those at
the same position that were read from the GPS. This option could
be used when resaving routes after reloading waypoints with new
waypoint numbers.
- Set waypoint numbers...- Sets all the waypoint numbers for
waypoints in the active window to numbers starting at the user
entered number.
- Clear waypoint numbers - Clears all the waypoint numbers in
the active window.
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.
- -debug # Create lots of output on the console for
problem solving.
- -JVIEW # Changes prompts for use with the JVIEW
program.
- -MsgsOnLog #Warning messages go to the log vs in their
own window
- -WrtCons #All messages being written to the console
also are written to a disk file.
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