DG-100 GPS data logger support

View: New views
14 Messages — Rating Filter:   Alert me  

DG-100 GPS data logger support

by Mirko Parthey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I'm working on a tool to download GPS tracks from the GlobalSat DG-100
data logger.
Information about this device can be found here, for example:
http://www.gpspassion.com/fr/articles.asp?id=214

My plan is to prepare my software for GPSBabel integration,
so I am asking you for comments on my code, whether syntax and
coding style look acceptable to you.
I'd like to know, basically, whether I'm on track. ;-)

There is also some support for device functions other than track
download, such as configuring the device or activating the GPS mouse
mode (live GPS). Are these features suitable for GPSBabel integration
at all?

An early version of my software is available for download here:
http://rtg.informatik.tu-chemnitz.de/~mpa/software/dg-100/dg100ctl-v0.01.c

It is a standalone program without any options, no user interface yet,
only plain text output so far, tested on Linux (Debian).
The desired actions can be chosen in the main() function.
To build it, enter:
$ gcc dg100ctl-v0.01.c -o dg100ctl

If you have a DG-100, I'd like to know whether my software works for you.
Especially welcome are tests with negative latitude or longitude.

My thanks go to Globalsat for releasing the specs, to Pixel_K for
writing the DG-100 Manager and publishing the Delphi source code,
and last, but not least, to the GPSBabel developers.

Best regards,
Mirko

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Robert Lipe-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mirko Parthey wrote:

> My plan is to prepare my software for GPSBabel integration,
> so I am asking you for comments on my code, whether syntax and
> coding style look acceptable to you.
> I'd like to know, basically, whether I'm on track. ;-)

You've implemented a lot of things that GPSBabel already has such as
word size and endianness handling. We have our own serial handling
(works on Windows and POSIX) and we can't use C99's designated
initializers.  I don't see any deal-breakers at a glance.

That said, you've done the hard part. You've identified the word size
and endian dependencies and you've whipped the protocol itself into
submission. Marrying into GPSBabel's abstractions for those things and
the key data types (see the skeleton files in our source tree) is a
pretty mechanical exercise.

> There is also some support for device functions other than track
> download, such as configuring the device or activating the GPS mouse
> mode (live GPS). Are these features suitable for GPSBabel integration
> at all?

We have some realtime tracking support but it's admittedly pretty crude.

I'd focus on the basic integration first.     Let us know when you're
ready to tackle specifics.

RJL


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Mirko Parthey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 01, 2007 at 09:26:13PM -0500, Robert Lipe wrote:

> You've implemented a lot of things that GPSBabel already has such as
> word size and endianness handling. We have our own serial handling
> (works on Windows and POSIX) and we can't use C99's designated
> initializers.  I don't see any deal-breakers at a glance.
>
> That said, you've done the hard part. You've identified the word size
> and endian dependencies and you've whipped the protocol itself into
> submission. Marrying into GPSBabel's abstractions for those things and
> the key data types (see the skeleton files in our source tree) is a
> pretty mechanical exercise.

Thanks for your feedback.  Here is my first gpsbabel patch.
http://rtg.informatik.tu-chemnitz.de/~mpa/software/dg-100/gpsbabel-dg100-v0.02.diff

It works for me, but might need some review and testing.
Comments are welcome!

Mirko

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Parent Message unknown Re: DG-100 GPS data logger support

