-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
FortiusANT message "Tacx returns insufficient data, len=24" on T1932 head unit #104
Comments
Hi Roger I will look into it shortly, will be earliest next week. Ciao! |
Hi Wounter, I am Vincent from Paris / France and I have the same issue with a T1942 head unit. FortiusANT.2020-09-10 18-02-12.log Thanks a lot, |
Hi Wounter, I am Javier front Spain and I have the same issue with a T1932 head unit. Thanks |
Hello Wouter, I took a look at the logs myself and noticed that the trainer sends 24 and 48 bytes of data. When the 24 bytes of date is received it wasn't ignored, only the message "Tacx returns insufficient data, len=24" was written to the console. I changed the code to ignore the 24 bytes data and made a new FortiusANT.exe. The speed in Zwift is much better now, though it is still a few kph lower than shown on the FortiusANT GUI. I can push my commit (which is in a separate branch) to GitHub and create a pull request for you to review if you want. I currently don't have those rights on the repository. Regards, Roger |
Hello, on my side, I also have an issue with the FortiusANT GUI. The speed/power stop for a few seconds and then come back to normal. regards, Vincent |
I have the "Tacx returns insufficient data, len=24" message and every 1 minute in console: ....... regards, Javier |
Hi @RogerPleijers, @vinyl78, @Jaturman I experienced very occasional 24-byte buffers, created a retry and they did not appear 4 times in a row. Note that the -A flag is on by default when no flags are specified at all. So please try the following:
@RogerPleijers I have seen your code-update suggestion, let's check the answers from the others first. |
Thanks a lot Wouter, this solved my problem. I didn't ride long but the speed and power seem ok in the FortiusANT GUI and Zwift. Cheers, Vincent |
Hi WouterJD "19:42:56,178: Tacx returns insufficient data, len=24 And the calibration process fails. No matter how many times I try this process, it always goes wrong |
FortiusANT polls the trainer every 0.25 second. You can see this in logfile (19:41:42,526 -> 19:41:42,774). See usbTrainer.py, line 1555. You could try:
Please let me know |
Hi @WouterJD , On my Fortius I get to 4 retries very often, as you can see in the second logfile in my post opening this issue. I for now solved this by not processing the 24 bytes results at all. I created a pull request of the change I made so you can review it. I can also try your other options with the retry count or delay. I can't look into that before next week, though. Regards, Roger |
Hi WouterJD
Find attach the console during the training. |
Hello Jaturman, I experienced the same issue using a CYCPLUS Ant dongle. Vincent |
Thanks Vicent |
I bought the same one at first |
One receive 24 byte frames, if the head unit has not received a valid frame from the power back since the last data poll from the host. This typically happens, if you poll too fast. But 0.25s is slow enough to get a long 48 byte frames for every poll. But as I wrote above the unit has to receive VALID frames. Maybe the connection between the power back and the head unit is somehow disturbed (broken cable, broken socket or some kind of radio interference). The serial connection uses a 3.3V TTL/CMOS level, which is very sensitive to noise. |
@totalreverse thanks for your observation. I suggest we conclude:
Without additional feedback; I will close this issue. |
Ok. Thanks |
Hello @WouterJD, Turning off pedal stroke analysis didn't work for me (as in my starting post). I already checked all connections which seem fine. I was using TTS4 about 2 weeks ago which seemed to be fine as well. I just commented on your question in my pull request, I solved it there in usbTrainer.py by adding an else: on line 1567. Hope you can give me some time to also check your suggestions to increase retry count or add a delay (I've been away several days since last Friday). Regards, Roger |
Just checked the differences on github, saw the additional indent but did not realize the meaning. But your suggestion is better; it remains a question though why your interface causes so many retries... |
Hello @WouterJD , I tried your suggestions tonight. Below are my findings. Increase the retry countI increased the retry count from 4 to 10 on usbTrainer.py line 1560. FortiusANT now receives 24 bytes 10 times instead of 4 times and the behavior in Zwift was equal to the retry count of 4. I didn't try even higher retry counts, but I doesn't seam increasing the retry count will resolve the issue for my trainer. I have attached the log file: Add a short delay, e.g. time.sleep(0.1)I added this delay on usbTrainer.py line 1565. This seems to work. FortiusANT now receives most times receives 24 bytes 1 or 2 times before it receives 48 bytes. Zwift seems to be working with this option. I have attached the log file: Only process trainer data when sufficient data was receivedThis was my own suggestion, which I implemented in branch Issue_104_FortiusANT_message_Tacx_returns_insufficient_data for which I made a pull request which you already saw. In this solution I added an else: on usbTrainer.py line 1568. Zwift seems to working with this option as well. I have attached the log file: ConclusionBoth adding a short delay or only processing trainer data when sufficient data was received seem to work. I'm not sure which option would be preferable to implement. With both options although the speed in Zwift is ok, it is still mostly between 2 an 4 kph below the speed FortiusANT is showing. I'm not sure if that is related to this issue, though. |
Great study; I will adopt the delay and the else... Difference in speed:
|
Note that zwift provides a grade, the bike provides the speed and FortiusANT calculates the required power and hence required resistance. Then the actual power is transmitted to zwift, where zwift (knowing the grade) calculates the speed. Obviously it will not be a perfect match, since the used formula's are not equal (compatible). Note also that, when grouping zwift riders, two riders on the same track, same grade have same speed (stay together) although one produces more power than the other. |
Thanks for explaining @WouterJD. In general I'm very happy with FortiusANT since it means I can continue using my Fortius trainer. Setup of FortiusANT is very easy as well. Thanks for you work on FortiusANT! |
One more Information: the brake only sends an answer after receiving a command from the head unit. And the 1942 head unit only sends a command to the brake after receiving a frame from the host. You furst have to increase the send rate to receive more frames (answers) from the brake. |
Thanks @totalreverse for guidance. I have updated usbTrainer.py; @RogerPleijers please test. (+else, +sleep, +logfile guidance); sorry did not use your branch since still not handy with that side of github. |
Thanks @WouterJD, your change looks good. I will test it and let you know the result. No problem with the branch, I have Git experience but it also took me some time to find out you have to fork repositories on Github to be able to make changes. |
Hi @WouterJD, I tested the changes tonight. At first I encountered some problems creating the FortiusANT Windows executable, which I will describe first. Than I will go into my test results. Problems for creating the FortiusANT Windows executable and my solutions:
After fixing this I could create the Windows executable. You're changes to usbTrainer.py are working for me. Zwift was working fine. Attached you find the log file of my test: For me with these changes the issue can be closed. Obviously the problems creating the Windows executable need to be fixed before a new release can be made, if you need a pull request for this let me know. Maybe it's also good to test FortiusANT with these changes on someone else's trainer. |
Typo's corrected; sorry for sloppy change. |
Did you manage to fix this? I have the exact same issue. The 'Tacx returns insufficient data, len=24' error also pops up without the presence of an ANT+ dongle. (I bought the Anself dongles from Amazon which turn out to be just the buggy CYCPLUS dongles). |
|
I'll try when I receive the new dongles. Is it possible to test without an ANT+ dongle? |
Yes, ref manual. -m = manual power mode |
Well, it keeps printing the error :( To be on the safe side I ordered a RJ12 cable to connect the head unit to the brake unit. |
Good idea to Check all connections |
@hosnor in the meantime; I'm always curious where FortiusANT is used and who I am working with, please introduce yourself and tell me where you are located. What tacx do you use? |
@WouterJD I live in the Netherlands and am using a Tacx Fortius with the white head-unit with the blue circle of buttons (the top right one in the manual p. 20). Since the laptop which had TTS4 on it was repurposed, I'm trying to get it to work with something else (e.g. Zwift or perhaps something more basic) |
Welcome @hosnor I'm from ELst near Arnhem with the same type of Fortius |
Well, then the problems aren't location or type specific ;) |
Well, I received two new ANT+ dongles today, and now it seems to be working! I also found out that the cadence sensor connected to the brake-unit wasn't aligned properly. The error messages are still there though... Tomorrow I'll receive a new RJ12 cable, but it appears to be working already. I'll have to check whether the calibration is correct and the reported speeds in zwift are somewhat accurate, but I can use the Tacx at least 👍 |
I saw the same repeated error on two occasions during my ride last night, @WouterJD . Both times happened to be when I was "changing gear" with the head unit buttons (several consecutive presses). Both times I pressed Ctrl-C to quit, restarted and continued with my ride. |
Hi mat; what is the reason to restart FortiusANT. |
Should be resolved in current version |
I fetched and pulled master last night before I started. I will reproduce and investigate next time I ride. |
https://github.com/WouterJD/FortiusANT/blob/master/pythoncode/usbTrainer.py#L1652 Are these the messages you get? |
Yes, but repeated. Ie nothing but those. Hence software restart to resolve. |
Aha. According TotalReverse the headunit will only return a correct message AFTER having received a command. Perhaps https://github.com/WouterJD/FortiusANT/blob/master/pythoncode/usbTrainer.py#L373 (385) to be repeated after a failure? (As if your head unit completely resets) |
Easiest way I have to reproduce is to long-press up or down button (2-3 seconds). This is conceivably consistent with what I was doing last night which was to press up or down several times in a row as the Innsbruck course I was riding has a few abrupt and significant grade changes. A long button press or multiple sequential button presses are possibly starving something? |
A Tacx head unit button press is not like a keyboard where three presses provide three characters. A button is pressed or is not. If the button is pressed for a second and you received from the trainer 4x (250ms each) then the button is reported 4 times. Since I assume that you press, then release, then press sub-sequent buffers with "key pressed" are ignored. In other words: a button press ends when a no-button-pressed message is received. If you continue pressing a button; FortiusANT would "freeze". https://github.com/WouterJD/FortiusANT/blob/master/pythoncode/usbTrainer.py#L1180 |
Hello Wouter,
I'm Roger from Valkenburg in the Netherlands. I recently found out Tacx ended support for TT4 and was happy to find FortiusANT. I bought 2 ANT+ sticks and ran FortiusANT and Zwift. Basically everything is working, but when I cycle in Zwift speed doesn't get higher than 3 to 5 kph. My head unit is a T1932.
When I run FortiusANT.exe with default parameters the logfile shows only 24 bytes data is received from the trainer with the message the message "Tacx returns insufficient data, len=24". The FortiusANT GUI doesn't show speed, cadance or power when I'm cycling. Log file for this situation:
FortiusANT.2020-09-09.19-52-46.log
When I don't provide the FortiusANT.exe -A parameter for pedalstroke analysis the FortiusANT GUI actually shows correct speed, cadance and power when I'm cycling. In the logs than I see 24 as well as 48 bytes information is received from the trainer. The speed in Zwift is still wrong though. Log file for this situation:
FortiusANT.2020-09-12 16-26-12.log
I hope you can help me. Except from this issue everything seems to work great!
Thanks in advance,
Roger
The text was updated successfully, but these errors were encountered: