You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(1) |
Feb
|
Mar
(14) |
Apr
|
May
(11) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
|
Dec
(1) |
2005 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2007 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: nick k. <na...@co...> - 2009-07-13 04:44:07
|
Hello, First off thanks for all of the great work on pygarmin. It works perfectly with my Forerunner 305; I'm able to get timestamped GPS coordinates as well as HR data. However, I'm having trouble with one thing. Whenever I transfer Run data (using getRuns), the current lap or track is stopped. Indeed, this is the only way to get the most up-to-date data; if I don't run getRuns() before getLaps() or getTracks() then I don't get the most recent data. Yet calling getRuns() stops the current recording. What I'd like to do is figure out how to get either a) the data in real-time or b) to restart the recording after calling getRuns(). The scenario: this is for an untethered system that is running on an embedded Linux platform. I need to get near real-time HR information for a particular machine learning algorithm on the platform. I don't want the user to have to always press "start" again after each data transfer. Is there a way to do what I'd like to do? Please say yes, because I don't want to have to take apart the watch and wire up an electronic switch to "press" the start button programatically :-) Best, nick knouf |
From: Bob P. <bpa...@id...> - 2009-04-06 23:28:26
|
# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: bpa...@id...-20090406222641-zg3w51lkvy1n47b7 # target_branch: http://bazaar.launchpad.net/%7Epygarmin-\ # dev/pygarmin/trunk/ # testament_sha1: 480cca02d52d644bd31c36925704420d49fdab48 # timestamp: 2009-04-06 22:55:46 +0000 # base_revision_id: bjo...@gm...-20080729173520-\ # bcve5oe97ymq8l2m # # Begin patch === modified file 'garmin.py' --- garmin.py 2008-07-29 17:35:20 +0000 +++ garmin.py 2009-04-06 22:26:41 +0000 @@ -513,9 +513,8 @@ """Waypoint transfer protocol.""" def getData(self, callback = None): - return SingleTransferProtocol.getData(self, callback, - self.cmdproto.Cmnd_Transfer_Wpt, - self.link.Pid_Wpt_Data) + return SingleTransferProtocol.getData( + self, callback, self.cmdproto.Cmnd_Transfer_Wpt, self.link.Pid_Wpt_Data) def putData(self,data,callback): sendData = [] @@ -1363,7 +1362,7 @@ "subclass", "slat", "slon", "alt", "dpth", "dist", "state", "cc", "ete", "temp", "time", "wpt_cat", "ident", "cmnt", "facility", "city", "addr", "cross_road") - fmt = "<b b b b h 18s l l f f f 2s 2s l f l i s s s s s s" + fmt = "<b b b b h 18s l l f f f 2s 2s l f l h s s s s s s" class D120(DataPoint): @@ -1949,7 +1948,7 @@ ETX = "\x03" EOM = DLE+ETX - unit_id = None + unit_id = 0 # Initialize in value case we can't get it later def __init__(self, device, timeout = 5): # Import serial here, so that you don't have to have that module @@ -2073,20 +2072,31 @@ Pid_Start_Session2 = 16 Pid_Session_Started2 = 17 - def __init__(self): + def __init__(self, Device = None): # Import usb here, so that you don't have to have that module # installed, if you're not using a usb link. import usb - self.garmin_dev = None - for bus in usb.busses(): - for dev in bus.devices: - if dev.idVendor == 2334: - self.garmin_dev = dev - break - if self.garmin_dev: - break + # If no device is passed in grab the first one we find + GARMIN_VENDOR_ID = 0x091e + if not Device: + self.garmin_dev = None + for bus in usb.busses(): + for dev in bus.devices: + if dev.idVendor == GARMIN_VENDOR_ID: + self.garmin_dev = dev + break + if self.garmin_dev: + break + else: + raise LinkException("No Garmin device found!") else: - raise LinkException("No Garmin device found!") + self.garmin_dev = Device + + # Grab the USB endpoint values for this device + self.EndpointInBulk = self.garmin_dev.configurations[0].interfaces[0][0].endpoints[0].address + self.EndpointInInterrupt = self.garmin_dev.configurations[0].interfaces[0][0].endpoints[1].address + self.EndpointOut = self.garmin_dev.configurations[0].interfaces[0][0].endpoints[2].address + self.handle = self.garmin_dev.open() self.handle.claimInterface(0) @@ -2101,6 +2111,7 @@ else: raise + def startSession(self): """Start the USB session.""" start_packet = self.constructPacket(0, self.Pid_Start_Session) @@ -2116,6 +2127,11 @@ unit_id_data = None while not session_started: packet = self.readUSBPacket(16) + # For some reason I'm not seeing this returned from the device, even + # when I monitor the bus so for now let's do a good return for no data + # because everything appears to work fine if we do + if(packet == None): + return if len(packet) != 16: continue # We have something that could be the right packet. @@ -2151,7 +2167,7 @@ """Send a packet over the USB bus.""" usb_log.debug("Sending %s bytes..." % len(packet)) usb_packet_log.debug("< usb: %s" % (hexdump(packet))) - sent = self.handle.bulkWrite(0x02, packet) + sent = self.handle.bulkWrite(self.EndpointOut, packet) usb_log.debug("Sent %s bytes" % sent) def unpack(self, packet): @@ -2172,11 +2188,31 @@ def readUSBPacket(self, size): """Read a packet over USB bus.""" + import usb # Need this for the error check usb_log.debug("Reading %s bytes..." % size) - packet = self.handle.interruptRead(0x81, size) - packet = ''.join(struct.pack("<B", byte) for byte in packet) - usb_packet_log.debug("> usb: %s" % (hexdump(packet))) - usb_log.debug("Read %s bytes" % len(packet)) + + # I haven't been able to get the interrupt read to work for USB + # so I'm switching to using a bulk read + + #packet = self.handle.interruptRead(0x81, size) + + # After sending the product request we expect the protocol data to follow + # but for some reason we get an empty read coming back first causing failure. + # A retry fixes the problem for now... until we figure it out + packet = None + RetryCount = 0 + while RetryCount < 2: + RetryCount += 1 + try: + packet = self.handle.bulkRead(self.EndpointInBulk, size) + except usb.USBError, err: + if str(err) != "No error": + raise + if packet: + packet = ''.join(struct.pack("<B", byte) for byte in packet) + usb_packet_log.debug("> usb: %s" % (hexdump(packet))) + usb_log.debug("Read %s bytes" % len(packet)) + break return packet def settimeout(self, timeout): @@ -2198,7 +2234,6 @@ self.link = L000(physicalLayer) # at least initially product_data = A000(self.link).getProductData() (self.prod_id, self.soft_ver,self.prod_descs) = product_data - log.info("Getting supported protocols") # Wait for the unit to announce its capabilities using A001. If @@ -2211,7 +2246,6 @@ self.protos , self.protocols_unknown = protocol.FormatA001() except LinkException, e: - log.log(VERBOSE, "PCP not supported") try: |
From: greg w. <gr...@th...> - 2008-07-31 09:43:38
|
Oh, no need to look into it. Your answer makes sense. .getTracks() in fact is an example of a list of lists. Like I said, I was just curious. It's fine the way it is. Thanks again for your help. - Greg On Thu, Jul 31, 2008 at 4:07 AM, Bjorn Tillenius <bjo...@gm...> wrote: > On Wed, Jul 30, 2008 at 07:56:14PM -0400, greg whittier wrote: >> Pygarministas, >> >> This is just curiosity on my part, but why does >> garmin.Garmin.getRuns() return [ [run1], [run2], [run3], ...] instead >> of just [run1, run2, run3, ...]? Is there a situation where there >> might be more than one item in each list? Same question for >> .getLaps(). getWaypoints() seems to be the oddball in the group and >> returns a list of strings. Note that how it works is fine with me, >> I'm just wondering if I'm missing something. > > I don't know, actually. The obvious reason is because that's how > MultiTransferProtocol.getData() works. I don't have time to research > exactly why it works that way. I suspect it's because some protocols > allow multiple things at once, so that getData() would return list of > lists (of more than one item). It might be possible to let getRuns() and > getLaps() flatten the list, but I don't have time to look into it now. > > > Regards, > > Bjorn > |
From: Bjorn T. <bjo...@gm...> - 2008-07-31 08:06:16
|
On Wed, Jul 30, 2008 at 07:56:14PM -0400, greg whittier wrote: > Pygarministas, > > This is just curiosity on my part, but why does > garmin.Garmin.getRuns() return [ [run1], [run2], [run3], ...] instead > of just [run1, run2, run3, ...]? Is there a situation where there > might be more than one item in each list? Same question for > .getLaps(). getWaypoints() seems to be the oddball in the group and > returns a list of strings. Note that how it works is fine with me, > I'm just wondering if I'm missing something. I don't know, actually. The obvious reason is because that's how MultiTransferProtocol.getData() works. I don't have time to research exactly why it works that way. I suspect it's because some protocols allow multiple things at once, so that getData() would return list of lists (of more than one item). It might be possible to let getRuns() and getLaps() flatten the list, but I don't have time to look into it now. Regards, Bjorn |
From: greg w. <gr...@th...> - 2008-07-30 23:56:05
|
Pygarministas, This is just curiosity on my part, but why does garmin.Garmin.getRuns() return [ [run1], [run2], [run3], ...] instead of just [run1, run2, run3, ...]? Is there a situation where there might be more than one item in each list? Same question for .getLaps(). getWaypoints() seems to be the oddball in the group and returns a list of strings. Note that how it works is fine with me, I'm just wondering if I'm missing something. Thanks, Greg |
From: greg w. <gr...@th...> - 2008-07-28 13:08:30
|
On Mon, Jul 28, 2008 at 6:00 AM, Bjorn Tillenius <bjo...@gm...> wrote: > > On Sun, Jul 27, 2008 at 05:53:09PM -0400, greg whittier wrote: > > > and now it works, but only every other time I call it. Strange. > > > > Do you get this every time? I get this behaviour occasionally, but not > very often. I think the fix might simply be to automatically retry on > errors. When I run pygarmin, I get it consistently every other time. I've done it ~10 times and consistently had the alternating behavior. > > > I used the example code from http://pygarmin.org/index.php/Example_code, and > > I can run it fine without the "works every other time" behavior. (By the > > way, the example code doesn't quite work because gps.getWaypoints returns a > > list of strings, so "w.ident" doesn't work.) When I ran the example code, I got "No error" the first time and then not after that. I thought perhaps it had something to do with not closing the device in the example code, so I put in a "phys.close()" but this didn't change anything. I also couldn't find a .close() in pygarmin. > > > > I'm running Ubuntu 8.04. I considered writing a bug report, but I'm not > > sure which system I should be using (launchpad has 0 bugs and the last > > sourceforge bug report is 4 years old). > > We don't get many bug reports :) Please file the bug on launchpad, > though, I will move over the sourceforge bugs at some point. I went to launchpad and it doesn't seem possible to file a bug report there. There's a big warning "PyGarmin does not use Launchpad as its bug tracker." Thanks again for the software. I've been tinkering with a running log program for longer than I care to admit and I think pygarmin should work nicely. Thanks, Greg |
From: Bjorn T. <bjo...@gm...> - 2008-07-28 09:59:39
|
On Sun, Jul 27, 2008 at 05:53:09PM -0400, greg whittier wrote: > First, I was pleased to see that pygarmin has usb support now! > > I checked out revision 89 and tried "sudo python pygarmin usb: info" and got > > File "pygarmin", line 139, in run > sys.stderr.write(sys.exc_info()[1] + '\n') > TypeError: unsupported operand type(s) for +: 'USBError' and 'str' > > I changed line 139 to > sys.stderr.write(str(sys.exc_info()[1]) + '\n') > > and now it works, but only every other time I call it. Strange. > > $ sudo python pygarmin usb: info > No error > $ sudo python pygarmin usb: info > *** Product Info *** > Forerunner305 Software Version 2.70 > GPS Product ID: 484 > Software version: 2.70 > > $ sudo python pygarmin usb: info > No error > $ sudo python pygarmin usb: info > *** Product Info *** > Forerunner305 Software Version 2.70 > GPS Product ID: 484 > Software version: 2.70 Do you get this every time? I get this behaviour occasionally, but not very often. I think the fix might simply be to automatically retry on errors. > I used the example code from http://pygarmin.org/index.php/Example_code, and > I can run it fine without the "works every other time" behavior. (By the > way, the example code doesn't quite work because gps.getWaypoints returns a > list of strings, so "w.ident" doesn't work.) > > I'm running Ubuntu 8.04. I considered writing a bug report, but I'm not > sure which system I should be using (launchpad has 0 bugs and the last > sourceforge bug report is 4 years old). We don't get many bug reports :) Please file the bug on launchpad, though, I will move over the sourceforge bugs at some point. Regards, Bjorn |
From: greg w. <gr...@th...> - 2008-07-27 21:53:01
|
First, I was pleased to see that pygarmin has usb support now! I checked out revision 89 and tried "sudo python pygarmin usb: info" and got File "pygarmin", line 139, in run sys.stderr.write(sys.exc_info()[1] + '\n') TypeError: unsupported operand type(s) for +: 'USBError' and 'str' I changed line 139 to sys.stderr.write(str(sys.exc_info()[1]) + '\n') and now it works, but only every other time I call it. Strange. $ sudo python pygarmin usb: info No error $ sudo python pygarmin usb: info *** Product Info *** Forerunner305 Software Version 2.70 GPS Product ID: 484 Software version: 2.70 $ sudo python pygarmin usb: info No error $ sudo python pygarmin usb: info *** Product Info *** Forerunner305 Software Version 2.70 GPS Product ID: 484 Software version: 2.70 I used the example code from http://pygarmin.org/index.php/Example_code, and I can run it fine without the "works every other time" behavior. (By the way, the example code doesn't quite work because gps.getWaypoints returns a list of strings, so "w.ident" doesn't work.) I'm running Ubuntu 8.04. I considered writing a bug report, but I'm not sure which system I should be using (launchpad has 0 bugs and the last sourceforge bug report is 4 years old). Thanks, Greg |
From: Bjorn T. <bjo...@gm...> - 2008-07-06 09:34:55
|
On Fri, May 30, 2008 at 04:01:33PM +0200, Dalton, Tom wrote: > Hi, > > I work with Python/Linux at work and we use pygarmin as the > lowest level of our GPS functionality. I've recently come to > add support for the Garmin 18 USB to our project and have > found that pygarmin 0.7 wont support it 'out of the box'. > Looking into the 0.7 code, I see there's a lot of > assumptions and limitation that were maybe made for old > devices, that aren't necessarily true of newer devices. For > example, the ordering of the protocols returned by A001, the > naming of these protocols (my device reports "T001"!) and > some other stuff. On top of that, the functionality is all > basically in a single python module, which is yucky and > there are a lot of 'old-style' pythonisms used (e.g. string > exceptions). If I was to do a bit of refactoring and rework > on some of the code, would you be interested? Is 0.7 the > best place to start doing something like this? I would > probably only be able to spend a few days on it, but in 3 > full days of work I think I could make some big > improvements, at least to the readbility, comments, > docstrings etc. > > If you would be interested in this, the let me know asap, as > I will be starting some work this week, and if it can be > pushed back into SF then I will have to work things slightly > differently. Also, I haven;t looke dat how much has changed > on the trunk vs 0.7 - but I guess it cant bee too much if > there hasn't been a release for 4 years! Hi Tom, Sorry for not responding earlier, I've been very busy lately. Not to mention that the weather has been great, so I've been wanting to spend more time using my GPS, rather than hacking for it :) I hope you're still interested in contributing, your help would be appreciated. As Quentin already said, don't use the 0.7 release, it's really outdated. Also, I've been doing quite a lot of work (including USB support) in a separate branch, and today I finally merged it into trunk. I'll see if I can do a new release soon; it's about time :) In any case, if you want to contribute, you should always use the trunk. I've written some instructions about how to send patches at http://pygarmin.org/index.php/Sending_Patches. Please let me know if something is unclear. Regards, Bjorn |
From: Quentin Stafford-F. <qu...@po...> - 2008-05-30 18:31:05
|
Hi Tom - It would be great to have your help, but one thing you may have missed (because I haven't updated the sourceforge site properly) is that there's a new home for PyGarmin, with a Wiki, at pygarmin.org, and that Bjorn Tillenius is in the process of migrating the source code from SourceForge to Launchpad, and from SVN to Bazaar. Only time will tell whether this is a good idea :-) But there have been various updates more recently than 0.7 - you might want to start from the Bzr repository, and all contributions to the wiki are much appreciated. All the best, Quentin ---- Dr Quentin Stafford-Fraser CEO, Cambridge Visual Networks Ltd 61 Selwyn Road, Cambridge CB3 9EA, UK AIM/Skype: quentinsf tel: +44 1223 852132 / 690771 mob: +44 7798 851702 camvine.com Registered in England No: 6200773 Registered Office: Salisbury House, Station Road, Cambridge CB1 2LA > > > Message: 8 > Date: Fri, 30 May 2008 16:01:33 +0200 > From: "Dalton, Tom" <tom...@ed...> > Subject: [Pygarmin-misc] Want some help? > To: <pyg...@li...> > Message-ID: > <B79...@de...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > I work with Python/Linux at work and we use pygarmin as the > lowest level of our GPS functionality. I've recently come to > add support for the Garmin 18 USB to our project and have > found that pygarmin 0.7 wont support it 'out of the box'. > Looking into the 0.7 code, I see there's a lot of > assumptions and limitation that were maybe made for old > devices, that aren't necessarily true of newer devices. For > example, the ordering of the protocols returned by A001, the > naming of these protocols (my device reports "T001"!) and > some other stuff. On top of that, the functionality is all > basically in a single python module, which is yucky and > there are a lot of 'old-style' pythonisms used (e.g. string > exceptions). If I was to do a bit of refactoring and rework > on some of the code, would you be interested? Is 0.7 the > best place to start doing something like this? I would > probably only be able to spend a few days on it, but in 3 > full days of work I think I could make some big > improvements, at least to the readbility, comments, > docstrings etc. > > If you would be interested in this, the let me know asap, as > I will be starting some work this week, and if it can be > pushed back into SF then I will have to work things slightly > differently. Also, I haven;t looke dat how much has changed > on the trunk vs 0.7 - but I guess it cant bee too much if > there hasn't been a release for 4 years! > > Regards, > > Tom Dalton |
From: Dalton, T. <tom...@ed...> - 2008-05-30 14:02:04
|
Hi, I work with Python/Linux at work and we use pygarmin as the lowest level of our GPS functionality. I've recently come to add support for the Garmin 18 USB to our project and have found that pygarmin 0.7 wont support it 'out of the box'. Looking into the 0.7 code, I see there's a lot of assumptions and limitation that were maybe made for old devices, that aren't necessarily true of newer devices. For example, the ordering of the protocols returned by A001, the naming of these protocols (my device reports "T001"!) and some other stuff. On top of that, the functionality is all basically in a single python module, which is yucky and there are a lot of 'old-style' pythonisms used (e.g. string exceptions). If I was to do a bit of refactoring and rework on some of the code, would you be interested? Is 0.7 the best place to start doing something like this? I would probably only be able to spend a few days on it, but in 3 full days of work I think I could make some big improvements, at least to the readbility, comments, docstrings etc. If you would be interested in this, the let me know asap, as I will be starting some work this week, and if it can be pushed back into SF then I will have to work things slightly differently. Also, I haven;t looke dat how much has changed on the trunk vs 0.7 - but I guess it cant bee too much if there hasn't been a release for 4 years! Regards, Tom Dalton |
From: Quentin Stafford-F. <qu...@po...> - 2008-03-01 11:54:48
|
Hello all, As you will see if you look back at the archives, there haven't been too many commits to the PyGarmin source code repository recently! But that doesn't mean that nobody is using or updating it. It really means that Yours Truly has been swamped by getting his latest startup company off the ground and hasn't been able to devote any effort to maintaining it! Others, however, most notably Cedric and Bjorn, have been making their own changes and improvements to the code and wanted a more flexible way to develop and distribute those in their early stages without committing them back into the main repository. So... we're making some changes in an attempt to bring the project a little more up to date. It's around 8 years since I first put the project on Sourceforge, after all! * We're adopting a Distributed Version Control System instead of SVN. There are several good ones to choose from, but we've gone for Bazaar (Bzr), chiefly because Bjorn got there first :-) If you're not familiar with Bzr, there's more information at http://bazaar- vcs.org/ . It's easy to learn, especially if you're familiar with other version control systems. * There's a very nice hosting platform for Bazaar-based projects at launchpad.net, so we're doing a trial migration of PyGarmin development to Launchpad. Please don't check in further changes on Sourceforge. * There's a new home address - pygarmin.org - and a new logo! You'll have to go to the new site to see it! * The documentation at pygarmin.org is a wiki, which should make it easier for contributors to keep it up to date. We'll see how this goes. There are some things (like this mailing list) which do not yet have a Launchpad equivalent, so things will migrate in stages. But the main thing to remember is that, to find PyGarmin, you should now start at pygarmin.org! All the best, Quentin ---- Dr Quentin Stafford-Fraser http://www.qandr.org/quentin |
From: Bjorn T. <bjo...@gm...> - 2008-02-10 17:04:05
|
Hi, I've finally found some time to work on pygarmin again, and would like to get my branch for supporting the Edge 305 merged. As a first step, I'm going to do some clean-up. There were a lot of confusion as to where to add new code, dev_garmin.py or garmin.py, so I've finally merged them to together, and deleted dev_garmin.py. This is now commited to the trunk. I think I managed to move over all the added functionality, and the current garmin.py works for me. Since there are no automated tests, I can't tell if I've broken something, though. If anything is broken, please let me know. I'll do my best to fix any possible problems. BTW, if something wants to create development versions of garmin.py in the future, please create a new branch instead. It's so much easier to keep track of branches, rather than differences between files. As a heads-up, the next step towards getting my branch merged is to do some general PEP-8 clean-up on the branch, and try adding some basic tests. Regards, Bjorn |
From: Gerrit S. <ger...@bz...> - 2007-11-20 08:03:10
|
Hello users, Hey Cedric, A few years ago when I was sick I wrote lot of upload code (dev_garmin.py) and code for making gpx files and Oziexplorer files. Now, I order a GPSMAP 76 CSx and was thinking using pygarmin for making gpx files. I need those type of files in Openstraatmap (http://www.openstreetmap.org/) I agree the changes you like to make and like to help you in changing the code but it's a long time ago that I wrote python code and like everybody, finding time is maybe the biggest problem. Bjorn Tillenius start writing code for using garmin with USB (https://launchpad.net/garmin-sync) Regards, Yerry |
From: Cedric D. <du...@sh...> - 2007-10-26 14:40:51
|
Hello PyGarmin users, As a long-time user of Pygarmin, which I use on a nearly daily rate, I'm glad to add some updates to pygarmin project. I see on the mailing list many problems that I solved for myself and would like to share: PyGarmin on Windows, PyGarmin using USB, PyGarmin with etrex HCx, PyGarmin to Google Earth... Before breaking code you might have done on PyGarmin or code you might have, using PyGarmin, I would like to discuss here some changes I would like to make on PyGarmin: Short-time changes: - Add new classes Axxx, Lxxxx, Dxxxx to support new models (ETrex Legend, Vista...) - Add new models protocols Middle-time changes: - Change the main() method to support program parameters, using optparse - Add writers, perhaps as plugins, to directly download GPS informations to GPX, KML, LOC, CSV. - Split garmin.py by moving data (model id, protocols, versions...) to a new file 'constants.py' I think that pygarmin.py should stay as simple and easy as possible, and additionnal functionalities should be added in another program using PyGarmin, perhaps through plugins. This could also make possible to have a simple GUI for people who don't like console... but this is not for today. As a PyGarmin user, ex- or co-developers, do you have any opinion on all thoses changes ? Regards, Cédric D. |
From: David A. <dav...@gm...> - 2007-10-16 22:12:27
|
On 16/10/2007, Bjorn Tillenius <bjo...@gm...> wrote: > It looks like there are problems communicating with your device. Are you > sure that the garmin_gps module is loaded, and your device is located at > /dev/ttyUSB0? (check the output from dmesg) Yes the module is loaded and ttyUSB0 is correct. This works fine with GPS Manager. $ lsmod | grep garmin garmin_gps 19844 0 usbserial 34152 1 garmin_gps usbcore 134912 7 garmin_gps,usbserial,usb_storage,libusual,ehci_hcd,ohci_hcd dmesg shows: [18213612.816000] ohci_hcd 0000:00:02.1: wakeup [18213613.200000] usb 2-2: new full speed USB device using ohci_hcd and address 8 [18213613.404000] usb 2-2: configuration #1 chosen from 1 choice [18213613.404000] garmin_gps 2-2:1.0: Garmin GPS usb/tty converter detected [18213613.404000] usb 2-2: Garmin GPS usb/tty converter now attached to ttyUSB0 > Also, the garmin_gps module is known to be a bit buggy, it doesn't work > for all people. If you have pyUSB installed, you might want to try my > branch that has native USB support. You can find information about the > branch at https://code.launchpad.net/~bjornt/pygarmin/edge-305, and > you'll need bzr to get it. If you just want to try it out, you could > download the latest version of GarminSync at > https://launchpad.net/garmin-sync/+download, which contains a copy of > the branch. Before you test it, make sure to unload the garmin_gps > module, though ("rmmod garmin_gps"). > > You can use the USB layer similar to the serial one: > > phys = garmin.USBLink() > gps = garmin.Garmin(phys) I installed PyUSB 0.4.1 and edge-305 revision 97 (via bzr). Running python and making a call to garmin.USBLink() as root gives me the following error: In [2]: phys = garmin.USBLink() --------------------------------------------------------------------------- usb.USBError Traceback (most recent call last) src/edge-305/<ipython console> src/edge-305/garmin.py in __init__(self) 1606 self.handle.claimInterface(0) 1607 start_packet = self.constructPacket(0, self.Pid_Start_Session) -> 1608 sent = self.handle.bulkWrite(0x02, start_packet) 1609 start_packet = self.constructPacket(0, 0x10) 1610 sent = self.handle.bulkWrite(0x02, start_packet) USBError: error submitting URB: No such file or directory Running it again produces: USBError: could not claim interface 0: Device or resource busy Each invocation alternates between those two error messages. Maybe there's still a missing piece of the puzzle? Also, semi-related but gpstrans-0.40 segfaults when trying to talk to my GPSr, for some unknown reason. -- David. |
From: David A. <dav...@gm...> - 2007-10-16 07:59:21
|
On 16/10/2007, Bjorn Tillenius <bjo...@gm...> wrote: > It looks like there are problems communicating with your device. Are you > sure that the garmin_gps module is loaded, and your device is located at > /dev/ttyUSB0? (check the output from dmesg) Thanks Bjorn, I'll give that a try at the next opportunity and report back if I still have issues. Regards, David. |
From: Bjorn T. <bjo...@gm...> - 2007-10-16 06:50:11
|
On Tue, Oct 16, 2007 at 05:49:24PM +1300, David Antliff wrote: > Hello, > > I tried pygarmin (SVN checkout, today) with my new Vista HCx and I > believe I have a protocol error: > > phys = garmin.SerialLink("/dev/ttyUSB0") > gps = garmin.Garmin(phys) > > Gives me the following errors (they alternate, changing each time I > execute that last statement): It looks like there are problems communicating with your device. Are you sure that the garmin_gps module is loaded, and your device is located at /dev/ttyUSB0? (check the output from dmesg) Also, the garmin_gps module is known to be a bit buggy, it doesn't work for all people. If you have pyUSB installed, you might want to try my branch that has native USB support. You can find information about the branch at https://code.launchpad.net/~bjornt/pygarmin/edge-305, and you'll need bzr to get it. If you just want to try it out, you could download the latest version of GarminSync at https://launchpad.net/garmin-sync/+download, which contains a copy of the branch. Before you test it, make sure to unload the garmin_gps module, though ("rmmod garmin_gps"). You can use the USB layer similar to the serial one: phys = garmin.USBLink() gps = garmin.Garmin(phys) Note that if you don't have your permission set up (see http://www.gpsbabel.org/os/Linux_Hotplug.html), you'll need to run it as root. Regards, Bjorn |
From: David A. <dav...@gm...> - 2007-10-16 04:49:20
|
Hello, I tried pygarmin (SVN checkout, today) with my new Vista HCx and I believe I have a protocol error: phys = garmin.SerialLink("/dev/ttyUSB0") gps = garmin.Garmin(phys) Gives me the following errors (they alternate, changing each time I execute that last statement): src/pygarmin/trunk/pygarmin/garmin.py in __init__(self, physicalLayer) 1515 protos = GetProtocols(self.prod_id, self.soft_ver) 1516 except KeyError: -> 1517 raise Exception, "Couldn't determine product capabilities" 1518 physicalLayer.settimeout(5) 1519 Exception: Couldn't determine product capabilities AND: src/pygarmin/trunk/pygarmin/garmin.py in __init__(self, physicalLayer) 1499 def __init__(self, physicalLayer): 1500 self.link = L000(physicalLayer) # at least initially -> 1501 (self.prod_id, self.soft_ver, 1502 self.prod_descs) = A000(self.link).getProductData() 1503 src/pygarmin/trunk/pygarmin/garmin.py in getProductData(self) 239 def getProductData(self): 240 fmt = "<hh" --> 241 self.link.sendPacket(self.link.Pid_Product_Rqst,"") 242 data = self.link.expectPacket(self.link.Pid_Product_Data) 243 (prod_id, soft_ver) = struct.unpack(fmt, data[:4]) src/pygarmin/trunk/pygarmin/garmin.py in sendPacket(self, ptype, data, readAck) 119 if debug > 5: print "< packet %3d : " % ptype, hexdump(data) 120 if readAck: --> 121 self.readAcknowledge(ptype) 122 123 def readPacket(self, sendAck=1): src/pygarmin/trunk/pygarmin/garmin.py in readAcknowledge(self, ptype) 164 tp, data = self.readPacket(0) 165 if (tp & 0xff) != self.Pid_Ack_Byte or ord(data[0]) != ptype: --> 166 raise LinkException, "Acknowledge error" 167 168 def sendAcknowledge(self, ptype): Link Error: Acknowledge error I presume this may be a protocol issue? I'm keen to help - what can I do? -- David. |
From: Bjorn T. <bjo...@gm...> - 2007-07-02 09:32:46
|
Hi, I bought a Garmin Edge 305 a while ago, and I was looking at how to interface with it in Linux, when I found this project. Even though pygarmin doesn't support all the commands the Edge 305 uses, it looks like it shouldn't be too hard to extend it to do what I want. For those of you that are interested, I've already started, making it possible to download the tracks from an Edge 305. You can find the branch at https://code.launchpad.net/~bjornt/pygarmin/edge-305 (If you click on "Browse code" you can see the diffs of the different commits). What I've done so far is to first add a switch that makes it possible to use a GPS, even though not all commands are available. This makes it easier to add support for new GPS devices, since you can focus at one part at a time (instead of adding all commands at once). I've also added enough support to get the tracks downloaded from the GPS. I plan to add all the remaining commands as well, and I'd also like to add tests to pygarmin, so that it'll be easier to changed pygarmin, while making sure that it still works. And if no one objects, I'd like to clean up the code to make it conform to PEP-8. Now, what is the procedure of getting it commited to the pygarmin svn repository? It doesn't seem like this project is very active at the moment. And another question, I see that there's both a garmin.py and a dev_garmin.py, what's the deal with that? I understand that dev_garmin.py is basically a branch of garmin.py, but I'd like to unify the two so that it's not confusing where to add new code. Regards, Bjorn |
From: Javier G. <jav...@gm...> - 2007-05-18 14:52:14
|
Hi, I own a Nuvi 350 and I'd like to be able to communicate it with my pc. I've been looking around but there are some things I still don't understand: I don't have a serial cable, can I buy one to use it with nuvi? None of the serial cables I've seen in the garmin website seem to be compatible with nuvi. I've read Garmin's documentation, but my knowledge of device communication in windows is actually none. I suppose I'll have to try... I've found this post about communications via USB: http://www.thescripts.com/forum/thread640521.html I couldn't make it work though... Does anyone has succeded in comunicating via USB? Regards, javier |
From: James B. <coy...@ho...> - 2007-01-19 11:34:43
|
Hi all,=20 Probably a simple one but I tried to execute the following on my etrex and = found: [james@jbuckle pygarmin-0.7]$ ./pygarmin /dev/ttyS0/ tracks Traceback (most recent call last): File "./pygarmin", line 234, in ? main() File "./pygarmin", line 231, in main app.run() File "./pygarmin", line 114, in run sys.stderr.write(sys.exc_info()[1] + '\n') TypeError: unsupported operand type(s) for +: 'instance' and 'str' Is this a config error? Can anyone point me in the right direction, this pa= ckage looks fairly helpful! Thanks James _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
From: Gaughan, S. <Ste...@st...> - 2007-01-18 16:59:13
|
Thanks for the information, I will see if I can get that work. It sounds like creating a virtual serial port is the way to go, so I'll have to see if I can stumble my way through that. =20 I tried using a sample version of Franson GPSGate, without any success, but will look at that again. Thanks, Steve =20 -----Original Message----- From: pyg...@li... [mailto:pyg...@li...] On Behalf Of Alec Bennett Sent: Saturday, January 13, 2007 2:08 PM To: pyg...@li... Subject: [Pygarmin-misc] interfacing the Garmin GPSMaps with pygarmin viaUSB under Windows... Steve Gaughan had a question about interfacing the Garmin GPSMap 60c via USB with pyGarmin under Windows. If it's anything like the GPSmap 60CSx, you'll need to create a "virtual serial port" first. I just did this (with the 60CSx) and found a program called Franson GPSGate, which does the job nicely. It's not free, but has a lite version that costs $10, and there's a full 14 day demo. It creates a com port and then relays all the info it gets from teh Garmin to that com port. Works great with NetStumbler, etc. Garmin used to make a virtual serial port app, but looks like only for older units? http://www.garmin.com/products/garminmobile20/ Another problem with the 60CSx via USB is it won't send NMEA or text only, only the Garmin format. That's not a problem with PyGarmin, but it might be with other apps/modules. Personally I couldn't get pyGarmin to work under Windows, couldn't get the Win32SerialLink to work. I read in the mailing list about some changes in CVS that allow the use of pySerial, but couldn't find them, I could only find the SVN stuff. I just ordered a combo serial and data cable off ebay for $12 shipped, I'm hoping to use PySerial alone, but we'll see. Anyway, hope this helps. ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ PyGarmin-misc mailing list PyG...@li... https://lists.sourceforge.net/lists/listinfo/pygarmin-misc |
From: Alec B. <wry...@gm...> - 2007-01-14 06:24:58
|
I gather that the main release of PyGarmin is pretty out of date, and most importantly for me doesn't work under Windows. From reading the mail list archives I can see that that's been fixed in CVS, replacing the Win32SerialLink with the pyserial module. Can anyone point me in the direction of the CVS repository? I see the SVN on Pygarmin's sourceforge page, but not the CVS. I looked through the CVS versions and couldn't find any version that used pyserial. |
From: Alec B. <wry...@gm...> - 2007-01-13 19:08:21
|
Steve Gaughan had a question about interfacing the Garmin GPSMap 60c via USB with pyGarmin under Windows. If it's anything like the GPSmap 60CSx, you'll need to create a "virtual serial port" first. I just did this (with the 60CSx) and found a program called Franson GPSGate, which does the job nicely. It's not free, but has a lite version that costs $10, and there's a full 14 day demo. It creates a com port and then relays all the info it gets from teh Garmin to that com port. Works great with NetStumbler, etc. Garmin used to make a virtual serial port app, but looks like only for older units? http://www.garmin.com/products/garminmobile20/ Another problem with the 60CSx via USB is it won't send NMEA or text only, only the Garmin format. That's not a problem with PyGarmin, but it might be with other apps/modules. Personally I couldn't get pyGarmin to work under Windows, couldn't get the Win32SerialLink to work. I read in the mailing list about some changes in CVS that allow the use of pySerial, but couldn't find them, I could only find the SVN stuff. I just ordered a combo serial and data cable off ebay for $12 shipped, I'm hoping to use PySerial alone, but we'll see. Anyway, hope this helps. |