ColinPitrat / kalenji-gps-watch-reader

A tool to import data from some Kalenji running watches
GNU General Public License v3.0
30 stars 11 forks source link

can't access usb device (On Move 100) #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.plug the GPS watch
2../kalenji_reader

What is the expected output? What do you see instead?
with "./kalenji_reader", I get the following error message :
error can't access usb device: -3LIBUSB_ERROR_ACCESS
with "sudo ./kalenji_reader", I get this error message :
error on USB operation code -7 - 11 LIBUSB_ERROR_TIMEOUT

What version of the product are you using? On what operating system?
v4.6 on Ubuntu 14.04 x64

Please provide any additional information below.
The watch is correctly detected and I can import GPX files when using ONconnect 
software on a Windows 7 session running in Virtualbox.

Original issue reported on code.google.com by drbouvie...@gmail.com on 13 May 2014 at 12:18

GoogleCodeExporter commented 9 years ago
Hello,

thanks for your feedback.

Can you provide the logs of the transaction (cf 
http://code.google.com/p/kalenji-gps-watch-reader/wiki/ConfigurationFile#Log_tra
nsactions) ?

Can you also build the software in debug (make debug instead of just make) and 
give me the standard output you get ?

Regards,
Colin

Original comment by colin.pi...@gmail.com on 14 May 2014 at 7:38

GoogleCodeExporter commented 9 years ago
So I switched to the trunk version, and I've built the software in debug mode.
Then I've run the software with this command :
$ sudo ./kalenji_reader 2>&1 | tee kalenji_reader_output.txt
Unfortunately, I still get the same error message. You'll find both log files 
in the attached files.

The watch is detected correctly with lsusb :
Bus 003 Device 003: ID 10c4:ea61 Cygnal Integrated Products, Inc. CP210x UART 
Bridge

In order to compile, I had to install libsusb-1.0-0-dev (2:1.0.17-1ubuntu2).

Don't hesitate if you need any more information. I look forward to try it out, 
right now I have to launch a virtualbox windows session everytime I want to get 
the GPX files from my watch, using the onConnect software. And it doesn't even 
export the elevation. The pain !

Original comment by drbouvie...@gmail.com on 16 May 2014 at 9:22

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

The software is using PylePGSPW1 device instead of OnMove100.
I just noticed that OnMove100 and PylePGSPW1 have the same vendorId/deviceId !

You can try to add the following option when launching the command:
-D OnMove100

If this solves the issue, I have to find how to handle this 'collision' that is 
very strange !

Regards,
Colin

Original comment by colin.pi...@gmail.com on 16 May 2014 at 11:55

GoogleCodeExporter commented 9 years ago
New attempt today, still unsuccessfull :
$ sudo ./kalenji_reader -D OnMove100

Here is the output from the terminal :

OnMove100::init() - init device
OnMove100::init() - step 1
OnMove100::init() - step 2
OnMove100::init() - step 3
OnMove100::init() - step 4
OnMove100::init() - step 6
OnMove100::init() - step 7
OnMove100::init() - step 8
OnMove100::init() - step 9
OnMove100::init() - step 10
OnMove100::init() - step 12
OnMove100::init() - step 13
OnMove100::init() - device init attempt 1
error on USB operation code -7 - 11 LIBUSB_ERROR_TIMEOUT

Original comment by drbouvie...@gmail.com on 17 May 2014 at 11:04

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

I'm not sure this is the only problem, but in case the init fail, it should be 
retried. I found an issue in the code that prevents it: after only 1 failure it 
aborts.

I commited a change in SVN to fix this. 
In case my patch doesn't help for your issue, would you be so kind to provide a 
dump of your watch while it's used in virtual box ?
Here is a link explaining briefly how to do it: 
http://wiki.colar.net/run_usb_traces_on_linux_of_windows_software_with_virtualbo
x#.U4ZLplI__K0

Regards,
Colin

Original comment by colin.pi...@gmail.com on 28 May 2014 at 8:51

GoogleCodeExporter commented 9 years ago
I updated to the latest revision (282), compiled and tried again : 
unfortunately it's still stuck at the same step. There's a log of that attempt 
attached with this message.

There's also the dump file. It was started right before I launched the 
ONconnect program in virtualbox.

Thanks for your support by the way !

Original comment by drbouvie...@gmail.com on 31 May 2014 at 7:01

Attachments:

GoogleCodeExporter commented 9 years ago
OK, so my patch works (we can see in the logs it retries) but it doesn't help.
From your dump from virtualbox, I can see that the exchange is very similar to 
what I had in the dumps I used to implement. I don't get what the problem is.

I need to patch again to dump more information about what the watch answers to 
the initialization sequence. I'll tell you when done.

Thanks for the time you're spending debugging this !

Regards,
Colin

Original comment by colin.pi...@gmail.com on 31 May 2014 at 7:31

GoogleCodeExporter commented 9 years ago
It works ! Your last patch indeed solved the problem, sorry for the false 
report.

I feel silly : it seems the watch wasn't correctly plugged during my last 
attempt.
I swear it didn't happened to me for ages ! But in my defence, the USB 
connector for this watch is quite awkward.

The altitude isn't exported though, but I will open another bug report for that 
I guess.

Anyway, it's great, I can finally retrieve my data.

Original comment by drbouvie...@gmail.com on 3 Jun 2014 at 7:14

GoogleCodeExporter commented 9 years ago
Hello,

no problem, I'm happy that it works !
For the elevation, I didn't find it when I analyzed the dumps, I think it's not 
available in the watch (do you have information linked to elevation on the 
watch itself ?)

There is a filter for kalenji_reader that allows to retrieve the elevation from 
GoogleMap: FixElevation. You can put multiple filters by separating them with 
commas. Another filter may interest you for the OnMove100: ComputeInstantSpeed. 
The reason is that OnMove100 reports average speed for each point where it 
should give instant speed. It only affects the HTML output however.

More details on filters here:
http://code.google.com/p/kalenji-gps-watch-reader/wiki/ConfigurationFile#Filters

To use it, you just have to put filter=FixElevation in your .kalenji_readerrc 
file.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 3 Jun 2014 at 7:22