Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get started on Windows? #5

Closed
nc54 opened this issue May 10, 2012 · 75 comments
Closed

How to get started on Windows? #5

nc54 opened this issue May 10, 2012 · 75 comments
Labels

Comments

@nc54
Copy link

nc54 commented May 10, 2012

I have a Schwinn 810. I am a windows 7 user but don't have a clue how to download and use this software. I'm new to github and I am not a developer. Are there instructions anywhere?

On a side note - may or may not be helpful. I have figured out how to directly access the database created by the schwinn software. The data can be easily converted to CSV, then anyone with some programming skills can convert the data to GPX or TCX etc. I don't have the programming skills to do it but it should be quite simple. I'd like to see it in a simple to use GUI program. I'd be happy to provide the method and password to access the hidden database.

@mlt
Copy link
Owner

mlt commented May 11, 2012

Unfortunately I didn't have time to make detailed step by step instructions :( I will set up few web pages at some point. Meanwhile feel free to use wiki and edit missing or unclear parts.

There is no need in original software or MS Access database used by it, to be able to use this software. Also another user explained how to access DB from original software. The goal I pursue is to push data from watch into various web communities without pressing any single button on PC. Thus no GUI is needed other than a web browser later. So far it works under GNU/Linux upon watch connect. There are some issues with Windows that makes it a PITA. Therefore it would be somewhat lame to extract data with original software and then converting it to CSV. It is going to be too many button clicks and non-portable. I have some sketches for GUI just to show the download progress. I didn't push it to git though. Regarding offline use, it is interesting to me to feed data into R for various plots and analyses. However it is not so easily "GUIfiable". Though it can be somewhat made so with some python, Qt, and rpy.

The best way to stay current is to install Python, all the modules, and fetch updates from github. However, if you don't want to mess with all that, keep reading.

There is a link on the main page that says "downloads". Download the latest one (schwinn810_win32_e37a681.7z as of now). Use 7-zip to unpack the archive to whatever location you like.
But first of all you need a different driver for USB-COM bridge (that resides in the clip). That driver is not compatible with default one, and it is likely that either original or my software will be working but not both depending on the driver. I didn't test that, but I believe that it is how it is.

If you want kml, gpx generation, then you need to download and install gpsbabel.

You will want to use notepad or any other text editor to adjust various options in cmd files. Namely, replace C:\Python32\python %~dp0\download.py with just download.exe and alike. Also make sure you use proper COM port with --port option.

Let me know if you get stuck somewhere.

P.S. The previous windows binaries were tested by me on Windows 7. Those were built with Python 3.2 . However they are quite outdated and may miss few things here and there. Unfortunately there are some reasons to migrate back to Python 2 for a while. The very latest binaries I've mentioned above were built with Python 2.7 . However I had no chance to test it on Windows. (Same code used to work on Ubuntu GNU/Linux).

@nc54
Copy link
Author

nc54 commented May 11, 2012

I am naclark on woot (the first guy to crack the database) I will do my
best to follow these instructions and let you know where I fail. I'd hate
have to install a Linux VM just to use this watch. Thanks for your hard
work, hopefully in the end it will all be a beautiful and well packaged
simple to install software. Thanks again for your work.

On Thu, May 10, 2012 at 10:15 PM, Mikhail Titov <
[email protected]

wrote:

