Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Vortex T1961 brake and T2172 head unit (~101, 117) #46

Open
WouterJD opened this issue Apr 11, 2020 · 187 comments
Open

Support for Vortex T1961 brake and T2172 head unit (~101, 117) #46

WouterJD opened this issue Apr 11, 2020 · 187 comments

Comments

@WouterJD
Copy link
Owner

hi, I own a Tacx i-vortex (the non-smart one). Would this work with it? I might give it a try :)

Originally posted by @iepuzaur in #14 (comment)

@WouterJD
Copy link
Owner Author

Hi @iepuzaur

I have created this separate issue for you.

Some questions:

  1. Could you ever use Tacx tts-4 software with your i-vortex?
  2. Is it connected to a PC with a USB-cable?
  3. Does the i-vortex have a headunit on the steering rod of your bicicle with number like 1902, 1904, 1932 or 1934?

If yes, there is a fair chance that FortiusANT may work and I will assist.
Just let me know!

By the way, where are you from? I like to know who I talk with :-)

@WouterJD
Copy link
Owner Author

https://tacx.com/product/i-vortex/

Is this the machine?

@iepuzaur
Copy link

Hi, Thanks for creating the topic, indeed the i-vortex is the one from the link you sent, except i have it on light green color. Now with spending time at home a lot, I wanted to use it again and discovered Tacx sold to Garmin, support is inexistent and if you lost your previous installation of TTS4, than it's rather useless.
It is the version before Vortex Smart and has only Ant+, without fe-c. the trainer works fine with TTS 4, connection is not made by usb cable, but through an Ant+ usb dongle.
I'll have a look at the repo and see if I manage anything, would be glad to test this.
Greets from Bucharest, Romania

@iepuzaur
Copy link

Head unit is 1962 though.

@WouterJD
Copy link
Owner Author

So your i-Vortex is from the time that Tacx wanted to keep software and hardware bundled and proprietary. What would be needed is to (1) understand how the i-Vortex communicates through ANT and (2) convert that tp "ANT+ FE-C". (1) is the challenge.

As said above: please try ExplorANT.py and check what it finds; that's the first step.
To do this you need a computer (windos, linux, mac) and (for a starter) with one USB ANT-dongle? If you want to start Zwift... from the same computer a second dongle is required.

I have been searching for an "i-Vortex ANT definition" and found the folllowing article:
https://www.dcrainmaker.com/2015/06/trainer-profile-zwifttrainerroadkinomap.html (June 2015)

So how do you upgrade your trainer? Via a simple app. Tacx today released a new utility app called ‘Tacx Utility’, this app connects to your Smart series trainer and updates the trainer’s firmware. Once upgraded, then 3rd party apps that support the ANT+ Trainer Profile can control it as they see fit.

Zwift: ... As long as you upgrade your trainers firmware first, you can then scan for the trainer using the usual Zwift option, which will in turn find the trainer and allow you to control it. Super simple.

It's interesting to give it a try.

@totalreverse
Copy link

It looks like Goldencheetah has support for the proprietary i-Vortex ANT protocol.
Check the src/ANT/ANTMessage.cpp file.

@WouterJD
Copy link
Owner Author

Thanks, man, you're a great help. Will check

@totalreverse
Copy link

totalreverse commented Apr 12, 2020

ANT parameters are (unconfirmed)

ANT Device-Type = 0x3d
Channel 66 = 0x42
Period = 0x2000
No network key (= the default key after resetting the ANT dongle)

You're doing a great job, btw.

@WouterJD
Copy link
Owner Author

Just being lazy and asking; does this mean if I would simply bridge the i-vortex as a FE-C it would be enough?

I guessed that would be the easy way to make a proprietary trainer

@totalreverse
Copy link

totalreverse commented Apr 13, 2020

Just being lazy and asking; does this mean if I would simply bridge the i-vortex as a FE-C it would be enough?

Answer: Unfortunately No