by Gerhard Olsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Out of curiosity and to check if better Garmin fitness support fit
with the Globalsat devices, I checked with Mirko and speigei (the
maintainer for a GH-615 utility: http://code.google.com/p/gh615/)

Links to the DG-100 "specification" below. It seems like all Globalsat
devices uses their own protocol (or at least their own packet format),
so calling the format dg-100 is probably better than "globalsat".

My conclusion: This is not affecting Garmin-fitness at all.
Garmin needs competition, but Globalsat seems to have some work to do,
mostly on SW on the devices and the interface.

On 8/2/07, Gerhard Olsson wrote:

> On 8/2/07, Mirko Parthey wrote:
> > On Thu, Aug 02, 2007 at 12:22:22AM +0200, Gerhard Olsson wrote:
> > Should the format name be globalsat instead?
>
> That's a good question, but I am afraid I cannot help you here -
> the DG-100 is the first GPS device I ever owned,
>
> >> Should the format name be globalsat instead?
> >
> >That's a good question, but I am afraid I cannot help you here -
> >the DG-100 is the first GPS device I ever owned,
> >I have no experience with other GPS devices.
>
> My interest in this is that I try to add some functionality to Garmin
> devices and would like to incorporate GPSBabel in my "fitness"
> application of choice (SportTracks) and get better Linux support for
> fitness. If someone set the infrastructure, someone else can do the
> GUI.
>
> > > Do you have a protocol spec?
> >
> > Yes, I should have mentioned this.
> > Feel free to repost this on the mailing list.
> >
> > The specs as posted by GlobalSat:
> > http://www.usglobalsat.com/forum/topic.asp?TOPIC_ID=607
> >
> > An edited version by Pixel_K can be found in the DG-100 Manager source code:
> > http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=85525
> > http://www.pixel.k.free.fr/soft/DGm/0039/DGManager0039.rar
> > It's in Info/spec-A.txt inside the archive.
> >
> > The specs are very useful, but neither exact nor complete.
> > A bit of reverse engineering was still needed.
> >
> > Mirko
> >
>
> Will do, when I have a plan what to do - probably suggest that GH is
> handled as Garmin, if "fitness" extensions are interesting. Will look
> at the spec first.
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Robert Lipe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > You've implemented a lot of things that GPSBabel already has such as
> > word size and endianness handling. We have our own serial handling
> > (works on Windows and POSIX) and we can't use C99's designated
> > initializers.  I don't see any deal-breakers at a glance.
> >
> > That said, you've done the hard part. You've identified the word size
>
> Thanks for your feedback.  Here is my first gpsbabel patch.
> http://rtg.informatik.tu-chemnitz.de/~mpa/software/dg-100/gpsbabel-dg100-v0.02.diff
>

I don't see any problem with that. Add a paragraph or two of doc (and
don't worry if Docbook or even English isn't your thing - we can help with
that) and I'll check that in.

Thanx!
RJl


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Mirko Parthey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Aug 14, 2007 at 10:39:09PM -0500, Robert Lipe wrote:
> > http://rtg.informatik.tu-chemnitz.de/~mpa/software/dg-100/gpsbabel-dg100-v0.02.diff
>
> I don't see any problem with that. Add a paragraph or two of doc (and
> don't worry if Docbook or even English isn't your thing - we can help with
> that) and I'll check that in.

You can find an updated patch here:
http://rtg.informatik.tu-chemnitz.de/~mpa/software/dg-100/gpsbabel-dg100-v0.03.diff

I hope this addresses all issues found so far - please let me know if
anything is still missing.

My mentioning of BT-335 support is actually just a guess -
I'd like to encourage BT-335 users to try my DG-100 support.
The DG-100's Windows software can be configured for an unnamed
Bluetooth device, and the BT-335 manual shows screenshots resembling
the DG-100 software.

Mirko

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Robert Lipe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> http://rtg.informatik.tu-chemnitz.de/~mpa/software/dg-100/gpsbabel-dg100-v0.03.diff
>
> I hope this addresses all issues found so far - please let me know if

It's lovely.  Apologies for it taking this long but I've now checked it
in.  Thanx!

RJL


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Mirko Parthey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
please consider applying the below patch to dg-100.c.
Changelog:
- increase RX timeout because dg100_erase() needs >20s
- remove unused variables in dg100_getfileheaders()
  which were moved into a local code block for debugging
- add more debugging output to dg100_getfileheaders()
- fix loop condition in dg100_getfileheaders()

About the last item (loop condition change):
The spec says I should continue reading headers as long as (numheaders!=0),
and that's what I did. However, there was a problem when reading from a
DG-100 with full memory - numheaders never became zero, and nextheader
wrapped around:
  found 150 headers, nextheader=150
  found 150 headers, nextheader=300
  found 150 headers, nextheader=450
  found 150 headers, nextheader=600
  found 72 headers, nextheader=0
  found 150 headers, nextheader=150
  found 150 headers, nextheader=300

I changed the test to (nextheader!=0), which seems to be more reliable.
In case this also breaks, I could combine the two conditions,
but I'd prefer not to do that unless necessary.

Thanks,
Mirko

