splitbrain.org

electronic brain surgery since 2001

navilink.pl

navilink.pl is a Perl script implementing the NAViLINK communication protocol spoken by the Locosys BGT-11 and GT-11 GPS devices (aka. NaviGPS) and its successors BGT-31 and GT-31 . It allows you to download and upload data like waypoints and tracks from and to the device through a USB connection.

Download

The following link always points to the most up to date release of the script:

navilink.pl is licensed under the BSD License. Besides Perl, the Device::SerialPort module needs to be installed to run the script.

Usage

To use the navilink.pl script, you need to connect the GPS device to your USB port and switch into the “Navilink mode”, then call the script with a command and optional additional parameters.

Parameters

Running the script without a command or the -h parameter will print a short usage help.

navilink.pl uses the GPX format for uploading and downloading data. By default data is read from STDIN and written to STDOUT, you can use files instead by specifying the -i or -o parameters.

If your GPS is not connected to /dev/tttUSB0 you can specify the correct device name with the -d parameter.

After finishing the given task, navilink.pl will not close the “navilink mode” on the device, so you can continue calling the navilink.pl script with additional commands. To close the communication after finishing the command, specify the -q parameter on the command line.

Developers might be interested in the -v switch which enables hexdumps of all packets sent to and received from the GPS.

The waypoint upload function detects geocaching.com GPX files automatically. It strips the GC prefix from waypoint names to avoid truncation of the name.

Commands

Only one command can be given per call.

  • info prints some information like firmware version, serial number and amount of stored data
  • getwp downloads all waypoints from the device and outputs them as GPX data
  • delwp deletes all waypoints from the device
  • putwp uploads waypoints given in GPX format to the device
  • updwp like putpw but ignores waypoints which exist on the device already
  • remwp removes waypoints given in a GPX file from the device
  • gettp downloads all track points from the device and outputs them as GPX data
  • deltp deletes all track points from the device
  • getlog downloads the data from the internal data logger found in the new BGT/GT-31 devices

Uploading track points and handling routes is not supported, yet.