GoldenCheetah ANTMessage.cpp Line ~ 660 ++

        case ANTChannel::CHANNEL_TYPE_TACX_VORTEX:
        {
            const uint8_t* const payload = message + 4;
            vortexPage = payload[0];

            switch (vortexPage)
            {
            case TACX_VORTEX_DATA_SPEED:
                vortexUsingVirtualSpeed = (payload[1] >> 7) == 1;
                vortexPower = payload[2] | ((payload[1] & 7) << 8); // watts
                vortexSpeed = payload[4] | ((payload[3] & 3) << 8); // cm/s
                // 0, 1, 2, 3 = none, running, new, failed
                vortexCalibrationState = (payload[1] >> 5) & 3;
                // unclear if this is set to anything
                vortexCadence = payload[7];
                break;

            case TACX_VORTEX_DATA_SERIAL:
                // unk0 .. unk2 make up the serial number of the trainer
                //uint8_t unk0 = payload[1];
                //uint8_t unk1 = payload[2];
                //uint32_t unk2 = payload[3] << 16 | payload[4] << 8 || payload[5];
                // various flags, only known one is for virtual speed used
                //uint8_t alarmStatus = payload[6] << 8 | payload[7];
                break;

            case TACX_VORTEX_DATA_VERSION:
            {
                //uint8_t major = payload[4];
                //uint8_t minor = payload[5];
                //uint8_t build = payload[6] << 8 | payload[7];
                break;
            }

            case TACX_VORTEX_DATA_CALIBRATION:
                // one byte for calibration, tacx treats this as signed
                vortexCalibration = payload[5];
                // duplicate of ANT deviceId, I think, necessary for issuing commands
                vortexId = payload[6] << 8 | payload[7];
                break;
            }

            break;
        }

ANTMessage.cpp Line about 955 ++


ANTMessage ANTMessage::tacxVortexSetFCSerial(const uint8_t channel, const uint16_t setVortexId)
{
    return ANTMessage(9, ANT_BROADCAST_DATA, channel, 0x10, setVortexId >> 8, setVortexId & 0xFF,
                      0x55, // coupling request
                      0x7F, 0, 0, 0);
}

ANTMessage ANTMessage::tacxVortexStartCalibration(const uint8_t channel, const uint16_t vortexId)
{
    return ANTMessage(9, ANT_BROADCAST_DATA, channel, 0x10, vortexId >> 8, vortexId & 0xFF,
                      0, 0xFF /* signals calibration start */, 0, 0, 0);
}

ANTMessage ANTMessage::tacxVortexStopCalibration(const uint8_t channel, const uint16_t vortexId)
{
    return ANTMessage(9, ANT_BROADCAST_DATA, channel, 0x10, vortexId >> 8, vortexId & 0xFF,
                      0, 0x7F /* signals calibration stop */, 0, 0, 0);
}

ANTMessage ANTMessage::tacxVortexSetCalibrationValue(const uint8_t channel, const uint16_t vortexId, const uint8_t calibrationValue)
{
    return ANTMessage(9, ANT_BROADCAST_DATA, channel, 0x10, vortexId >> 8, vortexId & 0xFF,
                      0, 0x7F, calibrationValue, 0, 0);
}

ANTMessage ANTMessage::tacxVortexSetPower(const uint8_t channel, const uint16_t vortexId, const uint16_t power)
{
    return ANTMessage(9, ANT_BROADCAST_DATA, channel, 0x10, vortexId >> 8, vortexId & 0xFF,
                      0xAA, // power request
                      0, 0, // no calibration related data
                      power >> 8, power & 0xFF);
}

@WouterJD
Copy link
Owner Author

Thanks again; let's seet what @iepuzaur will provide.
New challenge to port the software at distance, not having the device at hand.

@plundberg75
Copy link

Hi WouterJD
I have the same trainer Tacx Vortex with the T1962 head unit,
Happy to help if you just let me know what you need!

@WouterJD
Copy link
Owner Author

Great guys; it will not be an easy job - but worth while trying.
It will take some testing....

Currently busy to get the software running on MacOS: #45 :-)

As probably stated above, the first step is to install the software - and you do not need to a python expert, check the wiki - and run ExplorANT, a small tool that shows what's going on on the ANT+ network.

Command: ExplorANT -d127 which will create a logfile, please post.

In the meantime, say hallo on Strava: https://www.strava.com/athletes/2885978

@iepuzaur
Copy link

iepuzaur commented Apr 15, 2020 via email

@plundberg75
Copy link

Windows 10 for me as well

@darkpotpot
Copy link

Hi,

I also have an i-vortex. I'll probably be able to do the test at the end of the day (in 8 hours) if nobody had the time to do it before.

For this first test, do I need to reinstall the trainer as a libusb-win32 device or it doesn't matter for now ?

Anyway, thanks for the time spent on this.

@WouterJD
Copy link
Owner Author

Welcome!
Yes it's a libusb device; please check https://github.com/WouterJD/FortiusANT/wiki#windows

@iepuzaur
Copy link

Yes, sorry about that. the log attached.
ExplorANT.2020-04-16 09-12-38.log

Repository owner deleted a comment from iepuzaur Apr 16, 2020
@WouterJD
Copy link
Owner Author

