-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Continuously message "insufficient data" #446
Comments
For a starter, I'm happy that you love this app; I see you are training quite some on Zwift/Strava. FortiusAnt communicates through the USB-cable with the headunit of the trainer. I do not know what start-up parameters you use (e.g. Please let me know what parameters you use. |
I admit I'm not certain which commands are being triggered, I primarily use the defaults set for the FortiusAnt executable. It indeed had pedal stroke analysis enabled this morning but even when I disabled that and restarted it was reading insufficient data. I usually just modify the start parameters by clicking the settings gearbox and saving setting to json file, and restart if I change anything. Any advice you can offer on better tuning the settings I'm all ears. The log file from this morning is quite large and my laptop is old, it froze a few times trying to read it. Here is where it switches from working to not working: 08:28:05,690: Sleep(0.02) to fill 0.02 seconds done. After turning off pedal stroke analysis, this error: 08:37:54,448: Trainer recv hdr=-0x1 data="array('B')" (len=0) Here are the contents of the json file from which it loads start values { |
Hmmm... It does look like transmission error between head-unit and FortiusAnt or a faulty head-unit. The "Retry because short buffer" is given in function at: After retrying upto 4 times, an empty buffer is returned. This issue was not reported before, but there must be a first time! |
Hmm ok, so aside from double checking all the connections there may not be much else I can do (if it's a hardware thing). Yes, I suppose I could try adjusting error recovery but I don't know how much I could improve that as it already looks quite reasonable. The trainer is located in my office in my apartment. It can get a little chilly when I'm not riding but not particularly cold. It had run just fine for ~ a workout a day prior to this, which is why I was surprised when it flaked this morning. I don't know if it could related to the intensity of the workout; this race was going faster/longer than I had tried before |
I have a Fortius / T1932 myself and never had such an experience after an hour. I assume the trainer is old; you might check the headunit and/or connectors for corrosion... But there is good news too: you always managed to restart after the error period, which in itself is a recovery routine. If you want I can see whether I can add it to usbTrainer.py; which should not be a too big job. |
I started looking into the code some, I'm just at a loss for how to reproduce my problem and test potential fixes. For USB disconnection events I need to restart the app (I tried a few ways around this but gave up). For temporary power loss it recovers just fine as is. But suddenly returning insufficient data is difficult to replicate, so I'm still stuck not knowing exactly what happened |
Hi Kristy I have created a branch USB-recovery and modified usbTrainer.py for you. I did NOT create an executable yet, so please test whether this works using python. Ref: https://github.com/WouterJD/FortiusANT/blob/USB-recovery/pythoncode/usbTrainer.py#L2558
|
Wow, thanks!! I will give this a pull and try it a try this morning :) EDIT: checked it out and tried it out and at least in testing the USB reconnect works great EDIT AGAIN: Now I'm trying to reinstall Zwift because it freezes up entirely when I try to connect anything :(. Even when it loads (rarely) ANT+ is not recognized no matter how I initialize FortiusAnt. I just see the (!) next to the ANT stick LAST EDIT: ok unplugging and replugging the ANT+ sticks back in while running FortiusAnt AND Zwift got things connected this morning. |
I haven't had any new instances where the head unit froze up since this implementation (I did get a complete Zwift 30s freeze-up but that was likely due to my old computer or the internet connection). As far as I can tell, I think it's a good fix |
Good to hear and I saw your freeze on Strava. Did you experience a re over-action? |
Update: so it actually disconnected this morning in warmup and managed to reconnect all on its own. Got a handful of messages but nothing that seemed like an overaction |
Great to hear. I had a successful training yesterday and had no issues, your training was saved by the recovery (next time please share the copy of the console) so the update seems OK. I have create a pull request This because of your interest to join in development |
Issue #446 USB-error recovery, version 1 successfully recovers dropped connections from Fortius head unit T1932
Done! Thanks for the invite. Will screenshot or save debugging log next time |
Great, I'll leave this issue open for so long. |
somewhat unrelated, but I was trying to build the EXE using the bat files from the Development folder. I get a TON of warnings that pyinstaller couldn't find packages that I know are installed (if I pip install them they show up as already installed). I tried adding my scripts folder to --paths when building the spec, but still get all the warnings (for example, it can't even find numpy) Got pretty lost messing with it and just made a bat file to run it with good arguments. When launching from the commandline I always forgot to run it with debugging |
I'll create the exe shortly and let you know. On my system it's running for years now, but perhaps I can give a hint |
Sorry to bug you so much. I have a new problem though. My HRM is no longer recognized in Zwift. FortiusAnt reads it but it doesn't broadcast right. Every once in a while Zwift has a signal for a second then it drops again. I tried cleaning my HRM, connecting with and without -H0 option, unplugging/repluggin ANT+ sticks, tried straight from python vs with the executable ... I don't know what else to try. I guess it's possible the HRM just died but it seems kind of sudden since switching PC's. Also just tried new batteries, still no connection I don't know if it matters but this is a new miniPC with Windows 11, otherwise same ANT+ sticks, 1932 head unit EDIT: Upon further testing, it indeed seems to be PC-specific issue, works still on my old laptop. I need to find a way to get it to work on the Windows 11 PC though because the laptop is dying I'm just stuck UPDATE: ok it was a line-of-sight issue. when i put the ANT+ sticks in a powered usb hub away from the pc it works again |
Hi, I see HRM arrived in Strava today so problem seems solved. Note that Zwift connects to the trainer, which is FortiusAnt. There are three devuces: trainer, power meter, speed/cadence. Zwift also connects to HRM. Directly, FortiusAnt is not involved there. Do you use an ANT or BLE HRM? |
I read your edit now. |
Real issue this time: Trainer froze up at 267W. Gave it a minute to try to figure it out itself. Restarted app twice to no avail (it continued to output last known reading). Unplugged and replugged in USB and restarted app and it reset correctly. App initialized with Here it was still working: Here it started outputting constant watt-stream: |
As you can see in usbTrainer.py: |
Building EXE on Windows 10 still works, perhaps some checks required for Windows 11. |
The USB error recovery is implemented and published including EXE in 6.8 |
Hi @WouterJD, love this app, 99% of the time ...
I was doing a Zwift race this morning when the app froze up (continuously read "insufficient data"), and reported 234W indefinitely.
I quickly checked all the cables and restarted the app, which got me dropped, and it continued just outputting 234W. I just let it run out the race while I tried to pedal, hoping it'd reconnect and tapping stop/start and find hardware ....
I ended up rechecking all the cables several times and having to restart the app several times and also disconnect/reconnect from the Zwift connection panel. I honestly don't know what finally got it back working.
It was just extra frustrating a few km from the finish of a race. Everything was plugged directly into my laptop usb ports. I don't know what other tricks I can try to get a more consistent connection??
Setup: Windows 10, Fortius T1932 head unit, 2x ANT+, FortiusAnt.exe
Originally posted by @ktippey-hzdr in #14 (comment)
The text was updated successfully, but these errors were encountered: