john-38787364 / antifier

Convert the output from USB Tacx turbo trainers into ANT+ signals
MIT License
52 stars 20 forks source link

test with t1942 device #5

Open PieterMiser opened 7 years ago

PieterMiser commented 7 years ago

Hi,

What a nice project! It would be wonderful having my old Tacx fortius ant+ connected and experience zwift to it’s full extent. I tested the interface with my fortius trainer but couldn’t get my trainer connected. Probably because the controller doesn’t get initialized. Unlike the T1932 model, firmware (FortiusSWPID1932Renum.hex) must be downloaded to t1942 controller once it is connected. This firmware upload is controlled by the tacx software. A non-initialized controller is represented as 3651:e6be. Once the firmware upload has completed the controller will represent itself as 3651:1942.

Would it be possible to create an upload program to get this controller initialized? The open source project ‘golden cheetah’ has such function to upload the firmware https://github.com/GoldenCheetah/GoldenCheetah/blob/master/src/Train/LibUsb.cpp

afbeelding

I wish it could be of any help to get this function incorporated but i’m lacking programming skills. (I choose the wrong course at university😉).

Already big props for the project so far. Pieter

paha77 commented 7 years ago

@PieterMiser Does the firmware need to be uploaded every time you connect the trainer and start the tacx software or only once?

PieterMiser commented 7 years ago

every time you connect the trainer

john-38787364 commented 7 years ago

OK I think we can use a windows port of fxload (https://wiki.epfl.ch/cfavi/fxload-libusb) to upload the TACX firmware file. On Windows platforms the firmware is installed by the standard Tacx software as c:\windows\system32\FortiusSWPID1942Renum.hex- can you find this?

Could you find this file and download the windows fxload here: https://github.com/john-38787364/tacx-ant/raw/master/T1942/fxload-libusb.exe

Then run from the console: fxload-libusb.exe -I FortiusSWPID1942Renum.hex -t fx -vv

and see if the device reappears with 3651:1942 . I'm not sure whether you'd need to add the device path- line 343 of the file you posted doesn't seem to say we need to

john-38787364 commented 7 years ago

OK have confirmed ability to upload firmware: Can you download fxload-libusb.exe and FortiusSWPID1942Renum.hex from https://github.com/john-38787364/tacx-ant/tree/master/T1942

Then run: fxload-libusb.exe -I FortiusSWPID1942Renum.hex -t fx -vv from the command line? (both files need to be in the same directory)

You now need to install it as a libusb device:

  1. Right click on it and select "update driver software"
  2. Select "Browse my computer for driver software"
  3. Select "Let me select from a list of device drivers on my computer"
  4. Select libusb-win32 devices
  5. Select ANT USB Stick 2, then OK in the warning, then close

Once you've done this, can you download the https://github.com/john-38787364/tacx-ant/blob/master/T1942/T1942_debug.py script and run it via Python in the command line, and send me the output?

There is an exe in the T1942/dist directory if you prefer

john-38787364 commented 7 years ago

exe: https://github.com/john-38787364/tacx-ant/raw/master/T1942/dist/T1942_debug.exe

PieterMiser commented 7 years ago

I've followed your instructions as described above: upload of the firmware and driver installation went fine.

I ran T1942_debug.exe and did a couple of pedal strokes. You will find the output attached. The yellow LED on the T1942 device starts flashing when running T1942debug.exe which means there's communication between PC and T1942.

outputdebug.log

Fyi, I also ran a test with the interface application: ant+ connection works, but there's no feedback from the trainer. All values (HR and frequency) remain zero and the yellow LED doesn't flash when running tacx-interface.Exe.

outtacx.log

john-38787364 commented 7 years ago

Great thanks- no the 1942 isn't integrated into the interface application yet. Any chance you could rerun for 10 minutes with the latest exe?

The latest one automatically initialised the 1942, then will progressively increase resistance so we can work out the force values produced by the trainer

PieterMiser commented 7 years ago

Ran the 10min test (tyre pressure around 7bar):

10min.log

The controller could not be initalized by the .exe application. I don't have the default driver installed for an unitialized t1942 device. Perhaps that's the problem, but actually I don't have a clue. Anyway, I've attached a screenshot of my device manager.

For the 10min test, I initialized the device with the script.

cmd

device manager

init.log

john-38787364 commented 7 years ago

You need to run the T1942_debug application from the same directory cokntaining fxload-libusb and the .hex firmware file :)

On Mon, 16 Oct 2017, 19:43 PieterMiser, notifications@github.com wrote:

Ran the 10min test (tyre pressure around 7bar):

10min.log https://github.com/john-38787364/tacx-ant/files/1388641/10min.log

The controller could not be initalized by the .exe application. I don't have the default driver installed for an unitialized t1942 device. Perhaps that's the problem, but actually I don't have a clue. Anyway, I've attached a screenshot of my device manager.

For the 10min test, I initialized the device with the script.

[image: cmd] https://user-images.githubusercontent.com/32778269/31628569-63bad9e2-b2b1-11e7-8f2f-e9326ce2e0b9.jpg

[image: device manager] https://user-images.githubusercontent.com/32778269/31628764-fc450822-b2b1-11e7-8f35-651206fea669.jpg

init.log https://github.com/john-38787364/tacx-ant/files/1388675/init.log

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/john-38787364/tacx-ant/issues/5#issuecomment-336990556, or mute the thread https://github.com/notifications/unsubscribe-auth/AfAO_fxjIhYYfiSoC8KdO6xgDaalO6DXks5ss6O-gaJpZM4P48dP .

--

PieterMiser commented 7 years ago

Did a second test. t1942_debug.exe works fine. Thanks for your help.

john-38787364 commented 7 years ago

Could you do the full 10 minutes and send me the log. Start the script with

out.log

On Thu, 19 Oct 2017, 19:02 PieterMiser, notifications@github.com wrote:

Did a second test. t1942_debug.exe works fine. Thanks for your help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/john-38787364/antifier/issues/5#issuecomment-337988873, or mute the thread https://github.com/notifications/unsubscribe-auth/AfAO_cVcOOou8tlPVkq4Y_mX8e78nhFbks5st46egaJpZM4P48dP .

PieterMiser commented 7 years ago

here it is

out.log

john-38787364 commented 7 years ago

Thanks Pieter. Does this graph look reasonable?

https://plot.ly/~JohnTaylord7f0/10/

x axis left right is gradually increasing resistance sent to trainer (i.e. time) blue dots are braking force exerted by trainer- looks relative linear orange line is your cadence No heart rate data

did the resistance increase fairly smoothly? Can you correlate with road grade?

PieterMiser commented 7 years ago

Hi John,

Graph looks OK. very linear and little variation at low and mid power. linear but drop outs at high power. At high power, I wasn't able to maintain a sufficient speed. High power and low speed result in more friction between the tyre and the trainer, less efficient pedaling and power losses.

Resistance increase was smooth and, to my feeling, pretty similar to the road grades in the tacx software.

john-38787364 commented 7 years ago

Great I think we've got it cracked. I assume you didnt have a heart belt on?

PieterMiser commented 7 years ago

Indeed, without heart belt.