Unfortunately I didn't have time to make detailed step by step
instructions :( I will set up few web pages at some point. Meanwhile feel
free to use wiki and
edit missing or unclear parts.

There is no need in original software or MS Access database used by it, to
be able to use this software. Also another user explained
how to access DB from original software. The goal I pursue is to push data
from watch into various web communities without pressing any single button
on PC. Thus no GUI is needed other than a web browser later. So far it
works under GNU/Linux upon watch connect. There are some issues with
Windows that makes it a PITA. Therefore it would be somewhat lame to
extract data with original software and then converting it to CSV. It is
going to be too many button clicks and non-portable. I have some sketches
for GUI just to show the download progress. I didn't push it to git though.
Regarding offline use, it is interesting to me to feed data into R for
various plots and analyses. However it is not so easily "GUIfiable". Though
it can be somewhat made so wit
h some python, Qt, and rpy.

The best way to stay current is to install Python, all the modules, and
fetch updates from github. However, if you don't want to mess with all
that, keep reading.

There is a link on the main page that says "downloads". Download the latest one
(schwinn810_win32_e37a681.7z as of now). Use 7-zip to unpack the archive to
whatever location you like.
But first of all you need a different driver for USB-COM bridge (that
resides in the clip). That driver is not compatible with default one, and
it is likely that either original or my software will be working but not
both depending on the driver. I didn't test that, but I believe that it is
how it is.

If you want kml, gpx generation, then you need to download and install
gpsbabel.

You will want to use notepad or any other text editor to adjust various
options in cmd files. Namely, replace C:\Python32\python %~dp0\download.py with just download.exe and alike. Also make sure you
use proper COM port with --port option.

Let me know if you get stuck somewhere.

P.S. The previous windows binaries were tested by me on Windows 7. Those
were built with Python 3.2 . However they are quite outdated and may miss
few things here and there. Unfortunately there are some reasons to migrate
back to Python 2 for a while. The very latest binaries I've mentioned above
were built with Python 2.7 . However I had no chance to test it on Windows.
(Same code used to work on Ubuntu GNU/Linux).


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 11, 2012

There is no need in Linux VM just to fetch data. I'd suggest to use cmd (via Start->Run-> cmd ) to test all the settings. Otherwise CLI windows will close as soon as program terminates. As soon as everything is set up, you can have a shortcut on your desktop pointing to schwinn810.cmd.

What would you like to see in the "beautiful and well packaged
simple to install software"? I can pack it into MSI instead of ZIP. However I can't foresee all the cases like what COM port to use and where to store extracted data. It needs to be configured just once. After that TCX (that is all some folks need) can be extracted in one click. So it this point I see GUI as an overkill to just edit initial settings. There are tons of software to show workout stats. It would be more appropriate to just develop a plug-in rather than start all the story anew.

The main purpose for this project was to make data on watch available freely on all platforms that have a driver for SiLabs CP2102 bridge. As you mentioned, it was even "guarded" on Windows, and was simply unavailable on other platforms.

@nc54
Copy link
Author

nc54 commented May 11, 2012

Again thanks for your work on this. I got stuck trying to install the
driver. I see that the USBXpress driver comes up by default, I
installed the VCP driver but using the EXE from silabs. I guess I'm not
sure of how to "replace" the driver as it is still trying to use USBXpress.
I could uninstall the USBXpress driver but it will just re-install it
when I plug the USB in.

On Fri, May 11, 2012 at 10:42 AM, Mikhail Titov <
[email protected]

wrote:

There is no need in Linux VM just to fetch data. I'd suggest to use cmd
(via Start->Run-> cmd ) to test all the settings. Otherwise CLI
windows will close as soon as program terminates. As soon as everything is
set up, you can have a shortcut on your desktop pointing to
schwinn810.cmd.

What would you like to see in the "beautiful and well packaged
simple to install software"? I can pack it into MSI instead of ZIP.
However I can't foresee all the cases like what COM port to use and where
to store extracted data. It needs to be configured just once. After that
TCX (that is all some folks need) can be extracted in one click. So it this
point I see GUI as an overkill to just edit initial settings. There are
tons of software to show workout stats. It would be more appropriate to
just develop a plug-in rather than start all the story anew.

The main purpose for this project was to make data on watch available
freely on all platforms that have a driver for SiLabs CP2102 bridge. As
you mentioned, it was even "guarded" on Windows, and was simply unavailable
on other platforms.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 11, 2012

You can get fixed driver from downloads page. It is named cp2102_VCP_Windows_XP_S2K3_Vista_7.7z. There are just simple changes in inf file to make another vendor & product id to be recognized. I had it explained after the second screen shot on the wiki page. You can compare inf files in unpacked mine archive with the stock one.

@nc54
Copy link
Author

nc54 commented May 11, 2012

I uninstalled rebooted and re-installed with the modified driver with the
same results. I disabled the USBXpress driver and re inserted the USB and
this is what I get [image: Inline image 1]
http://dl.dropbox.com/u/19832238/Capture.PNG
I tried manually installing the driver by pointing it to extracted driver
folder, but that did not work.

On Fri, May 11, 2012 at 12:44 PM, Mikhail Titov <
[email protected]

wrote:

You can get fixed driver from downloads page. It is named
cp2102_VCP_Windows_XP_S2K3_Vista_7.7z. There are just simple changes in
inf file to make another vendor & product id to be recognized. I had it
explained after the second screen shot on the wiki page. You can compare inf
files in unpacked mine archive with the stock one.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 11, 2012

Unfortunately I can't see an image. You may want to post it on imageshack or anywhere else and link from there. I guess you've updated your post. Could you also show what is wrong with it? Like if you double click on it. Try deleting it and then refreshing the list. Also keep reading for 64 bit case.

Are you using 64 bit machine? i've tested it on 32 bit. If this is the case, could you edit slabvcp.inf from my 7z archive with updated driver in a notepad or something? You'll see a section [SiLabs] that contains %USB\VID_10C4&PID_EA61.DeviceDesc%=silabser.Dev, USB\VID_10C4&PID_EA61. However same line is missing in [SiLabs.NTamd64]. Could you add it in there and try to reinstall?

Though devices are same, however EA60 is recognized as VCP one and EA61 as USBXpress. All we do is claim that VCP driver handles devices with EA61 product ID. I had this line missing for 64 bit platform.

As far as I remember _there is no need to either reboot or un-install anything_. Just choose update driver for existing hardware in device manager. Uncheck "compatible devices only" (I'm not sure if it is relevant) and browse to that unpacked folder. It should recognize it now as valid.

@nc54
Copy link
Author

nc54 commented May 11, 2012

Yes I am running 64 bit. I will try this on Monday and report back.

On Fri, May 11, 2012 at 1:37 PM, Mikhail Titov <
[email protected]

wrote:

Unfortunately I can't see an image. You may want to post it on imagescack
and link from there.

Are you using 64 bit machine? i've tested it on 32 bit. If this is the
case, could you edit slabvcp.inf from my 7z archive with updated driver
in a notepad or something? You'll see a section [SiLabs] that contains
%USB\VID_10C4&PID_EA61.DeviceDesc%=silabser.Dev, USB\VID_10C4&PID_EA61.
However same line is missing in [SiLabs.NTamd64]. Could you add it in
there and try to reinstall?

As far as I remember there is no need to either reboot or un-install
anything. Just choose update driver for existing hardware in device
manager. Uncheck "compatible devices only" (I'm not sure if it is relevant)
and browse to that unpacked folder. It would recognize it now as valid.


Reply to this email directly or view it on GitHub:
#5 (comment)

@nc54
Copy link
Author

nc54 commented May 14, 2012

That seemed to do the trick. Now the driver seems to be loading. I changed the bps as instructed. I only found one CMD for editing schwinn810.cmd The only thing I changed was the COM port. As the rest looked fine. After editing I plugged the watch in, plugged the usb in, and ran schwinn810.cmd but nothing happened.

@echo off

SET "DIR=%HOME%\My Documents\My Runs"
SET "GPSBABEL=C:\Programs\GPSBabel\gpsbabel.exe"
SET "Z7=C:\Program Files\7-Zip\7z.exe"

%~dp0\download.exe ^
 --port COM4 ^
 --hook %~dp0\babelize.cmd ^
 --dir "%DIR%"

"%GPSBABEL%" -i unicsv,utc=5 -f "%DIR%\waypoints.csv" ^
 -o gpx -F "%DIR%\waypoints.gpx" ^
 -o kml,lines=1,points=0,track=1,trackdirection=1 -F "%DIR%\waypoints.kml"

rem %COMSPEC% /C DEL /Q /F "%DIR%\waypoints.kmz" > nul

rem "%Z7%" a -tzip "%DIR%\waypoints.kmz" "%DIR%\waypoints.kml" > nul

@mlt
Copy link
Owner

mlt commented May 14, 2012

There should bebabelize.cmd as well, you can get it from github in case I forgot to include it in an archive. If you do not plan to use gpsbabel to get anything else like KML, GPX, or you don't plan to use csv2tcx.exe, then remove --hook %~dp0\babelize.cmd ^ line.

How did you run it? Do not just double click (at least until everything is set up). If something goes wrong the window will just disappear with no chances to read what actually happened. Instead, run cmd command processor and navigate to the folder with unpacked stuff. Run from within cmd window. It should output at least something even if it crashes for some reason.

If you haven't used command processor much, the following link may be helpful.

@nc54
Copy link
Author

nc54 commented May 14, 2012

http://dl.dropbox.com/u/19832238/Capture3.PNG
http://dl.dropbox.com/u/19832238/Capture4.PNG

I have babelize.cmd, I just did not see anything in there to edit.

On Mon, May 14, 2012 at 12:24 PM, Mikhail Titov <
[email protected]

wrote:

There should bebabelize.cmd as well, you can get it from github in case
I forgot to include it in an archive. If you do not plan to use gpsbabel to
get anything else like KML, GPX, or you don't plan to use csv2tcx.exe,
then remove --hook %~dp0\babelize.cmd ^ line.

How did you run it? Do not just double click (at least until everything is
set up). If something goes wrong the window will just disappear with no
chances to read what actually happened. Instead, run cmd command
processor and navigate to the folder with unpacked stuff. Run from within
cmd window. It should output at least something even if it crashes for
some reason.

If you haven't used command processor much, the following link may be
helpful
.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 14, 2012

May I ask you to try previous binaries from download section? Unpack it somewhere aside and just replace download.exe in your setup with that from this archive. At least this worked for me on 32 bit Win7. If this works than it is likely something happened with migration back to Python2. Otherwise I'll try to find 64 bit machine to test myself.

@nc54
Copy link
Author

nc54 commented May 14, 2012

http://dl.dropbox.com/u/19832238/Capture5.PNG

On Mon, May 14, 2012 at 12:59 PM, Mikhail Titov <
[email protected]

wrote:

May I ask you to try previous binaries
from download section? Unpack it somewhere aside and just replace
download.exe in your setup with that from this archive. At least this
worked for me on 32 bit Win7. If this works than it is likely something
happened with migration back to Python2. Otherwise I'll try to find 64 bit
machine to test myself.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 14, 2012

Ouch... my bad. Indeed exe is not self sufficient. Then set up stuff from another archive independently.

Adjust schwinn810.cmd in that second archive as you did for the newer code, i.e. make sure it uses COM4 and download.exe instead of calling python.

P.S. Also AFAIK it is possible to copy/paste error dialog content so that you don't have to upload screenshots. Try Ctrl-C in such dialogs ... then surround pasted text in here with 3 back quotes ` in the beginning and at the end to make it pre-formatted text.

@nc54
Copy link
Author

nc54 commented May 14, 2012

I changed the com port, but the download was already there, I added
in %~dp0 and now I get back
http://dl.dropbox.com/u/19832238/Capture6.PNG

On Mon, May 14, 2012 at 1:41 PM, Mikhail Titov <
[email protected]

wrote:

Ouch... my bad. Indeed exe is not self sufficient. Then set up stuff from
another archive independently.

Adjust schwinn810.cmd in that second archive as you did for the new one,
i.e. make sure it uses COM4 and download.exe instead of calling python.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 14, 2012

This looks like you've missed line continuation symbol ^ on the previous line. Generally it should be one line like %~dp0\download.exe --port COM4 --dir path_to_my_location. For readability reasons I split it into multiple lines. There must be ^ symbol at the end of the previous line. Otherwise system tries to execute something named --port and can't find such executable.

@nc54
Copy link
Author

nc54 commented May 14, 2012

I edited the last reply as I had a problem.

Already had that in the first time. I tried adding the _%~dp0_ in front
of download, still same problem.

rem start
%~dp0\download.exe ^
rem --port schwinn810.bin ^
 --hook %~dp0\babelize.cmd ^
 --dir "%HOME%\Documents\My Runs"
 --port COM4 ^

On Mon, May 14, 2012 at 3:57 PM, Nathan Clark [email protected]:

I changed the com port, but the download was already there, I added
in %~dp0 and now I get back
http://dl.dropbox.com/u/19832238/Capture6.PNG

On Mon, May 14, 2012 at 1:41 PM, Mikhail Titov <
[email protected]

wrote:

Ouch... my bad. Indeed exe is not self sufficient. Then set up stuff from
another archive independently.

Adjust schwinn810.cmd in that second archive as you did for the new
one, i.e. make sure it uses COM4 and download.exe instead of calling
python.


Reply to this email directly or view it on GitHub:
#5 (comment)

@nc54
Copy link
Author

nc54 commented May 14, 2012

OK, Let me fix that. I think I tried adding that in. But let me make sure.

@nc54
Copy link
Author

nc54 commented May 14, 2012

Same problem

rem start
%~dp0\download.exe ^
rem --port schwinn810.bin ^
--port COM4 ^
 --hook %~dp0\babelize.cmd ^
 --dir "%HOME%\Documents\My Runs"

edit triple back quotes should be on their own lines. Optionally you can add bat after the opening triplet to add syntax highlightling.

@mlt
Copy link
Owner

mlt commented May 14, 2012

Also move rem outside of a "single" line.

It was as if you tried to run

%~dp0\download.exe rem --port schwinn810.bin --port COM4 --hook %~dp0\babelize.cmd --dir "%HOME%\Documents\My Runs" . Which is a bit of nonsense.

@mlt
Copy link
Owner

mlt commented May 14, 2012

@echo off
%~dp0\download.exe ^
  --port COM4 ^
  --hook %~dp0\babelize.cmd ^
  --dir "%HOME%\Documents\My Runs"

@mlt
Copy link
Owner

mlt commented May 14, 2012

I'm not sure if I ever mentioned it, "%HOME%\Documents\My Runs" must exist. It probably will be fixed at some point.

@nc54
Copy link
Author

nc54 commented May 15, 2012

Yes, my runs is mentioned on one of the pages. I had tried editing the
command file for both

 --dir "%HOME%\Documents\My Runs" 

and

 --dir "%HOME%\My Documents\My Runs"

I'm still getting the Python27.dll error
on the old archive and "port can not be opened on the new.

On Mon, May 14, 2012 at 4:47 PM, Mikhail Titov <
[email protected]

wrote:

I'm not sure if I ever mentioned it, "%HOME%\Documents\My Runs" must
exist. It probably will be fixed at some point.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 15, 2012

Regarding directory name, it is totally up to you. For Windows XP, one would use My Documents, for Windows 7 Documents perhaps shall be used.

Something is got mixed up in your set up. For an old archive, I did not use Python 2.7 at all. If it was requiring something, it would be Python 3.2 related. For older version, make sure you are in a proper folder and that cmd file refers to download.exe in that old archive. So if you have 2 folder like schwinn810_new_py27 and schwinn810_old_py32, all the stuff in there should be from corresponding archive. Replace back download.exe in schwinn810_new_py27 after unsuccessful attempt to use download.exe from schwinn810_old_py32.

Meanwhile, I'll see what can be wrong with python 2.7 . I saw some posts on stackoverflow that there is no need to call open() after serial object was created on Windows. I remember it worked fine though with python 3.2. I'll see.

@mlt
Copy link
Owner

mlt commented May 15, 2012

I confirm that it fails. Hold on for a while. I'll see whether open() removal will help on Windows.

@mlt
Copy link
Owner

mlt commented May 15, 2012

Thanks for your patience. I've uploaded newer version. It looks like it did the trick. Remove existing archives and unpacked ones, and just unpack this one. It already pre-set up for COM4 and %HOME%\Documents\My Runs , where %HOME% in your case is likely C:\Users\nc54

@mlt
Copy link
Owner

mlt commented May 15, 2012

Also I've noticed that I had to open files for writing on Windows in binary mode. Otherwise there are double new lines appear...

@nc54
Copy link
Author

nc54 commented May 15, 2012

Port error again. However I was able to borrow a 32 bit XP machine and it
started to work, it listed the tracks and laps then no such file or
directory: u'\My Documents\My Runs\0511201.track' The system cannot
find the path specified
I have created a folder My Documents/My Runs
under my user.

On Tue, May 15, 2012 at 10:05 AM, Mikhail Titov <
[email protected]

wrote:

Thanks for your patience. I've uploaded newer version.
It looks like it did the trick. Remove existing archives and unpacked ones,
and just unpack this one. It already pre-set up for COM4 and
%HOME%\Documents\My Runs , where %HOME% in your case is likely
C:\Users\nc54


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 15, 2012

Hm... so is it an issue with 64 bit Windows 7? Did you completely remove previous two folders?

Could you copy/paste (also this) complete error message here? As an alternative, you can redirect all output in a file instead of screen by having something like

@echo off
%~dp0\download.exe ^
  --port COM4 ^
  --hook %~dp0\babelize.cmd ^
  --dir "%HOME%\Documents\My Runs" > c:\out.txt 2>c:\err.txt

provided you can write to c:\

Usually path name should not start with just \\My Documents\\... at least C:\Documents and Settings\User is missing.

There is a chance that either %HOME% not defined which is weird, or it actually tries to call some other tools like gpsbabel or something.

You may also try to remove --hook option to make sure it is not caused by something else in babelize.cmd.

@echo off
%~dp0\download.exe ^
  --port COM4 ^
  --dir "C:\Documents and Settings\you user\My Documents\My Runs"

Also... could you type echo %HOME% and tell me what it returns?

@nc54
Copy link
Author

nc54 commented May 16, 2012

I tried `csv2tcx --tz America/Denver 0511201' Still no TCX.
http://dl.dropbox.com/u/19832238/Capture13.PNG

On Wed, May 16, 2012 at 1:20 PM, Mikhail Titov <
[email protected]

wrote:

USERPROFILE works!

I guess something (or I) created HOME on my laptop and I assumed it was
common. I'll change that. Thanks!

GPX has no support for heart rate data. PERIOD. However you can tell gpsbabel to use
particular column from .points file to turn it into let's say a comment,
or description for a waypoint in GPX. For this you should use XCSV format
instead of unicsv. However it is a separate story, and it is easier to
forget about it since no any other software will understand it was a heart
rate anyway.

Try the following:

  1. Copy all the files for a given track (0511201.track, 0511201.laps,
    0511201.points) into the same folder with executables
  2. Navigate to that folder with cmd using cd
  3. Execute that explicitly like csv2tcx --tz America/Denver 0511201

Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 17, 2012

http://dl.dropbox.com/u/19832238/Capture13.PNG

It looks like you are not using the latest code. Did you update library.zip and all other stuff? It is not enough to update exe only.

The easiest way is to copy working babelize.cmd and schwinn810.cmd into unpacked new archive.

@nc54
Copy link
Author

nc54 commented May 22, 2012

Yes, I had downloaded everything together when I deleted all existing
instances.

@mlt
Copy link
Owner

mlt commented May 22, 2012

Yes, I had downloaded everything together when I deleted all existing instances.

I presume in overall you did it twice over entire history of this issue? First time when there was an unnecessary call to open and another time when I fixed packaged pytz.

I just downloaded and unpacked a version from github and tested it. It works as expected.

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>dir /w
 Volume in drive C has no label.
 Volume Serial Number is 58D0-C78A

 Directory of C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32

[.]                        [..]
0421101.laps               0421101.points
0421101.track              babelize.cmd
bz2.pyd                    csv2tcx.exe
download.exe               library.zip
pyexpat.pyd                python27.dll
schwinn810.cmd             select.pyd
settings.exe               simplejson._speedups.pyd
tcx2garmin.exe             unicodedata.pyd
yaml.dll                   _ctypes.pyd
_hashlib.pyd               _socket.pyd
_ssl.pyd                   _yaml.pyd
              22 File(s)      9,049,620 bytes
               2 Dir(s)  26,813,685,760 bytes free

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>csv2tcx --tz America/Denver 0421101 > 0421101.tcx

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>dir /w
 Volume in drive C has no label.
 Volume Serial Number is 58D0-C78A

 Directory of C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32

[.]                        [..]
0421101.laps               0421101.points
0421101.tcx                0421101.track
babelize.cmd               bz2.pyd
csv2tcx.exe                download.exe
library.zip                pyexpat.pyd
python27.dll               schwinn810.cmd
select.pyd                 settings.exe
simplejson._speedups.pyd   tcx2garmin.exe
unicodedata.pyd            yaml.dll
_ctypes.pyd                _hashlib.pyd
_socket.pyd                _ssl.pyd
_yaml.pyd
              23 File(s)     10,698,962 bytes
               2 Dir(s)  26,811,498,496 bytes free

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>

@nc54
Copy link
Author

nc54 commented May 22, 2012

I just downloaded and started fresh. Before I was getting an empty TCX
file now I'm not getting one at all. You have been very helpful, but I
fear I am becoming quite a bother. So I understand if you don't have time
for this. I re-red the entire issue, I'm not sure what I am missing.
Looks like the most recent file on github is 2 months old - older than the
one with the open fixed.
http://dl.dropbox.com/u/19832238/Capture111.PNG

On Tue, May 22, 2012 at 9:14 AM, Mikhail Titov <
[email protected]

wrote:

Yes, I had downloaded everything together when I deleted all existing
instances.

I presume in overall you did it twice over entire history of the this
issue? First time when there was an unnecessary call to open and another
time when I fixed packaged pytz.

I just downloaded and unpacked a version from github and tested it. It
works as expected.

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>dir /w
 Volume in drive C has no label.
 Volume Serial Number is 58D0-C78A

 Directory of C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32

[.]                        [..]
0421101.laps               0421101.points
0421101.track              babelize.cmd
bz2.pyd                    csv2tcx.exe
download.exe               library.zip
pyexpat.pyd                python27.dll
schwinn810.cmd             select.pyd
settings.exe               simplejson._speedups.pyd
tcx2garmin.exe             unicodedata.pyd
yaml.dll                   _ctypes.pyd
_hashlib.pyd               _socket.pyd
_ssl.pyd                   _yaml.pyd
             22 File(s)      9,049,620 bytes
              2 Dir(s)  26,813,685,760 bytes free

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>csv2tcx --tz
America/Denver 0421101 > 0421101.tcx

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>dir /w
 Volume in drive C has no label.
 Volume Serial Number is 58D0-C78A

 Directory of C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32

[.]                        [..]
0421101.laps               0421101.points
0421101.tcx                0421101.track
babelize.cmd               bz2.pyd
csv2tcx.exe                download.exe
library.zip                pyexpat.pyd
python27.dll               schwinn810.cmd
select.pyd                 settings.exe
simplejson._speedups.pyd   tcx2garmin.exe
unicodedata.pyd            yaml.dll
_ctypes.pyd                _hashlib.pyd
_socket.pyd                _ssl.pyd
_yaml.pyd
             23 File(s)     10,698,962 bytes
              2 Dir(s)  26,811,498,496 bytes free

C:\123\schwinn810_win32_e37a681_pytz\schwinn810_win32>

Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented May 22, 2012

I fear I am becoming quite a bother

It is okay as long as you are making a progress.

Looks like the most recent file on github is 2 months old - older than the one with the open fixed.

I don't know how to make it more clear http://imagepaste.nullnetwork.net/viewimage.php?id=3945 . Try to convert existing track data by manually calling csv2tcx as I described above. The reason that you are getting .. unrecognized argument: Runs ... is because you are missing quotes around the arguments that you supply to that executable so that full file name gets split by spaces into separate arguments like csv2tcx --tz America/Denver "C:\...\Document\My" "Run\..." while only 1 file name shall be given. Anyway try to convert it manually first (not called from babelize.cmd as a result of schwinn810.cmd execution).

P.S. Also you may find it more convenient to use something like Far Manager to navigate in folders and to view/edit files. It is also easier to edit the command line. Ctrl+Enter will copy highlighted file name into command line and Ctrl+O will turn panels off/on which makes easier to edit the command line and see the result.

@hadeone
Copy link

hadeone commented May 31, 2012

First of all GREAT WORK on this project.

I was able to get everything running great on Win7 64 using your windows instructions and notes from this thread.

I manually execute csv2tcx and it makes a tcx file with all the data. The only problem that I haven't figured out yet is an issue with the time or timezone.

When I upload my tcx to trainingpeaks.com it shows a long flat line from 0:00 to whatever time the run started (which is also wrong but the duration is correct when using America/Denver as the timezone). When using the US/Eastern tz the long line from 0:00 is still present and the duration is now 5:00 hr as opposed to 1 hr.

This is a minor inconvenience as my chart is unreadable due to the long time frame since that long line is introduced.
I can just graph the data by distance and it looks fine so if no one has a quick fix for my problem or can tell me what I did wrong it's no big deal.

Thanks again for your efforts mlt! Getting HRM data off this watch and on to a chart is great and makes the watch an even better deal!

@mlt
Copy link
Owner

mlt commented May 31, 2012

Hey, @hadeone ! You are welcome!

The only problem that I haven't figured out yet is an issue with the time or timezone.

Have you tried to open resulting TCX in a text editor? Do time stamps make sense? I've noticed that for instance Garmin Connect requires time to be in GMT and did not like when I had a local time zone offset specified according to ISO 8601, e.g. it may not like 2012-04-15T08:52:07-05:00 but would accept 2012-04-15T13:52:07Z. Though I believe I left the latter format to be produced by csv2tcx.py.

if no one has a quick fix for my problem or can tell me what I did wrong it's no big deal.

If what you see in a text editor looks about right, try maybe some other online services to see if it is just trainingpeaks does not like something particular. Try comparing time stamp formats with those in a legitimate file that shows up correctly, and maybe post both time stamps in here. Does it show 0:00 in trainingpeaks again if you leave out --tz America/Denver leaving it default to Central Time Zone?

I didn't try that particular site but it worked okay for MapMyRun and Garmin Connect. Otherwise you could upload binary dumps produced with --debug option (both download.py and settings.py) as found in your TEMP folder for me to look at using sendspace, dropbox or something. Just rename it after each run otherwise those will get overwritten.

Also would you mind sharing your SET->PROD.ID reported by watch as well?

@hadeone
Copy link

hadeone commented May 31, 2012

I am new to TCX files but this is what I think a timestamp looks like at the top of my file :

< Activities >
< Activity Sport="Running ">
#<#Id> 2012-05-30T19:19:00-05:00 <#/Id>
< #Lap StartTime="2012-05-31T00:19:00+00:00">
then they continue like this:
<#Time>2012-05-31T00:19:54+00:00<#/Time>
...
<#Time>2012-05-31T00:19:58+00:00<#/Time>
...
etc. (dont mind the #, I added them in so the text would show)

Is this timestamp format created by download.exe or by csv2tcx ?

It still shows 0:00 if I leave out the --tz when running csv2txc.exe.

E000000000000000000001-020 is the PROD.ID shown by my watch.

I will work on getting a dump if none of the info above is helpful, will also try Garmin Connect and let you know the outcome.

Thanks again!

PS. is there a way to delete the data from the watch after downloading it or should I just do it on the watch itself?

@mlt
Copy link
Owner

mlt commented May 31, 2012

timestamp looks like in my file : 2012-05-31T01:20:53+00:00

So trainingpeaks really wants to see Z instead of +00:00. I'll see how to change that.

Is this timestamp format created by download.exe or by csv2tcx ?

download.exe deals with .points, .laps, and .track only in local time zone as reported by a watch. It is csv2tcx that does the job of putting all to TCX.

E000000000000000000001-020 is the PROD.ID shown by my watch.

eh ... what? What brand is it? Schwinn? Are those really all zeros??? E.g. mine is

e111204
002882
1110162
01-020

I will work on getting a dump

No need, thanks. I'm pretty sure it is all about TZ formatting. Some folks don't respect standards. Last time I tried it, resulting TCX did validate just fine against Garmin's XSD which says all time stamps shall be of xsd:dateTime which in turn mentions ISO 8601. So it should be fine in theory to use local zones.

@hadeone
Copy link

hadeone commented May 31, 2012

It's a Schwinn and it does show all zeros. I got it as a "display model" but it's probably some kind of refurb. Who knows what they did to it.

BTW on the Garmin Connect site everything imports fine, but I prefer training peaks because their chart overlaps all the data.

Like I said before if it's not a quick fix I can live with it the way it is. You already did enough for everyone that was frustrated with the crappy software this watch came with.

@mlt
Copy link
Owner

mlt commented May 31, 2012

if it's not a quick fix

It probably is. Please update

@hadeone
Copy link

hadeone commented May 31, 2012

You got it! Works perfectly now!

Thanks for everything!

@mlt
Copy link
Owner

mlt commented May 31, 2012

You are welcome! I guess I can close it.

@mlt mlt closed this as completed May 31, 2012
@nc54
Copy link
Author

nc54 commented Jun 11, 2012

I took a breather for a couple of weeks on this. Came back today, Downloaded the latest versions, (but did not unpack them) using the old files the TCX worked, and uploaded fine to strava.com. I don't feel like I did anything different, but I probably needed to step away from it for a bit. Thanks for putting up with me.

@nc54
Copy link
Author

nc54 commented Jun 11, 2012

So it works but I have to manually run the csv2tcx. You have said that it breaks up the "my" and "Documents" into two separate arguments. I get that, but I don't get how to fix it. I have tried doing documents\MyRuns (and creating the folder) just to see if it would work, but it does not.

Currently using %~dp0\csv2tcx.exe --tz America/Denver "%1" > "%1.tcx" in babelize and SET "DIR=%USERPROFILE%\Documents\MyRuns which seems to fix part of the problem. I no longer get unrecognized arguments, but I still get " The system cannot find the path specified

Right now I'm pretty content that I can access the data, even if I have to manually run csv2tcx but it would be convenient to do one click and be done with it. Hadone, care to share your babelize and schwinn810.cmd I'd like to see what you have different.

@mlt
Copy link
Owner

mlt commented Jun 12, 2012

Downloaded the latest versions, (but did not unpack them)

What do you mean by saying did not unpack? Some previous binary versions missed time zone data rendering csv2tcx.exe (but not py) useless.

Do you get KML and GPX files from gpsbabel provided you have it installed and set path correctly?

it would be convenient to do one click and be done with it

I see you like an idea of minimal number of clicks? :-)

@mlt mlt reopened this Jun 12, 2012
@nc54
Copy link
Author

nc54 commented Jun 12, 2012

Since I last wrote, I deleted all files and downloaded the most recent.
I thought I was careful to copy the paths over for GPSbabel from the first time, but It looks like somewhere along the line of downloading new versions I did not.

Correct path is now there and It works, getting all files Including TCX, but I do have to use "MyRuns" instead of "My Runs" and is fine by me. I am still getting "the system cannot find the path specified error" (just one now and not two). Path to 7-zip looks good and I don't see any ill effects. So I think I'm good. Thank you so much.

BTW NTIM the Percentages are still all funky.

@nc54 nc54 closed this as completed Jun 12, 2012
@nc54
Copy link
Author

nc54 commented Jun 12, 2012

OK, so I had only changed the path to GPSBabel in babalize, now that I changed it in schwinn810.cmd I get no errors.

@mlt
Copy link
Owner

mlt commented Jun 12, 2012

Good to hear you see no errors now!

BTW NTIM the Percentages are still all funky.

Do point numbers appear correct if you open your dot points file in let's say MS Excel as coma separated file? Those are in the second column from the right. I suspect it is an artifact of Python 3 to Python 2 rollback as integer division results in integer in the latter while print function expects a float and as a result garbage is printed. I can't test it right now but I've uploaded a version with the possible fix.

I thought I was careful to copy the paths over for GPSbabel from the first time, but It looks like somewhere along the line of downloading new versions I did not.

I encourage to use different names for your own particular configuration and keep babelize.cmd and schwinn810.cmd as templates. As you may have noticed there is no requirements what name of schwinn810.cmd should actually be. The same applies to babelize.cmd as it is only mentioned in schwinn810.cmd (or whatever you've called it). Perhaps I should rename those to .sample so it would be safe to overwrite all the stuff while updating.

@nc54
Copy link
Author

nc54 commented Jun 14, 2012

Do point numbers appear correct if you open your dot points file in let's say MS Excel as coma separated file?

Second column from the right titled "No" looks like an unique number starting at 33554433 increasing by one with each row.
But really, not a concern for me.

@mlt
Copy link
Owner

mlt commented Jun 14, 2012

Second column from the right titled "No" looks like an unique number starting at 33554433

That is not quite right. It should start from 1. It means I have incorrectly decoded the meaning of some fields. And my guess how to correct percentage issue was wrong.

Could you please share a binary dump using a Dropbox or something? You can get a binary dump named schwinn810.bin in your temporary folder (presumably %USERPROFILE%\Local Settings\TEMP) if you add --debug option to download.exe in your schwinn810.cmd. Please follow up on issue #10 if you are willing to help improve this software. While I can revert to using just a word (2 bytes) instead of a double word for point number, I'm curious why adjacent word is non-zero like on most devices.

I suspect that there might be 3 bytes dedicated to elevation (measured in cm). Does it report wrong elevation? For 2 bytes, maximum elevation would be 655 meters, while in Denver I truly believe it is more than that. 33554433 in hex is 0x2000001 . So my (already second) guess would be there are 3 bytes for elevation and 3 bytes for point number. Thus since you have 2 over there it would mean extra 2*65536 cm (1310.72 meters) shall be added to elevation reported as of now.

@nc54
Copy link
Author

nc54 commented Jun 14, 2012

I am not sure if elevation is correct, I think Strava auto corrects bases
on Topo data. Dump posted to issue #10

On Thu, Jun 14, 2012 at 3:17 PM, Mikhail Titov <
[email protected]

wrote:

Second column from the right titled "No" looks like an unique number
starting at 33554433

That is not quite right. It should start from 1. It means I have
incorrectly decoded the meaning of some fields. And
my guess how to correct percentage issue was wrong.

Could you please share a binary dump using a Dropbox or something? You can
get a binary dump named schwinn810.bin in your temporary folder
(presumably %USERPROFILE%\Local Settings\TEMP) if you add --debug
option to download.exe in your schwinn810.cmd. Please follow up on
issue #10 if you are willing to help improve this software. While I can
revert to using just a word (2 bytes) instead of a double word for point
number, I'm curious why adjacent word is non-zero like on most devices.

I suspect that there might be 3 bytes dedicated to elevation (measured in
cm). Does it report wrong elevation? For 2 bytes, maximum elevation would
be 655 meters, while in Denver I truly believe it is more than that.
33554433 in hex is 0x2000001 . So my (already second) guess would be there
are 3 bytes for elevation and 3 bytes for point number. Thus since you have
2 over there it would mean extra 2*65536 cm (1310.72 meters) shall be added
to elevation reported as of now.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented Jun 14, 2012

I am not sure if elevation is correct, I think Strava auto corrects bases on Topo data

I'm confident now about elevation.

Could you try to pioneer #9 for Strava auto-upload if you have time and would like to? The goal is to get all your data off the watch right into Strava with a single click.

@nc54
Copy link
Author

nc54 commented Jun 14, 2012

Ha, you know what a fan I am of the single click. I'll give it a try if
you have the patience. The competing aspect is really fun, but I'd like
to find something that can cue me in on how to better train. Do you know
of anything? I looked at trainingpeaks, but its overblown and require a fee
to use.

On Thu, Jun 14, 2012 at 4:12 PM, Mikhail Titov <
[email protected]

wrote:

I am not sure if elevation is correct, I think Strava auto corrects
bases on Topo data

I'm confident now about elevation.

Could you try to pioneer #9 for Strava auto-upload if you have time and
would like to? The goal is to get all your data off the watch right into
Strava with a single click.


Reply to this email directly or view it on GitHub:
#5 (comment)

@mlt
Copy link
Owner

mlt commented Jun 14, 2012

Do you know of anything? I looked at trainingpeaks, but its overblown and require a fee to use.

I'm using MapMyRun. However I don't like it much as it can't really related courses nearby thus you are always a leader of your own uploaded track :( Who would use someone else's course when you got one right off your device??? Also it has tons of ads.

AFAIK dailymile does not respect many features of TCX. I did not use either Strava or TrainingPeaks. But I heard from a friend of mine that Strava does recognize common parts of the course thus making it really possible to compete. I don't know if it is a feature of their app for iOS only and whether it would work with uploaded stuff.

I tend to think that Garmin Connect is not bad (example) just to visualize stuff. I did not pay attention to the terms of their service though whether it is okay to use it without Garmin devices.

While I'm interested in finding out what is the best out there, it does not really belong to either this software directly or this issue in particular.

@nc54
Copy link
Author

nc54 commented Jun 15, 2012

I signed up a garmin connect account and noticed that I can turn elevation
correction off. You are correct, elevation is way off.

On Thu, Jun 14, 2012 at 5:09 PM, Mikhail Titov <
[email protected]

wrote:

Do you know of anything? I looked at trainingpeaks, but its overblown
and require a fee to use.

I'm using MapMyRun. However I don't like it much as it can't really
related courses nearby thus you are always a leader of your own uploaded
track :( Who would use someone else's course when you got one right off
your device??? Also it has tons of ads.

AFAIK dailymile does not respect many features of TCX. I did not use
either Strava or TrainingPeaks. But I heard from a friend of mine that
Strava does recognize common parts of the course thus making it really
possible to compete. I don't know if it is a feature of their app for iOS
only and whether it would work with uploaded stuff.

I tend to think that Garmin Connect is not bad (example) just to visualize stuff. I
did not pay attention to the terms of their service though whether it is
okay to use it without Garmin devices.

While I'm interested in finding out what is the best out there, it does
not really belong to either this software directly or this issue in
particular.


Reply to this email directly or view it on GitHub:
#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants