Talking to a GPS unit over USB

Dar Scott dsc at swcp.com
Sat Apr 10 19:08:52 EDT 2004


On Saturday, April 10, 2004, at 12:20 PM, Trevor DeVore wrote:

> I have this shiny new GPS unit with a USB interface and wanted to play 
> around with communication between it and a Rev application on OS X.  I 
> would love to be able to download waypoints.  I've never worked with 
> USB connections (or serial) before and wondered if anyone has any 
> experience in this area and could help get me started.  I found the 
> open driver command and it says it can be used for communication with 
> USB devices but there are no examples.  I did a quick search of the 
> archives and didn't see anything either.

I would expect that a GPS unit with a USB interface is set up to look 
just like serial.  If that is not the case, you will not be able to 
establish communications without something special.

See what the drivernames() function returns.  (Don't worry if it does 
not show the built-in modem, that is a known bug.)  You might 
recognized something that looks like the GPS.

If you find something there, it is looking good.

Try opening and closing it.

If that works, try reading until empty repeatedly and append the 
results to a field.  See if that looks promising.

Dar Scott



More information about the use-livecode mailing list