WouterJD commented Apr 16, 2020

It seems that ExplorANT is running and does not "see" any ANT+ devices.
The idea is that you start Tacx iVortex and then start ExplorANT.

Can that be the case? I hope that the iVortex acts like a master ANT+ device and should be visible...

To avoid misunderstanding:

  • Start Tacx i-Vortex, just like you want to use with Tacx TTS-4
  • Check with Tacx TTS that the iVortex is visible
  • Then start ExplorANT and send the logfile; Command line = ExplorAnt.py -d127

Thanks

Repository owner deleted a comment from iepuzaur Apr 16, 2020
@darkpotpot
Copy link

In case of any help, I did the manip.
Started i-vortex trainer and head unit.
Started TTS4, both units are seen.
Started ExplorANT.

As a side note, at the very beginning of the trainer, tacx tts4 needed to have head unit started in order to control the trainer.
Then, at some point they did an update and it was not needed anymore. Tacx TTS4 was able to control the trainer without the head unit

ExplorANT.2020-04-16 16-02-43.log

@iepuzaur
Copy link

iepuzaur commented Apr 16, 2020

so I have checked as per your indications, then I get this:

16:05:15,811: ExplorANT started
16:05:15,812: -d 127 (0b1111111)
16:05:15,813: -D -1 (-0x1)
16:05:15,816: -H -1 (-0x1)
16:05:15,816: -F -1 (-0x1)
16:05:15,817: --------------------
16:05:15,817: Dongles in the system:
16:05:15,859: manufacturer=Dynastream Innovations, product= ANT USBStick2, vendor= 0xfcf, product=0x1008(4104)
16:05:15,860: --------------------
16:05:15,861: GetDongle - Check for dongle 4100 Older
16:05:15,871: GetDongle - Check for dongle 4104 Suunto
16:05:15,889: GetDongle - Try dongle: manufacturer=Dynastream Innovations, product= ANT USBStick2, vendor= 0xfcf, product=0x1008(4104)
DEVICE ID 0fcf:1008 on Bus 000 Address 001 =================
bLength : 0x12 (18 bytes)
bDescriptorType : 0x1 Device
bcdUSB : 0x200 USB 2.0
bDeviceClass : 0x0 Specified at interface
bDeviceSubClass : 0x0
bDeviceProtocol : 0x0
bMaxPacketSize0 : 0x20 (32 bytes)
idVendor : 0x0fcf
idProduct : 0x1008
bcdDevice : 0x100 Device 1.0
iManufacturer : 0x1 Dynastream Innovations
iProduct : 0x2 ANT USBStick2
iSerialNumber : 0x3 123  ¡¢£¤ ÀÁÂà DSI
bNumConfigurations : 0x1
CONFIGURATION 1: 100 mA ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x2 Configuration
wTotalLength : 0x20 (32 bytes)
bNumInterfaces : 0x1
bConfigurationValue : 0x1
iConfiguration : 0x2 ANT USBStick2
bmAttributes : 0x80 Bus Powered
bMaxPower : 0x32 (100 mA)
INTERFACE 0: Vendor Specific ===========================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x0
bAlternateSetting : 0x0
bNumEndpoints : 0x2
bInterfaceClass : 0xff Vendor Specific
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x2 ANT USBStick2
ENDPOINT 0x81: Bulk IN ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x1
ENDPOINT 0x1: Bulk OUT ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x1 OUT
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x1
16:05:15,914: GetDongle - Set configuration
16:05:15,914: GetDongle - Send reset string to dongle
16:05:15,915: GetDongle - Exception: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, win error: The requested resource is in use.\r\n'
16:05:15,918: GetDongle - Check for dongle 4105 Garmin
16:05:15,927: GetDongle() returns: No (free) ANT-dongle found
16:05:15,928: No (free) ANT-dongle found
16:05:15,928: We're done

Of course this is because the other app is using the Ant+ usb device.
But what I have sent earlier is for sure with the units (brake and headunit connected to the ant+ usb stick).

PS. If worth knowing, my Ant+ USB device is T2018 of Tacx.

@WouterJD
Copy link
Owner Author

stop tts4 before starting explorANT and redo test

@WouterJD
Copy link
Owner Author

In case of any help, I did the manip.
Started i-vortex trainer and head unit.
Started TTS4, both units are seen.
Started ExplorANT.

ExplorANT.2020-04-16 16-02-43.log

Good next step.
I have modified ExplorANT to separate the logging from the console + some minor improvements.
Important change -done for MacOS support- is that dongle error handling is improved, messages MAY got lost, hence a rerun is useful. Thanks.

