profanum429 / v800_downloader

Tool to download data files from the Polar V800 GPS watch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polar v800

Pit30 opened this issue · comments

commented

Hello,
can anybody tell me how I have to install the V800 downloader on a Windows machine?
I want to download the files vom Polar V800 without using the internet.
Thanks in advance for your hint.

rgds
Pit

Hi @Pit30,

The V800 installers can be downloaded from the Releases page.

Cheers.

Hello,

#1--- When building the v800_downloader project with QT5,
( on Linux Mint 17.3 rose, 32 bits )

Running the QT5.Build command

g++ .... ...o ...o ...o binary/linux/libusb-1.0/libusb-1.0.a -ludev ...

i've got the error message

binary/linux/libusb-1.0/libusb-1.0.a

not found.

[

14:23:42: Starting: "/usr/bin/make"
g++ -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc/lib -o debug/v800_downloader

debug/tmp/main.o
debug/tmp/v800usb.o
debug/tmp/native_usb.o
debug/tmp/v800main.o
debug/tmp/v800fs.o
debug/tmp/v800export.o
debug/tmp/trainingsession.o
debug/tmp/fixnum.o
debug/tmp/message.o
debug/tmp/types.o
debug/tmp/varint.o
debug/tmp/moc_v800usb.o
debug/tmp/moc_native_usb.o
debug/tmp/moc_v800main.o
debug/tmp/moc_v800fs.o
debug/tmp/moc_v800export.o
debug/tmp/moc_trainingsession.o
debug/tmp/moc_message.o


binary/linux/libusb-1.0/libusb-1.0.a

-ludev
-lz
-L/opt/Qt5.0.2/5.0.2/gcc/lib
-lQt5Widgets
-lQt5Xml
-lQt5Gui
-lQt5Core
-lGL
-lpthread

/usr/bin/ld: i386:x86-64 architecture of input file binary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-core.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input filebinary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-descriptor.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file binary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-io.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input filebinary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-sync.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file binary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-hotplug.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input filebinary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-threads_posix.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file binary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-linux_usbfs.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input filebinary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-poll_posix.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `binary/linux/libusb-1.0/libusb-1.0.a(libusb_1_0_la-linux_udev.o)' is incompatible with i386 output
collect2: error: ld returned 1 exit status
make: *** [debug/v800_downloader] Error 1
14:23:44: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project v800_downloader (kit: Desktop Qt 5.0.2 GCC 32bit)
When executing step 'Make'
14:23:44: Elapsed time: 00:02.

]

... presumably because the delivered binary/linux/libusb-1.0/libusb-1.0.a is a 64bits versions :

ar x binary/linux/libusb-1.0/libusb-1.0.a

aa@x200a:/tmp/lu > ls
libusb-1.0.a libusb_1_0_la-hotplug.o libusb_1_0_la-linux_usbfs.o libusb_1_0_la-sync.o
libusb_1_0_la-core.o libusb_1_0_la-io.o libusb_1_0_la-poll_posix.o libusb_1_0_la-threads_posix.o
libusb_1_0_la-descriptor.o libusb_1_0_la-linux_udev.o libusb_1_0_la-strerror.o

aa@x200a:/tmp/lu > file *
libusb-1.0.a: current ar archive
libusb_1_0_la-core.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-descriptor.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-hotplug.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-io.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-linux_udev.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-linux_usbfs.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-poll_posix.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-strerror.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-sync.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
libusb_1_0_la-threads_posix.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

#2--- So i tryed manually with the 32bits native Linux installation with -lusb-1.0 :

g++ .... ...o ...o ...o -lusb-1.0 -ludev ...

instead of

g++ .... ...o ...o ...o binary/linux/libusb-1.0/libusb-1.0.a -ludev ...

-> success and v800_downloader executable created .

#3---However, v800_downloader can not open usb device !

g++ -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc/lib -o debug/v800_downloader

debug/tmp/main.o
debug/tmp/v800usb.o
debug/tmp/native_usb.o
debug/tmp/v800main.o
debug/tmp/v800fs.o
debug/tmp/v800export.o
debug/tmp/trainingsession.o
debug/tmp/fixnum.o
debug/tmp/message.o
debug/tmp/types.o
debug/tmp/varint.o
debug/tmp/moc_v800usb.o
debug/tmp/moc_native_usb.o
debug/tmp/moc_v800main.o
debug/tmp/moc_v800fs.o
debug/tmp/moc_v800export.o
debug/tmp/moc_trainingsession.o
debug/tmp/moc_message.o

-lusb-1.0

-ludev
-lz
-L/opt/Qt5.0.2/5.0.2/gcc/lib
-lQt5Widgets
-lQt5Xml
-lQt5Gui
-lQt5Core
-lGL
-lpthread

v800_downloader > cd debug/
v800_downloader/debug > ls -lsrt

total 5540
4 drwxr-xr-x 2 aa aa 4096 Jun 21 12:55 tmp
2768 -rwxr-xr-x 1 aa aa 2831058 Jun 21 14:29 v800_downloader

v800_downloader/debug >
v800_downloader/debug > ./v800_downloader
Opening the USB device...
Error opening device

with the popup message 'Failed to open device!'

v800_downloader/debug >

--> ./v800_downloader : Error opening device <--

What do you suggest ?

Best Regards

try this:

sudo ./v800_downloader &

; - )

===
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
Error opening device

--- about the x86-64 binary/linux/libusb-1.0/libusb-1.0.a issue ---

i still do not understand why this busb-1.0.a external module is joined within the v800_downloader pkg !

indeed:

not success with :
g++ -m32 -Wl,-O1 -Wl,-rpath,/opt/Qt/5.5/gcc ... binary/linux/libusb-1.0/libusb-1.0.a ...

... because the delivered is 64bits !

success with this genuine x86-32 lib:
g++ -m32 -Wl,-O1 -Wl,-rpath,/opt/Qt/5.5/gcc ... /lib/i386-linux-gnu/libusb-1.0.so.0.1.0 ...

where the full path is given with:
dpkg -L libusb-1.0-0

:-)

I'm not sure why @profanum429 included the static libusb library in the repo. That was okay for me, but broke when Ubuntu 16.10 arrived, so I simply removed libusb (both the library, and header) and update backend.pri to use the OS-supplied libusb instead.

pcolby@50eb628#diff-a24f9a9268f19e1ff4636603db0757bf

Cheers.

Hello guys

As i recompiled this wonderful v800downloader,

i realized my above comments
castett commented on 25 Nov 2016 as somewhat cumbersome
and
castett commented on 21 Jun 2016 • edited as being lost in confusion.

I decided today to clear it up.

castett commented on 21 Jun 2016 • edited :

  • i mentioned an issue, with the radix problem from my side to not beeing able to make it clear.

castett commented on 25 Nov 2016

  • i revealed the issue, and propose a (esoteric) recipy to clear it
    the problem comes out that:
    the profanum429/v800_downloader pkg provides a 64bits
$ grep libusb f.l
./v800_downloader/binary/linux/libusb-1.0
./v800_downloader/binary/linux/libusb-1.0/libusb-1.0.a
./v800_downloader/binary/linux/libusb-1.0/libusb.h
./v800_downloader/binary/win/libusb-1.0
./v800_downloader/binary/win/libusb-1.0/libusb-1.0.a
./v800_downloader/binary/win/libusb-1.0/libusb.h

obviously not compatible with my venerable 32bits system !

and the Qt compilation failed as the compilation runs the backend.pri

$ grep backend.pri f.l                                                                                                   
./v800_downloader/src/usb/backend/backend.pri
$ cat a.a 
INCLUDEPATH += $$PWD
VPATH += $$PWD

HEADERS += native_usb.h
SOURCES += native_usb.cpp

win32 {
    INCLUDEPATH += binary/win/libusb-1.0
    LIBS += binary/win/libusb-1.0/libusb-1.0.a
}

linux {
    INCLUDEPATH += binary/linux/libusb-1.0
    LIBS += binary/linux/libusb-1.0/libusb-1.0.a -ludev
}

macx {
    include(osx/osx.pri)
}

as pcolby mentioned in pcolby commented on 25 Nov 2016 edit and replace

linux {
    INCLUDEPATH += binary/linux/libusb-1.0
    LIBS += binary/linux/libusb-1.0/libusb-1.0.a -ludev
}

with

linux {
    INCLUDEPATH += binary/linux/libusb-1.0
    LIBS += /lib/i386-linux-gnu/libusb-1.0.so.0.1.0    -ludev
    # LIBS += /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0  -ludev


}

OR , performs a manual compilation linking command as

# v8.mk) # shpolar v8.mk  # v800_downloader: make && sudo run #{{{
   
   export plrfv8=/mypathto/800_downloader

    # ---
    echo
    echo --- started ...
    echo
    [ -f $plrfv8 ] && rm -v $plrfv8
    # ---
    # cd $plrpv8
    #0 -o release/v800_downloader \
    g++ -Wl,-O1 -Wl,-rpath,/opt/Qt/5.7/gcc_64/lib \
        -o $plrfv8 \
        \
        fixnum.o \
        main.o \
        message.o \
        moc_message.o \
        moc_native_usb.o \
        moc_trainingsession.o \
        moc_v800export.o \
        moc_v800fs.o \
        moc_v800main.o \
        moc_v800usb.o \
        native_usb.o \
        trainingsession.o \
        types.o \
        v800export.o \
        v800fs.o \
        v800main.o \
        v800usb.o \
        varint.o \
        \
        -L/opt/Qt/5.7/gcc_64/lib \
        -L/usr/lib64 \
        -lGL \
        -lQt5Core \
        -lQt5Gui \
        -lQt5Widgets \
        -lQt5Xml \
        -lpthread \
        -ludev \
        -lz \
        \
        /lib/i386-linux-gnu/libusb-1.0.so.0

        # -- 32 bits
        # /lib/i386-linux-gnu/libusb-1.0.so.0.1.0
        # -- 64 bits
        # /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0

        # -- profanum429's pkg provided libusb 
        # binary/linux/libusb-1.0/libusb-1.0.a

    [ $? ] && {
    echo
    echo --- compil ok
    echo
    ls -lrt $plrfv8
    echo
    echo file $plrfv8
    echo
    echo .
}

# ;; # }}}

That's all folks

Secundly,

the XML
TrainingCenterDatabase xsi:schemaLocation
instance of the TCX files

http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd

is obsolated, and must (not should), but just must by

http://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd

obsolate

<?xml version='1.0' encoding='utf-8'?>
<TrainingCenterDatabase xsi:schemaLocation="
    http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2 
    http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd"
    xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

compatible as for 20170624. 0322

<?xml version='1.0' encoding='utf-8'?>
<TrainingCenterDatabase xsi:schemaLocation="
    http://www8.garmin.com/xmlschemas/TrainingCenterDatabase/v2 
    http://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd"
    xmlns="http://www8.garmin.com/xmlschemas/TrainingCenterDatabase/v2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

This is achieved in

$ grep -Rl www.garmin.*xsd  .
/bipolar/src/polar/v2/trainingsession.cpp

$ grep  -n www.garmin.*xsd  ./bipolar/src/polar/v2/trainingsession.cpp
2231:                                   "http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd"));

sed -i 's,http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd,http://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd,'  bipolar/src/polar/v2/trainingsession.cpp

and rebuild it all

;-)