Getting data from your serial GPS when your computer has no serial port

From OpenStreetMap Wiki
(Redirected from GPS Serial to USB)
Jump to navigation Jump to search

Your GPS has a serial port, but your computer only has USB. How are you going to get your tracklogs and waypoints? It is true that more GPS units are arriving with Bluetooth and USB interfaces, but the vast majority still uses the old RS232 serial interface. In the meantime you need to get a serial to USB converter that will allow you to use your GPS with Windows, Linux and Mac USB ports.

Technical aside: Converting Serial to USB turns out to be complex due to the way that USB devices work. Basically the Serial to USB converter includes a small computer (well, a microcontroller) that translates RS232 to USB, and back. Not all Serial to USB converters properly implement the whole RS232 specification. That's why these converters are more than you might think.

Serial to USB Adapters

Here are some devices that OSM people have used successfully:

  • U.S. Converters: USB to serial adapters: for Windows 7, Mac and Linux, FTDI Chipset and LED lights. The site provides lots of troubleshooting support.
  • EasySync: British company, their cables use FTDI chipset and support full flow control, flushing etc.
  • BAFO BF-810: there are drivers for Mac OS X, Windows and Linux [1]
  • Pfranc: they have a long page discussing their adapters, and both the good and the bad things about them at [2]. Drivers for Windows, Mac OS X, and Linux. They also provide the custom Garmin connectors that allow you to build your own data cables.
  • Keyspan serial-to-USB adapter: User:Richard uses one to connect his eTrex to his Mac - "the Mac drivers seem reliable and it's fairly compact". Use and search for 'keyspan usb serial' to find it at Dabs or (cheaper at £24.95) at Expansys [3].
  • Maplin also has some very cheap, such as this at £12.99, but they don't seem to support Mac or Linux.
  • The Gilsson USB to Serial DB9 Adapter is specifically branded as an adapter for Garmin GPS devices. The price tag from Gilsson is $44.95, but e.g. Germany-based sells it for €19.95. Works fine on OS X with a Garmin eTrex Vista and gpsbabel. [4]
  • The Eminent EM1116 works okay, but the installing process is a real pain.

The following instructions assume the BAFO BF-810, but the general principles will apply to other devices. You need to install the proper driver software and then determine the name of the 'port' or 'device' that your operating system gave to the GPS unit.

Serial to USB on OS X

Download the latest driver from the BAFO driver’s page at: Uncompress the file and install by double clicking on ProlificUSBSerial105.pkg. This should create the serial to USB device. You can check that this created the device in a terminal window:

ls -al /dev/cu*
crw-rw-rw-  1 root  wheel    8,   1 24 Sep 11:24 /dev/cu.modem
crw-rw-rw-  1 root  wheel    8,   3 24 Sep 11:28 /dev/cu.usbserial0

You want to use the cu.usbserial0 device.

Here is how to read GPS waypoints from a Garmin GPS using GPSBabel on a Mac. The device or file is specified with the -f parameter. In this case it is –f /dev/cu.usbserial0.

sudo gpsbabel –D9 -i garmin -f /dev/cu.usbserial0 -o gpx -F foo.gpx

This includes the debugging flag, -D9, so we will get lots of extra information to help confirm that the transfer is operating correctly.

Serial to USB on Windows

Download the latest driver for your version of Windows from the BAFO driver’s page at: Unzip it, and then connect the serial to USB adapter. The "Add New Hardware" wizard will likely see the new device. Give the wizard the location of the file that you downloaded and follow the instructions.

Once it is finished you can also test the GPS connection by setting your GPS to NMEA mode, then starting HyperTerminal (Start->Accessories->Communications->HyperTerminal). Create a new connection using com3 and setting the speed to 4800 bits per second. You should then start seeing NMEA sentences.

GPSBabel works the same across the three platforms with the exception of the operating system dependent way that you refer to serial ports. On Windows the serial to USB adapter maps the USB to a regular COM port: com3 in our example. To fetch waypoints from a Garmin GPS using the serial to USB adapter under Windows:

gpsbabel -D9 -i garmin -f com3 -o gpx -F waypoint.gpx

Serial to USB on Linux

The BAFO-810 uses the Prolific PL230 driver. Connect the USB to serial adapter while watching the system log in /var/log/messages or via the dmesg command. It should display 'PL-2303 converter detected' and create the device node /udev/ttyUSB0


sudo gpsbabel -D9 -i garmin -f /dev/ttyUSB0 -o gpx -F foobar.gpx
sudo gpsbabel -D9 -i garmin -f /udev/ttyUSB0 -o gpx -F foobar.gpx
sudo gpsbabel -D9 -i garmin -f usb: -o gpx -F foobar.gpx

The first of these commands also works for the Belkin Adapter F5U109 and the Geko 201 under Ubuntu 8.04. The system log shows 'MCT U232 converter now attached to ttyUSB0' when the adapter is connected.

To get user access (above example uses root access via sudo), for example add your user to the group uucp (sudo gpasswd --add yourusernamehere uucp) and relogin. This assumes that the group uucp exists and has rw permissions on this tty device (to check: ls -l /dev/ | grep ttyUSB →results in→ crw-rw---- 1 root uucp …).

To use the serial port under wine you need to map it – see wine#Serial connection.


Under all three platforms GPSBabel will sometimes have trouble connecting to the GPS (this is true even when it is directly connected to the serial port). The common error is:

GPS_Packet_Read: No DLE
GARMIN:Can't init com3

The port specified will vary with operating system. Under Windows USB it will be com3, A Linux serial port is /dev/ttyS0, or /dev/ttyUSB0 for USB, and /dev/cu.USBserial0 for a Mac OSX USB port.

If you retry, sometimes 4-5 times, it seems to finally 'get it' and start transferring data. The -D9 switch to GPSBabel enables the display of debugging information. If you have trouble, try turning your GPS off and back on. Some GPS units will show you the progress of their data downloads and uploads. On the Garmin III Plus this is displayed from Menu->Setup->Interface. The Garmin Rino does not show the status of the data transfer.

You can now connect with your serial GPS even without a serial port!

Problems with USB Adapter: pl2303 under Linux

If you have No DLE Error under Linux, it helps to update your Kernel to 2.6.16.

See also: