[GRASS-user] v.in.gpsbabel, Garmin USB and Macintosh

Hi all.

I am trying to download gps data using v.in.gpsbabel. I have a Garmin C60 gps and am using Grass 6.3CVS on mac os 10.4. I am using the USB connection.

The gpsbabel application on its own works.

When I try v.in.gpsbabel I get.

Downloading Tracks from GPS
[ERROR] XSERIAL: Cannot open serial port '/dev/cu.usbserial0': ?ÿç No such file or directory
[ERROR] Cannot open serial port '/dev/cu.usbserial0'
GARMIN:Can't init /dev/cu.usbserial0
v.in.gpsbabel: Error retrieving data

I have tried many device names including those in the help pages. /dev/cu.usbserial0 in the above example was from http://wiki.openstreetmap.org/index.php/MakingGpxTracks

Has anyone had success with this combination? What device name works?

Thanks for your help.

Dave

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

perhaps a stupid suggestion, but have you tried:?ls -l
/dev/*usb*???pc??Dave Kent ha scritto:?> ?> Hi all.?> ?> I am trying to
download gps data using v.in.gpsbabel. I have a Garmin?> C60 gps and am
using Grass 6.3CVS on mac os 10.4. I am using the USB?> connection.?>
?> The gpsbabel application on its own works.?> ?> When I try
v.in.gpsbabel I get.?> ?> Downloading Tracks from GPS?> [ERROR] XSERIAL:
Cannot open serial port '/dev/cu.usbserial0': ?ˇÁ No?> such file or
directory?> [ERROR] Cannot open serial port '/dev/cu.usbserial0'?>
GARMIN:Can't init /dev/cu.usbserial0?> v.in.gpsbabel: Error retrieving
data?> ?> I have tried many device names including those in the help
pages. ?> /dev/cu.usbserial0 in the above example was from ?>
http://wiki.openstreetmap.org/index.php/MakingGpxTracks?> ?> Has anyone
had success with this combination? What device name works??> ?> Thanks
for your help.?> ?> Dave?-- ?Paolo Cavallini?email+jabber:
cavallini@faunalia.it?www.faunalia.it?Piazza Garibaldi 5 - 56025
Pontedera (PI), Italy Tel: (+39)348-3801953?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFE4E3/NedwLUzIr4RAuFsAJ4mulCcdBEJTbIz8y7hb01iGnIgwQCfeeJp
bHYjmlDV4739iYHbvCiQBb0=
=ld5a
-----END PGP SIGNATURE-----

I've tried some gpsbabel stuff on Mac OS X. I have a Magellan MAP 330, it's serial, so I need to run in thru a USB-Serial converter. So far not much luck with gpsbabel, tho I can get it to work with other Mac GPS apps. I don't have a USB GPS device to test.

I don't see any *usb* devices, like Paolo mentioned, even cu.usb*. I guess usb keyboards and mice get their own special naming, and the usb-serial converter is cu.USA19QW3d1P1.1. You could try ls -l cu.* instead to see what's there, maybe the Garmin is named without 'usb'. Try it before and after the Garmin is plugged in.

What gpsbabel are you using? The GPSBabel+ you can find for Mac OS X, or your own build? Which version? PPC or Intel Mac? That GPSBabel+ is PPC-only, and may have problems running thru Rosetta on Intel Macs (it shouldn't).

On Sep 22, 2006, at 12:45 AM, Dave Kent wrote:

Hi all.

I am trying to download gps data using v.in.gpsbabel. I have a Garmin C60 gps and am using Grass 6.3CVS on mac os 10.4. I am using the USB connection.

The gpsbabel application on its own works.

When I try v.in.gpsbabel I get.

Downloading Tracks from GPS
[ERROR] XSERIAL: Cannot open serial port '/dev/cu.usbserial0': ?ÿç No such file or directory
[ERROR] Cannot open serial port '/dev/cu.usbserial0'
GARMIN:Can't init /dev/cu.usbserial0
v.in.gpsbabel: Error retrieving data

I have tried many device names including those in the help pages. /dev/cu.usbserial0 in the above example was from http://wiki.openstreetmap.org/index.php/MakingGpxTracks

Has anyone had success with this combination? What device name works?

Thanks for your help.

Dave

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

Thanks for your and Paolo's help.

GPSBabel+ works real fine on it's own. I am using the sourceforge 1.3.0 binaries for PPC on a G5 PPC machine. Grass is your 6.3CVS binaries. (Thanks)

I can use GPSBabel+ directly to download from the gps device and save in GPX format. I can then import the GPX format with v.in.gpsbabel. The data goes in as points in the Location's coordinate system. I had thought (and hoped) from the documentation that track data would import as an arc. I need to work on this.

The attribute columns are in the format (in grass) of easting, northing, elevation, day, time, and a blank column

Nonetheless, I can get the job done.

I stumbled across utility USB prober on the system. It sees the Garmin device with partial output as follows:

Full Speed device @ 5 (0x4B120000): ............................................. Vendor-specific device from Garmin International
     Device Descriptor
         Descriptor Version Number: 0x0110
         Device Class: 255 (Vendor-specific)
         Device Subclass: 255 (Vendor-specific)
         Device Protocol: 255
         Device MaxPacketSize: 64
         Device VendorID/ProductID: 0x091E/0x0003 (Garmin International)
         Device Version Number: 0x0001
         Number of Configurations: 1
         Manufacturer String: 0 (none)
         Product String: 0 (none)
         Serial Number String: 0 (none)

I could not get a response with ls -l cu.* I assumed this was from the console.

I listed /dev/ as per Paolo's note. There are many devices but none with "usb" in the names.

I am pretty much at a loss in discovering the device name, but it is not too much of an extra step to go through an intermediate file.

Thanks again.

Dave

On Sep 22, 2006, at 9:31 AM, William Kyngesburye wrote:

I've tried some gpsbabel stuff on Mac OS X. I have a Magellan MAP 330, it's serial, so I need to run in thru a USB-Serial converter. So far not much luck with gpsbabel, tho I can get it to work with other Mac GPS apps. I don't have a USB GPS device to test.

I don't see any *usb* devices, like Paolo mentioned, even cu.usb*. I guess usb keyboards and mice get their own special naming, and the usb-serial converter is cu.USA19QW3d1P1.1. You could try ls -l cu.* instead to see what's there, maybe the Garmin is named without 'usb'. Try it before and after the Garmin is plugged in.

What gpsbabel are you using? The GPSBabel+ you can find for Mac OS X, or your own build? Which version? PPC or Intel Mac? That GPSBabel+ is PPC-only, and may have problems running thru Rosetta on Intel Macs (it shouldn't).

On Sep 22, 2006, at 12:45 AM, Dave Kent wrote:

Hi all.

I am trying to download gps data using v.in.gpsbabel. I have a Garmin C60 gps and am using Grass 6.3CVS on mac os 10.4. I am using the USB connection.

The gpsbabel application on its own works.

When I try v.in.gpsbabel I get.

Downloading Tracks from GPS
[ERROR] XSERIAL: Cannot open serial port '/dev/cu.usbserial0': ?ÿç No such file or directory
[ERROR] Cannot open serial port '/dev/cu.usbserial0'
GARMIN:Can't init /dev/cu.usbserial0
v.in.gpsbabel: Error retrieving data

I have tried many device names including those in the help pages. /dev/cu.usbserial0 in the above example was from http://wiki.openstreetmap.org/index.php/MakingGpxTracks

Has anyone had success with this combination? What device name works?

Thanks for your help.

Dave

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

On Sep 22, 2006, at 10:19 PM, Dave Kent wrote:

Thanks for your and Paolo's help.

GPSBabel+ works real fine on it's own. I am using the sourceforge 1.3.0 binaries for PPC on a G5 PPC machine. Grass is your 6.3CVS binaries. (Thanks)

I can use GPSBabel+ directly to download from the gps device and save in GPX format. I can then import the GPX format with v.in.gpsbabel. The data goes in as points in the Location's coordinate system. I had thought (and hoped) from the documentation that track data would import as an arc. I need to work on this.

Look at what you select for the port in GPSBabel+, and use that for v.in.gpsbabel (add cu. to the beginning of that name, or /dev/cu.)

I could not get a response with ls -l cu.* I assumed this was from the console.

Oops, that should be ls -l /dev/cu.* And that's in the Terminal (I assume that's what you meant by console ^_^)

I listed /dev/ as per Paolo's note. There are many devices but none with "usb" in the names.

I am pretty much at a loss in discovering the device name, but it is not too much of an extra step to go through an intermediate file.

With the corrected ls above, it's possible that the Garmin device gets its own special name without 'usb' in it.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe

Dave Kent wrote:

I had thought (and hoped) from the documentation that track data would
import as an arc.

Yes, tracks and routes should import as an arc.

You need to add a flag to gpsbabel to get a track, not points, did you use
the gpsbabel "-t" flag?

from the script:

# How to do it
#
# gpsbabel [options] -i INTYPE -f INFILE -o OUTTYPE -F OUTFILE
# gpsbabel [options] -i INTYPE -o OUTTYPE INFILE [OUTFILE]
#
#(GPX file example):
# gpsbabel -w -i gpx -o xcsv,style=grass_write_ascii.style outfile.csv

...

if [ $CREATE_POINTS -eq 1 ] ; then
    echo "Downloading Waypoints from GPS" 1>&2
    gpsbabel -w -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o xcsv,style="$STYLE" -F "$TMP".gpst
    EXITCODE=$?
else
    if [ $RTE -eq 1 ] ; then
        echo "Downloading Routes from GPS" 1>&2
        gpsbabel -r -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o gpx,style="$STYLE" -F "$TMP".gpx
        EXITCODE=$?
    fi
    if [ $TRK -eq 1 ] ; then
        echo "Downloading Tracks from GPS" 1>&2
        gpsbabel -t -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o gpx,style="$STYLE" -F "$TMP".gpx
        EXITCODE=$?
    fi
fi

Hamish

I transferred the points in two steps.

Step 1. Download from the GPS handheld to a file using GPSBabel+ application for OSX. This was the only way I could get a USB connection to work. I used the 'Tracks' option from GPSBabel+ and file format GPX XML. I cannot find an appropriate device name to download directly with v.in.gpsbabel.

Step 2. Import the GPX file using v.in.gpsbabel.
When I do this without the '-t' flag, it imports points correctly but no tracks.

When I use the '-t' flag I get errors

Following is the terminal command and the first few lines of the error messages.

GRASS 6.3.cvs > v.in.gpsbabel -t input=/users/davekent/GarminGPX output=TestH format=gpx --overwrite

Downloading Tracks from GPS
'style=/Applications/Grass/GRASS.app/Contents/Resources/etc/grass_write_ascii.style' is an unknown option to gpx.
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
/Applications/Grass/GRASS.app/Contents/Resources/scripts/v.in.gpsbabel: line 481: ((: TO_READ=-: syntax error: operand expected (error token is "-")
/Applications/Grass/GRASS.app/Contents/Resources/scripts/v.in.gpsbabel: line 460: ((: OFFSET=912-: syntax error: operand expected (error token is "-")
tail: option requires an argument -- n
usage: tail [-F | -f | -r] [-b # | -c # | -n #] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
/Applications/Grass/GRASS.app/Contents/Resources/scripts/v.in.gpsbabel: line 481: ((: TO_READ=-: syntax error: operand expected (error token is "-")
/Applications/Grass/GRASS.app/Contents/Resources/scripts/v.in.gpsbabel: line 460: ((: OFFSET=1206-: syntax error: operand expected (error token is "-")
tail: option requires an argument -- n
usage: tail [-F | -f | -r] [-b # | -c # | -n #] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]

Dave

On Sep 27, 2006, at 4:48 AM, Hamish wrote:

Dave Kent wrote:

I had thought (and hoped) from the documentation that track data would
import as an arc.

Yes, tracks and routes should import as an arc.

You need to add a flag to gpsbabel to get a track, not points, did you use
the gpsbabel "-t" flag?

from the script:

# How to do it
#
# gpsbabel [options] -i INTYPE -f INFILE -o OUTTYPE -F OUTFILE
# gpsbabel [options] -i INTYPE -o OUTTYPE INFILE [OUTFILE]
#
#(GPX file example):
# gpsbabel -w -i gpx -o xcsv,style=grass_write_ascii.style outfile.csv

...

if [ $CREATE_POINTS -eq 1 ] ; then
    echo "Downloading Waypoints from GPS" 1>&2
    gpsbabel -w -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o xcsv,style="$STYLE" -F "$TMP".gpst
    EXITCODE=$?
else
    if [ $RTE -eq 1 ] ; then
        echo "Downloading Routes from GPS" 1>&2
        gpsbabel -r -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o gpx,style="$STYLE" -F "$TMP".gpx
        EXITCODE=$?
    fi
    if [ $TRK -eq 1 ] ; then
        echo "Downloading Tracks from GPS" 1>&2
        gpsbabel -t -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o gpx,style="$STYLE" -F "$TMP".gpx
        EXITCODE=$?
    fi
fi

Hamish