Index: dg-100.c
===================================================================
RCS file: /cvsroot/gpsbabel/gpsbabel/dg-100.c,v
retrieving revision 1.5
diff -u -p -r1.5 dg-100.c
--- dg-100.c 8 Sep 2007 21:00:14 -0000 1.5
+++ dg-100.c 9 Sep 2007 13:37:07 -0000
@@ -325,8 +325,9 @@ dg100_recv_byte()
 {
  int result;
 
- /* allow for a delay of 20s; especially erase can take a long time */
- result = gbser_readc_wait(serial_handle, 20000);
+ /* allow for a delay of 40s;
+ * erasing the whole DG-100 memory takes about 21s */
+ result = gbser_readc_wait(serial_handle, 40000);
  switch(result){
  case gbser_ERROR:
  fatal("dg100_recv_byte(): error reading one byte\n");
@@ -529,8 +530,6 @@ dg100_getfileheaders(struct dynarray16 *
  int seqnum;
  gbint16 numheaders, nextheader, *h;
  int i, offset;
- //time_t ti;
- //int time, date;
 
  nextheader = 0;
  do {
@@ -541,6 +540,8 @@ dg100_getfileheaders(struct dynarray16 *
  /* process the answer */
  numheaders = be_read16(answer);
  nextheader = be_read16(answer + 2);
+ dg100_log("found %d headers, nextheader=%d\n",
+ numheaders, nextheader);
 
  h = dynarray16_alloc(headers, numheaders);
  for (i = 0; i < numheaders; i++) {
@@ -555,7 +556,7 @@ dg100_getfileheaders(struct dynarray16 *
  i, seqnum, ctime(&ti));
  }
  }
- } while (numheaders != 0);
+ } while (nextheader != 0);
 }
 
 static void

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Robert Lipe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 9/9/07, Mirko Parthey <mirko.parthey@...> wrote:
Hi,
please consider applying the below patch to dg-100.c.
Changelog:
- increase RX timeout because dg100_erase() needs >20s
- remove unused variables in dg100_getfileheaders()
  which were moved into a local code block for debugging
- add more debugging output to dg100_getfileheaders()
- fix loop condition in dg100_getfileheaders()

Looks good to me.  Applied.  Thanx.

 

About the last item (loop condition change):
The spec says I should continue reading headers as long as (numheaders!=0),
and that's what I did. However, there was a problem when reading from a
DG-100 with full memory - numheaders never became zero, and nextheader
wrapped around:

Welcome to GPS vendor specs. :-)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Robert Lipe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've tracked down why DG-100 doesn't work on Mac.  It's a bug in
Prolific's OS/X  driver for the chip  that the DG-100 uses.

I've provided Globalsat with the full analysis and a test case in the
hope that they can get Prolific to rev the driver to not corrupt the
receive data stream if flags in termio (other than cflag, obviously)
are changed while there is data pending in the receiver FIFO or
otherwise in flight from the device.


This is also the problem that nails the UT-41 in NMEA mode.

We could conceivably code around this, but I'd like to give them a
chance to fix the real problem first.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Andre-John Mas-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 1-Nov-07, at 00:58 , Robert Lipe wrote:

> I've tracked down why DG-100 doesn't work on Mac.  It's a bug in
> Prolific's OS/X  driver for the chip  that the DG-100 uses.
>
> I've provided Globalsat with the full analysis and a test case in the
> hope that they can get Prolific to rev the driver to not corrupt the
> receive data stream if flags in termio (other than cflag, obviously)
> are changed while there is data pending in the receiver FIFO or
> otherwise in flight from the device.
>
>
> This is also the problem that nails the UT-41 in NMEA mode.
>
> We could conceivably code around this, but I'd like to give them a
> chance to fix the real problem first.

FYI There is an open source implementation of the driver, avalable here:

http://osx-pl2303.sourceforge.net/

Andre

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: DG-100 GPS data logger support

by Jaako :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> I've tracked down why DG-100 doesn't work on Mac.  It's a bug in
> Prolific's OS/X  driver for the chip  that the DG-100 uses.



I managed to compile this and get it running on my Powerbook.
Using the PL2303 driver, and cu.PL2303-3B1 as the DG-100 device.

It connects and downloads data properly, but every record's time shows up as
1970-01-01 08:59:59

Any suggestions?

Jaako

Re: DG-100 GPS data logger support

by peterRN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Mirko,

I currently own BT-338 and would like to test to see if it works with your software. How can I test to see if your software supports BT-338? Could you point me to some steps about how I could test this?

Thanks,

-Peter

Mirko Parthey wrote:
My mentioning of BT-335 support is actually just a guess -
I'd like to encourage BT-335 users to try my DG-100 support.
The DG-100's Windows software can be configured for an unnamed
Bluetooth device, and the BT-335 manual shows screenshots resembling
the DG-100 software.

Mirko

Re: DG-100 GPS data logger support

by Jaako :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jaako wrote:
> I've tracked down why DG-100 doesn't work on Mac.  It's a bug in
> Prolific's OS/X  driver for the chip  that the DG-100 uses.
Update: I managed to get everything working on my Powerbook, the DG-100 and my mac are now friends!

I added GPX support to Mirko Parthey's original dg100 C script and put it online at Blog-Shmog.com.

You've done great work Mirko, your code is very clean and nicely documented.  I've exhausted myself trying to find other alternatives to get the DG-100 to work on my mac, and your script is by far the only thing around that does the job.

Cheers,
KJ