lincomatic / kalenji-gps-watch-reader

Automatically exported from code.google.com/p/kalenji-gps-watch-reader
0 stars 0 forks source link

No Data imported from a CW-500 #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Launch program ./kalenji_reader
2. Choose transfer option in section Data of the watch
3. Watch keeps in Ready state

What is the expected output? What do you see instead?
The output keeps blank.

What version of the product are you using? On what operating system?
Os: Debian wheezy/3.2.0-4-amd64
kalenji-gps-watch-reader: 4.1

Please provide any additional information below.
Log files are created but no data imported.

lsusb shows this line:
Bus 006 Device 017: ID 0fcf:1008 Dynastream Innovations, Inc. 

and I'm attaching the last log file.

Please could you give any help to solve this.
Thanks in advance

Original issue reported on code.google.com by jordi.ni...@gmail.com on 26 Feb 2013 at 12:54

Attachments:

GoogleCodeExporter commented 9 years ago
From the logs, multiple messages are received in the same buffer. I already 
observed that sometime but only on broadcast messages so it had no impact.

The method "receive" for CWKalenji500SD needs to be modified so that it handle 
this problem.

Original comment by colin.pi...@gmail.com on 26 Feb 2013 at 1:16

GoogleCodeExporter commented 9 years ago
Hello,

I commited a fix this evening for this problem in SVN.
However, as I don't own this model of watch, I can't be 100% sure that it works 
well.
Can you give it a try ?

You can retrieve sources from SVN following instructions here:
https://code.google.com/p/kalenji-gps-watch-reader/source/checkout

Regards,
Colin

Original comment by colin.pi...@gmail.com on 27 Feb 2013 at 8:16

GoogleCodeExporter commented 9 years ago
Hello back

This is what I did
svn checkout http://kalenji-gps-watch-reader.googlecode.com/svn/trunk/ 
kalenji-gps-watch-reader-read-only
compiled again.
I had a compile Error, first include in "src/device/CWKalenji500SD.cc" was 
written in Uppercase.
After change it compiled without problems.
I have th esame behavior, just some seg fault some times, when the watch is not 
transfer mode.

Thanks for your help, hope my details do so.

I'm attaching the last log. 

Regards, Jordi

Original comment by jordi.ni...@gmail.com on 28 Feb 2013 at 9:00

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
OK, this log shows much more exchanges of data with the watch. I need to have a 
close look to understand what went wrong.

Original comment by colin.pi...@gmail.com on 28 Feb 2013 at 10:59

GoogleCodeExporter commented 9 years ago
Logs show that the getSessionDetails part goes well. However, retrieving the 
session content then fails at the very beginning because a message from the 
watch has a different content than what I had during my tests with it.

I commited a fix so that the program accept any content as long as the message 
type is correct.

Tell me whether the fix works or not.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 10 Mar 2013 at 8:43

GoogleCodeExporter commented 9 years ago
Hello

First of all thanks for your help.
Now I have a behavior much closer to work:

This is what I see when I start the program:
Sessions available for import:
    0 - 2013-03-08 21:11:00     2 laps          0 km              0s
    1 - 2013-03-10 10:04:00     5 laps          0 km              0s
List of sessions to import (space separated - 'all' to import everything): 

At this point if I choose 0 I get Retrieve session 0, and it stops, as it has 
imported the data but I don't see any file in the incoming directory, and I got 
a segmentation fault.
if I choose 1 it shows Retrieve session 1 but remains waiting for something.
Same as last if I choose all. Doesn't matter the number of sessions, 2,3,4, it 
hangs at the second.

Im attaching you the log files.

Let me clarify that also the km and seconds shown are wrong, both show 0 and 
should give positive values.

Please let me know if I can give any more help.

Original comment by jordi.ni...@gmail.com on 11 Mar 2013 at 9:40

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, I'll have a look this evening.

Original comment by colin.pi...@gmail.com on 11 Mar 2013 at 9:54

GoogleCodeExporter commented 9 years ago
Hello,

I found another difference between your logs and what I observed on the watch I 
used to implement this protocol: the encoding of laps is different. This was 
the source of the core.

I commited a fix in SVN. Hopefully this should work now !

For the duration and the distance that are wrong, don't worry. This is a glitch 
in the support of CWKalenji500 watches: this information is not available in 
the list of sessions. It needs to be improved but it doesn't prevent the import.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 11 Mar 2013 at 10:22

GoogleCodeExporter commented 9 years ago
Thanks a lot Colin.

Now it works.
Let me tell you what I did so it can help someone else with the same case.

I updated the repo: svn up
Cleaned the old compilation: make clean
Compiled again: make

Then I turned the watch in transfer data mode and launched the program, it 
seemed to work but I had a seg fault at the end.

So I cheecked sys log and saw that something was wrong with the libusb, I 've 
read about some bug in that lib so I've downloaded the version from debian 
unstable and installed with dpkg, and it worked, I could import in any format.

But then when I wanted to import a fitlog file with the geonaute software, 
lauched with wine, gave me an error, checking the xml I realized that the tag 
Activity was closed twice, once at the end of the line: />
 and an other time at the end of the file: </Activity>

Just removed / from this file src/output/Fitlog.cc line 25
compiled again and everything seems fine now, files created and well imported 
into the program.

Thanks a lot for all your help
Best regards

Jordi

Original comment by jordi.ni...@gmail.com on 12 Mar 2013 at 11:53

GoogleCodeExporter commented 9 years ago
Thanks a lot for reporting those two bugs (I fixed also the Activity tag that 
was closed twice) and supporting me for the patches.

Original comment by colin.pi...@gmail.com on 13 Mar 2013 at 8:19