Please download software, rerun and let me see output.

@darkpotpot
Copy link

Hi, here is the log with the latest version
ExplorANT.2020-04-17 07-00-01.log

@WouterJD
Copy link
Owner Author

This logfile looks as if there is no device "in the air".
I have reviewed the device pairing-process and learned from it and updated the software.

Please download antDongle and ExplorANT and retry.

I assume that you have the iVortex "ready to use" when running ExplorANT, true?

@darkpotpot
Copy link

Yes, everything is "ready to use". If I launch Tacx TTS4, it discovers immediately both devices (head unit and trainer).
Of course when I do your test, Tacx TTS4 is not launched.
New log is attached
ExplorANT.2020-04-17 11-37-13.log

@WouterJD
Copy link
Owner Author

So, the "normal" open pairing mechanism does not work.
It will require an extended version of ExplorANT to support more pairing options.
I will come back on it

@WouterJD
Copy link
Owner Author

ANT Device-Type = 0x3d
Channel 66 = 0x42
Period = 0x2000

I have extended the device pairing for the Tacx i-Vortex for pairing with masters with the pairing-bit set; which does not make a lot of difference it seems.

Also, I always open a channel for VTX (i-Vortex) and listen to messages.

So ready for next test.

@mattipee
Copy link
Contributor

@darkpotpot Zwift doesn't send speed, only grade. Grade is also subject to trainer difficulty setting in Zwift.

iVortex has stated max grade of 7% in the literature. But FortiusAnt isn't sending grade to the iVortex, we're calculating power and sending that.

But while the iVortex's internal model is unlikely to be calculating grade ??, it will know it's own limitations and I think we need to be conscious of the virtual speed flag coming back from the unit as that will indicate where the iVortex may be getting involved with it's own power/speed modifier.

But because speed as we interpret it is currently lower than we expect, I think that needs sorted before second guessing the next steps.

@WouterJD
Copy link
Owner Author

Version 3.0 is released with good expectation that iVortex will work.
Of course of there are any issues, let me know.

@WouterJD
Copy link
Owner Author

I happen to have i-Vortex with headunit to test with.
Well... the headunit does not work yet; I will do some more testing next week.

Issues:

  • Some messages were not created correctly (first create info, then compose into msg)
  • I had crashes due to illegal messages received (from Vortex??) so had to avoid that
  • Headunit does not switch to PCmode so up/down buttons are not received

So ... work in progress.

@WouterJD
Copy link
Owner Author

#91

i-Vortex implementation is ready and tested by myself.

Two main changes:

headunit is now integrated
by putting the headunit in PCmode it does no longer control the i-Vortex and hence the controlling by FortiusANT works.
@darkpotpot, @iepuzaur @tobekas @plundberg75
I am curious to hear what your experiences are!

WouterJD added a commit that referenced this issue Jun 9, 2020
i-Vortex implemented; version 3.1 released
@WouterJD
Copy link
Owner Author

Confirmed working from version 3.1

@WouterJD WouterJD changed the title Is Tacx i-vortex Supported? ==> YES! Support for Vortex T2172 head unit (~110, 117) Nov 17, 2020
@WouterJD WouterJD changed the title Support for Vortex T2172 head unit (~110, 117) Support for Vortex T2172 head unit (~101, 117) Nov 17, 2020
@WouterJD
Copy link
Owner Author

WouterJD commented Nov 17, 2020

The title is changed to be consistent with the other developments
Related issues: #46 = Vortex, #101 = Genius, #117=Bushido

@WouterJD WouterJD changed the title Support for Vortex T2172 head unit (~101, 117) Support for Vortex T1961 brake and T2172 head unit (~101, 117) Nov 17, 2020
@cermatej
Copy link

Hello,
first of all I am really excited about the way this project is improving and its community is growing. You are doing a great job and thank you for that.

I am using i-Vortex (T1961) with head unit (T1962) and Tacx supplied dongle and after some trial & error everything seems to be working and I can use Zwift on my smartphone. I was just wondering (could not find the information in the manual neither in issues) how can I calibrate Vortex when using FortiusANT since Rundown procedure can be used only with motor breaks and the calibration process (with running the break automatically) is probably not supported either.

Will just calibrating my Vortex using the head unit and then using both HU (in PC mode) and Vortex during the ride do? And if so, do I need to aim for calibration with offset as close as possible to 0?

Thanks in advance for the answer.
Cheers

@WouterJD
Copy link
Owner Author

Hi @cermatej
Welcome to the FortiusANT community


