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

Support KeyMaze 700 and similar devices #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

When I try to use this tool, I get this error :
Device not found or error opening USB device. Is your watch correctly plugged ?

I can find my watch in USB devices :

==lsusb==
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 5986:01aa Acer, Inc 
Bus 005 Device 002: ID 03f0:231d Hewlett-Packard 
Bus 004 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
=========

==dmesg==
...
[  293.128208] usb 4-1: new full speed USB device number 2 using ohci_hcd
[  293.681232] usbcore: registered new interface driver usbserial
[  293.681272] USB Serial support registered for generic
[  293.684255] usbcore: registered new interface driver usbserial_generic
[  293.684263] usbserial: USB Serial Driver core
[  293.690821] USB Serial support registered for pl2303
[  293.713664] usb 4-1: pl2303 converter now attached to ttyUSB0
[  293.715318] usbcore: registered new interface driver pl2303
[  293.715325] pl2303: Prolific PL2303 USB to serial adaptor driver
=========

I can get traces using SportTrack3 (with mono) and Globalstat - GH625 plugin.

Watch : Keymaze 700
libusb version : libusb-0.1-4, libusb-1.0-0 and libusb-1.0-0-dev.
kalenji-gps-watch-reader version : 1.0

Please let me know if I've done something wrong.
Thanks in advance, best regards, Edouard.

Original issue reported on code.google.com by edouard....@gmail.com on 22 Jan 2012 at 5:13

GoogleCodeExporter commented 9 years ago
Hello,

the model you use is a Keymaze 700. It's not the same device as CW Kalenji 700 
GPS. However, I'm interested on checking if it would be possible to support it.

As the constructor is the same, the protocol may be similar. To try to use it 
with your watch, you can do the following modification:

 - if you use downloadable version 1.0:
Replace 0x0483 by 0x067B and 0x5740 by 0x2303 in the following line of main.cc:
        if(deviceDescriptor.idVendor == 0x0483 && deviceDescriptor.idProduct == 0x5740)

 - if you use a recent version from SVN:
Replace 0x0483 by 0x067B and 0x5740 by 0x2303 in the following line of 
src/device/Kalenji.cc:
        _dataSource->init(0x0483, 0x5740);

If this doesn't work and you have access to a computer with windows, you can 
try to analyze what's going on during an import by using a tool like USBlyzer 
or SnoopyPro. I'm interested by such a dump to add support for Keymaze devices 
if you manage to produce one.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 28 Jan 2012 at 5:22

GoogleCodeExporter commented 9 years ago
Hello Colin,

Thank your for your answer. I tried your modification, here is the result :

./kalenji-gps-watch-reader/kalenji_reader 
libusb couldn't open USB device /dev/bus/usb/004/003: Permission denied.
libusb requires write access to USB device nodes.
libusb:error [op_kernel_driver_active] get driver failed error -1 errno 9
Transmission error: -99 - 9 Unknown error
libusb:error [op_claim_interface] claim interface failed, error -1 errno 9
libusb:error [op_claim_interface] claim interface failed, error -1 errno 9
Device not found or error opening USB device. Is your watch correctly plugged ?

Access restriction, I tried as root :
sudo ./kalenji-gps-watch-reader/kalenji_reader 
[sudo] password for doudou: 
Transmission error: -5 - 2 Unknown error
Device not found or error opening USB device. Is your watch correctly plugged ?

Will try to get a dump as you requested.

Best regards, Edouard.

Original comment by edouard....@gmail.com on 28 Jan 2012 at 9:52

GoogleCodeExporter commented 9 years ago
The "permission denied" error when using a standard user is very annoying. It 
depends on the distrib but on most of them, usb devices are not accessible by 
standard users and changing it durably depends on the distrib. 

I need to write a FAQ containing this question !

The "Unknown error" when you try as root means that Keymaze watches and Kalenji 
ones don't work the same way. I think the coding of the data may be the same 
but the protocol is different.

If you can produce a dump it will help me. I will also try on my side to check 
if I can find someone having a Keymaze.

Original comment by colin.pi...@gmail.com on 29 Jan 2012 at 5:41

GoogleCodeExporter commented 9 years ago
I managed to get traces from a Keymaze of a friend. I hadn't the occasion to 
validate yet but SVN version should be able to support it.

Can you try it ? You should use "-d Keymaze" option to use it.

Original comment by colin.pi...@gmail.com on 4 Feb 2012 at 12:43

GoogleCodeExporter commented 9 years ago
Hello Colin,

Thank you for your interest concerning this watch. I downloaded the latest 
release (the one that use keymaze by defaut if I'm right) and I get this error :

sudo ./kalenji_reader 
[sudo] password for doudou: 
Transmission error: -5 - 2 Unknown error
Transmission error: -1 - 2 LIBUSB_ERROR_IO
Error: transferred (-5) != length (5)
Transmission error: -7 - 2 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT
Transmission error: -7 - 0 LIBUSB_ERROR_TIMEOUT

I had to break it. Any idea of the problem?

When I plug the watch, it create /dev/ttyUSB0 that is writable by group dialout 
(my user is member of it) :
ll /dev/ttyUSB0 
crw-rw---- 1 root dialout 188, 0 2012-02-05 16:17 /dev/ttyUSB0

Is it possible to use this device (automatically or with an option)?

Thanks in advance, best regards, Edouard.

Original comment by edouard....@gmail.com on 5 Feb 2012 at 3:37

GoogleCodeExporter commented 9 years ago
OK, so this doesn't work ! I'll try to fix it ...

Original comment by colin.pi...@gmail.com on 5 Feb 2012 at 6:14

GoogleCodeExporter commented 9 years ago
As Kalenji 700 and KeyMaze 700 are different and as KeyMaze 700 is based on 
Globalsat GH-615, I should give a try to http://code.google.com/p/gh615/, no? I 
will let you know.

Best regards, Edouard.

Original comment by edouard....@gmail.com on 5 Feb 2012 at 9:14

GoogleCodeExporter commented 9 years ago
Hello,

I successfully get my tracks from my watch using gh615 software. So I will use 
this tool.

Thank you again for your interest on my problem, best regards, Edouard.

Original comment by edouard....@gmail.com on 7 Feb 2012 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by colin.pi...@gmail.com on 3 Jan 2013 at 5:51

GoogleCodeExporter commented 9 years ago
Issue 14 has been merged into this issue.

Original comment by colin.pi...@gmail.com on 22 Aug 2013 at 3:04

GoogleCodeExporter commented 9 years ago
From issue 14, it seems that the program core when used with a Keymaze 700. To 
be checked why. This is probably because the tentative support for it prevent a 
clean message to be issued. Registration of Keymaze 700 implementation should 
be commented in CVS and distributed sources as it's not working yet.

Original comment by colin.pi...@gmail.com on 22 Aug 2013 at 3:07

GoogleCodeExporter commented 9 years ago
Issue 14 has been merged into this issue.

Original comment by colin.pi...@gmail.com on 26 Aug 2013 at 5:25

GoogleCodeExporter commented 9 years ago
I'm proud to finally close this issue. 
Thanks to Amilcar Guerra for his help to support this device.

Original comment by colin.pi...@gmail.com on 25 Sep 2013 at 9:18