I'm always curious to know who I communicate with, where FortiusANT is used and what configuration is used.
Please tell me what bundle did you buy, and what brake and what head unit do you use?
I would therefore appreciate that you introduce yourself; perhaps leave a comment under issue #14.


I will respond in a separate issue

@Jopple-Zwift
Copy link

Hi from Wales, UK!

How do you get the T2172 head unit into PC mode? I can't seem to do anything but control the trainer directly, and this prevents FortiusANT from being able to detect and take control of the devices.

Thanks

@switchabl
Copy link
Contributor

@Jopple-Zwift FortiusANT should detect the head-unit and switch it to PC-mode automatically (there is no way to do this yourself). However, it appears that this is not working reliably at the moment (see #215).

Note however that the head unit is not required for the Vortex. So as a work-around you could just leave it off for now.

@mailjoene
Copy link

mailjoene commented Mar 21, 2021

Hi all, I'm trying to get FortiusAnt running with my Vortex T1961 and T1962 Head Unit. Not experienced with programming, python and all that. I downloaded FortiusAnt (11th January), followed the instructions, connected to Ant dongles, installed python, updated pip, installed the requirements.txt files. When I start tie gui it tells me it can't find any Tacx trainer. Then I downloaded a new (latest) version of FortiusAnt and when I try to start the gui it says :ModuleNotFoundError: No module named 'lib_programname'.

Update: I solved that error with the command 'python -m pip install lib_programname'. Now I also get the gui started with the latest version of FortiusAnt, but still no Tacx trainer is found.

Any help will be highly appreciated.
I live in Deventer, The Netherlands. Would be nice if someone nearby could help me out. I think that would be more efficient.

@WouterJD
Copy link
Owner Author

Hi @mailjoene
Welcome to the FortiusANT community


I'm always curious to know who I communicate with, where FortiusANT is used and what configuration is used.
Please tell me what bundle did you buy, and what brake and what head unit do you use?
I would therefore appreciate that you introduce yourself; perhaps leave a comment under issue #14.
You could also consider to visit the sponsor page


Some questions:

  • did you read the manual (see wiki page)
  • When using vortex, use the-t flag
  • What system do you use, windows/mac...

Just let us know, Wouter from Elst near Arnhem

@WouterJD WouterJD reopened this Mar 21, 2021
@mailjoene
Copy link

Hi Wouter, thank you for your quick reply! I have just introduced myself a bit in issue #14 .
Regarding your questions: Yes I read the manual, but I must admit that I am not very acquainted with programming and things like python, so it's mostly try and error for me to get things like these running. I have tried for several hours, but haven't been succesfull so far. I will try to use the -t flag, haven't done that so far. I am using Windows 10.
Elst isn't very far away for me (I am currently working in Cuijk so driving in your direction every day). If you wouldn't mind and think it would help, I could drive by for a short visit.
Best regards,
Jeroen

@WouterJD
Copy link
Owner Author

Hi Jeroen, ping me on messenger to get a cup of coffee :-) I work from home, so usually available.

I have seen your intro.
I just hope you do not have CYCPLUS ANT-dongles, they usually do not work (see #61).

The -t flag is imperative for success

@hulah00p
Copy link

Hi! I'm trying to set up T1961 unit for my friend and this is all he has. He has no any head unit. Is it ok? Can it be used alone without head unit? He even doesn't know if it was with the brake unit from start as he got this device from his friend. He has only brake unit T1961 and power cord.. Is it usable?

We found two ANT+ dongles for test. We are on Windows 10\11, one machine, two dongles setup.

If started with -g -l -t Vortex, "Locate HW" and "Start" pressed then we can see this in console:
01:56:36,477: FortiusANT broadcasts data as an ANT+ Controlled Fitness Equipent device (FE-C), id=57591
01:56:36,477: FortiusANT broadcasts data as an ANT+ Heart Rate Monitor (HRM), id=57592
01:56:36,477: FortiusANT receives data from an ANT Tacx Vortex (VTX Controller), any device
01:56:36,477: FortiusANT receives data from an ANT Tacx Vortex Headunit (VHU Controller), any device
01:56:36,493: FortiusANT broadcasts data as an ANT+ Bicycle Power Sensor (PWR), id=57596
01:56:36,493: FortiusANT broadcasts data as an ANT+ Speed and Cadence Sensor (SCS), id=57595
01:56:36,493: FortiusANT receives commands from an ANT+ Generic Remote Control
01:56:36,493: ---------- ANT-devices are activated ----------

In Zwift we have Power source, Resistance, Cadence found and connected.
What we can expect in Zwift? Would it add resistance on hills in this setup without head unit?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests