Closed iainhay closed 4 years ago
Hi Ian, welcome in the FortiusANT community!
I think FortiusANT will run on Mac and I willl help you in case there are issues, even adjust code if needed.
What Tacx do you have?
Hey - awesome thanks.
I have a i-Flow with a T1932 Head unit. I was setting up after many years put away and found out the tacx software has been discontinued and mine doesn't work with the desktop app.
So I have x2 ANT+ sticks which arrived so trying to get this set up (ideally with Zwift)
I'll install python 3 and see how I go - not used Python before, it's the FortiusAnt.py I need to run once downloaded correct?
Huge thanks in advance!
Indeed, read wiki for instructions Succes!
Hey!
So got the app working, it tries to calibrate, and I see this error message a few times in the terminal:
18:40:13,839: ReadFromDongle read error: [Errno 60] Operation timed out
And then the error it stops. I see all the dials as if it is sending/receiving.
Is calibration meant to automatically turn the trainer wheel to 20km p/hr? Been so long since I've used it couldn't remember if that was possible?
Also - if I start without calibrating I get the same error repeatedly (it doesn't stop)
18:40:13,839: ReadFromDongle read error: [Errno 60] Operation timed out
There someone else with an i-Flow/1932 and it seems that calibration does not work Use the -n flag (no calibration) and see what happens
Yes if I start without calibrating I get the same error repeatedly (it doesn't stop)
18:40:13,839: ReadFromDongle read error: [Errno 60] Operation timed out
run with -d8 flag and send logfile please
Sure thing! I noticed someone had a similar issue on mac with antifier but no solution was every posted.
I have checked the logfile:
From 21:06:09 ... 21:06:11 message "[Errno 60] Operation timed out" Then commands are sent (you probably pressed Start) From 21:06:11 ... 21:06:33 als message "[Errno 60] Operation timed out"
But then it appears normal operation; FortiusANT sends command and receives an answer. From 21:06:33 ... 21:06:53
Note that it is all within a minute.
Some questions:
Sorry that I cannot check myself...please try ans see what happens! Succes
PS. There is another user with an iFlow 1932. So .... fair chance it can work
I have x2 ANT+ dongles plugged into the mac, along with the USB from the trainer.
If I have only 1 ANT+ dongle connected, I receive the same message repeatedly.
The provided logfile shows that the messages stop (see my message from yesterday)
Provide logfile over more time than just one minute, please. Let's say 10 minutes at least.
I can see the speed etc immediately when I start pedaling, so the trainer sending the data doesn't seem to be the issue.
10min log file attached - the previous one was a minute because I only ran it for a minute (as it's just repeating over and over) - it just repeats, to end I clck stop (the errors still come through and the close the app and it exist in the terminal.
Thanks!
Sorry * 100
ReadFromDongle has nothing to do with the Tacx trainer, but is generated at the ANT usbDongle side. (As the error message says).
Check in antDongle.py
except Exception as e:
if "timeout error" in str(e):
if debug.on(debug.Data1):
logfile.Write ("Dongle timeout")
pass
else:
logfile.Write ("ReadFromDongle read error: " + str(e))
The code expects "timeout error" in the error-message, but (on your system) the message is "ReadFromDongle read error: [Errno 60] Operation timed out" and hence the error is given and not ignored as it should be. Note that the exception handling does not alter any data but only logs the error message.
You may simple ignore the message or replace "timeout error" with "timeout" and see what happens; behaviour should be the same in both cases.
I do not like this construction (checking text in message) and will check how to improve.
Please let me know...
The correct code would be: except TimeoutError: pass except Exception as e: logfile.Write ("ReadFromDongle read error: " + str(e))
If you don't mind checking that, then it's confirmed on your platform and I will implement in the baseline. Thanks
So replacing this:
except Exception as e:
if "timeout error" in str(e):
if debug.on(debug.Data1):
logfile.Write ("Dongle timeout")
pass
else:
logfile.Write ("ReadFromDongle read error: " + str(e))
with:
except TimeoutError:
pass
except Exception as e:
logfile.Write ("ReadFromDongle read error: " + str(e))
Still gives me:
13:06:22,863: ReadFromDongle read error: [Errno 60] Operation timed out
Repeated.
I also open Zwift with the app running, I can connect via Power Source and ANT+, but it receives no data (e.g. I start peddling but don't move or see any power). In the app I still see Power and Speed - but this is coming via the USB presumably.
If I change to this:
except Exception as e:
if "timed out" in str(e):
if debug.on(debug.Data1):
logfile.Write ("Dongle timeout")
pass
else:
logfile.Write ("ReadFromDongle read error: " + str(e))
And just check against 'timed out' then the error goes, but I'm still not receiving any data in Swift - no power etc. So it is like the receiving ANT+ dongle is not receiving the data?
OK, you're doing good.
Please run FortiusANT with -d4 this will provide the ANT logging. Sorry for keeping you budy on this sunny easter day :-)
Okay cool - attached is the log file (kept on for 10mins).
No worries - thanks for helping me with this!
OK logfile looks good, but indeed - no commands are received from Zwift.
Did you pair Zwift with FortiusANT? Note that a master (the trainer, FortiusANT) is unaware whether a slave (Zwift, ...) is looking at or pairing [with the master]..
Please send screen-shot of pairing-page, something like:
Okay great.
So here is what I am doing - just listing in case I'm missing something:
Here is what I see in Zwift:
(This is the only available device)
Checking the screen-print from FortiusANT (Trainer detected, Using Dynastream...) the hardware is found correctly and I would expect things to work. The logfile shows that data is transmitted.
What happens when you press SEARCH on cadence and controllable? Both should should be paired with FortiusANT.
No nothing - I just get the searching screen..
Do I need to do anything to the ANT+ dongles? I read about having master/slave etc?
For some reason the Heart Rate one picks up an ANT+ device and connects, but not Cadence or Controllable. Power Source connects but receives not data
Also, if I simulate (with -s) I get the same results
No nothing - I just get the searching screen..
Do I need to do anything to the ANT+ dongles? I read about having master/slave etc?
master/slave is decided by software; a trainer is master, Zwift is slave
Also, if I simulate (with -s) I get the same results
-s simulates a trainer, this comes handy in this case - you do not need to cycle to test Zwift. Good idea to use it
For some reason the Heart Rate one picks up an ANT+ device and connects, but not Cadence or Controllable. Power Source connects but receives not data
What is the deviceID of the heart rate monitor?
So it's simulating now:
And I can only connect via ANT+ to a power source and HRM in Zwift:
HRM ID:
But no watts or BPM received either
plse read https://github.com/WouterJD/FortiusANT/issues/42
It sounds like similar and that case was never explained. It seems another dongle solved the problem. Anyway: FortiusANT was not changed to resolve...
What dongles / configuration do you use? Where do you run Zwift? Perhaps try Trainer Road or Rouvy
I have confidence it will work
It does seem to be something with Zwift now - I will try Rouvy tomorrow and let you know.
Thank you so much for all your help!
👍
So in Rouvy I get the same, when searching for a trainer I see only a HRM :(
I had to try on my phone because ANT+ is not supported on mac by Rouvy. But it seems that it's not just Zwift.
Here is what I get in ExplorAnt.py:
06:29:28,501: ExplorANT started
06:29:28,502: --------------------
06:29:28,502: Dongles in the system:
06:29:28,514: manufacturer=Dynastream Innovations, product= ANT USBStick2, vendor= 0xfcf, product=0x1008(4104)
06:29:28,515: manufacturer=Dynastream Innovations, product= ANT USBStick2, vendor= 0xfcf, product=0x1008(4104)
06:29:28,516: manufacturer=GenesysLogic, product= USB2.1 Hub, vendor= 0x5e3, product= 0x610(1552)
06:29:28,516: manufacturer=Realtek, product=USB 10/100/1000 LAN, vendor= 0xbda, product=0x8153(33107)
06:29:28,517: manufacturer=GenesysLogic, product= USB3.1 Hub, vendor= 0x5e3, product= 0x626(1574)
06:29:28,519: manufacturer=Apple Inc., product=Apple Internal Keyboard / Trackpad, vendor= 0x5ac, product= 0x340(832)
06:29:28,520: manufacturer= Apple, product= None, vendor= 0x5ac, product=0x8104(33028)
06:29:28,520: --------------------
06:29:29,060: Using Dynastream Innovations dongle
06:29:31,157: Pairing, press Ctrl-C to exit
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
06:29:41,268: Pairing stopped
06:29:41,269: --------------------
06:29:42,609: Listening, press Ctrl-C to exit
06:29:43,628: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:44,646: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:45,658: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:46,678: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:47,693: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:48,701: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:49,719: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:50,731: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:51,750: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:52,762: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
06:29:53,777: HRM#= 0 hr= -1 FE-C#= 0 Speed= -1 Cadence= -1 Power= -1 hr= -1
Does this look right?
My set up is:
Macbook Pro 2019 x2 ANT+ Dongles Tacx iFlow w/ 1932 Head Unit
Is FortiusANT running at the same time?
No that was just running ExplorAnt.py
So when running python3 FortiusAnt.py -g -a -n -s
and then running ExplorAnt.py I get:
07:31:16,155: ExplorANT started
07:31:16,155: --------------------
07:31:16,155: Dongles in the system:
07:31:16,170: manufacturer=Realtek, product=USB 10/100/1000 LAN, vendor= 0xbda, product=0x8153(33107)
07:31:16,171: manufacturer=Dynastream Innovations, product= ANT USBStick2, vendor= 0xfcf, product=0x1008(4104)
07:31:16,172: manufacturer=Dynastream Innovations, product= ANT USBStick2, vendor= 0xfcf, product=0x1008(4104)
07:31:16,173: manufacturer=GenesysLogic, product= USB2.1 Hub, vendor= 0x5e3, product= 0x610(1552)
07:31:16,174: manufacturer=GenesysLogic, product= USB3.1 Hub, vendor= 0x5e3, product= 0x626(1574)
07:31:16,175: manufacturer=Apple Inc., product=Apple Internal Keyboard / Trackpad, vendor= 0x5ac, product= 0x340(832)
07:31:16,177: manufacturer= Apple, product= None, vendor= 0x5ac, product=0x8104(33028)
07:31:16,178: --------------------
Exception: [Errno 19] No such device (it may have been disconnected)
07:31:16,187: GetDongle: [Errno 19] No such device (it may have been disconnected)
07:31:16,187: We're done
07:31:16,187: --------------------
ExplorANT "listens" on the ANT-network and shows what master-devices broadcast data.
There are two dongles; one used by FortiusANT and the second by ExplorANT. No other programs should be running, because then no dongle is free.
If problem persists, run ExplorANT with -d5 flag and send logfile.
Here is the log file:
For some reason, the dongle cannot be used (that's what the message says). Since 2020-03-09 multiple dongles of the same type should be supported; before always the first dongle was taken, which would be in use by FortiusANT.
To get more info in the logfile, run ExplorANT -d7 so that functions are also logged.
Hi guys! I'm happy to see some of you are managing to do what i've been trying to for month if not years! Ok, i've been trying to install Antifier on my Raspberry pi 1 and it unfortunately didn't work properly as the ANT dongle could not be detected for some reason... Now I discover your work and I really find it great! Much like iainhay I'm a mac user very naive on programming with Python. I downloaded the Python code for FortiusANT but when running the module it says "ModuleNotFoundError: No module named 'numpy'". Would you please describe the installation process you used on mac??? THX
Just to be sure, I ran a FortiusANT -g -a -s
test on Windows 10, without the Tacx trainer so using simulation mode.
Then ExplorAnt.py -d1
; minimum logfile which produces the following result, which is as expected and immediatly shows what output is expected:
The dongle is initiated
Then a listening loop is done to check what devices are present (pairing) and HRM and FE is found. 57592 is the deviceID of the HRM like what Zwift shows you.
And then a listening loop is done to listen what the masters say and correct HRM- and FE-values are received.
13:17:11,894: ExplorANT started 13:17:11,894: -d 1 (0b1) 13:17:11,894: -D -1 (-0x1) 13:17:11,894: -H -1 (-0x1) 13:17:11,894: -F -1 (-0x1) 13:17:11,894: -------------------- 13:17:11,894: Dongles in the system: 13:17:11,957: manufacturer=Dynastream Innovations, product=ANT USB-m Stick, vendor= 0xfcf, product=0x1009(4105) 13:17:11,957: manufacturer=Dynastream Innovations, product=ANT USB-m Stick, vendor= 0xfcf, product=0x1009(4105) 13:17:11,957: -------------------- 13:17:12,499: Using Dynastream Innovations dongle 13:17:14,594: Pairing, press Ctrl-C to exit 13:17:24,784: Pairing stopped 13:17:24,784: HRM discovered on channel=0, number=57592 typeID=120 TrType=120 13:17:24,785: FE discovered on channel=1, number=57591 typeID= 17 TrType= 17 13:17:24,785: -------------------- 13:17:26,307: HRM slave channel 5 opened; listening to device 57592 13:17:26,495: FE slave channel 4 opened; listening to device 57591 13:17:26,495: Listening, press Ctrl-C to exit 13:17:27,503: HRM#= 4 hr= 90 FE-C#= 3 Speed=35.7 Cadence=100 Power= 98 hr= 86 13:17:28,508: HRM#= 8 hr= 87 FE-C#= 7 Speed=35.7 Cadence=102 Power=103 hr= 87 13:17:29,384: Listening stopped 13:17:29,953: We're done 13:17:29,953: --------------------
ExplorAnt.py -d3
; produces the following additional result:
... 13:21:50,994: GetDongle - Check for dongle 4100 Older 13:21:50,994: GetDongle - Check for dongle 4105 Garmin 13:21:51,010: GetDongle - Dongle found: manufacturer=Dynastream Innovations, product=ANT USB-m Stick, vendor= 0xfcf, product=0x1009(4105) 13:21:51,010: GetDongle - Send reset string to dongle 13:21:51,010: GetDongle - Dongle found: manufacturer=Dynastream Innovations, product=ANT USB-m Stick, vendor= 0xfcf, product=0x1009(4105) 13:21:51,010: GetDongle - Send reset string to dongle 13:21:51,512: GetDongle - Read answer 13:21:51,547: ReadFromDongle() returns: ["a4 01 6f 00 ca"] 13:21:51,547: GetDongle - Check for an ANT+ reply 13:21:51,547: GetDongle() returns: Using Dynastream Innovations dongle 13:21:51,547: Using Dynastream Innovations dongle ...
The software uses usb.core.find()
which returns two dongles with type 4105; the first one gives an error on the "Send reset string" (because it's in use by FortiusANT), on the second device the "Send reset string" goes well, an answer is received and the software proceeds.
By the way: FortiusANT and ExplorANT use the exact same loop.
It COULD mean that, when I think I use the second dongle, that actually the first is tried and hence is in use.
Log files for -d1, -d3 and -d7
ExplorANT.2020-04-13 13-45-27.log ExplorANT.2020-04-13 13-46-26.log ExplorANT.2020-04-13 13-45-55.log
There is another error now, as if there are no dongles in your system Could not find ANT-dongle
where previously you reported GetDongle: [Errno 19] No such device (it may have been disconnected)
.
In this case, I would power-down the system, take out the dongles (so that they are powered down as well), reboot and see whether there is any difference.
Please download logfile.py and antDongle.py and retry test withExplorAnt -d3
The dongle that is tried is printed to the logfile, let's see whether the second attempt indeed tries the second dongle.
Hi guys! ...I downloaded the Python code for FortiusANT but when running the module it says "ModuleNotFoundError: No module named 'numpy'". Would you please describe the installation process you used on mac??? THX
Welcome on board!
pip install -r requirements.txt
should do the job, please try
Log file attached. Still seeing a similar error - I've checked and my mac recognises both dongles as being plugged in. I also restarted etc as mentioned.
Hi, Python shell doesn't accept pip install : "SyntaxError"! I didn't see that one since coding in Basic in the early eighties! Here is the log : Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information.
======= RESTART: /Applications/FortiusANT-master/pythoncode/FortiusAnt.py ====== Traceback (most recent call last): File "/Applications/FortiusANT-master/pythoncode/FortiusAnt.py", line 119, in
import numpy ModuleNotFoundError: No module named 'numpy' pip install -r requirements.txt SyntaxError: invalid syntax
I tried "python -m pip install". Didn't work neither! Now I'm confused!
Log file attached. Still seeing a similar error - I've checked and my mac recognises both dongles as being plugged in. I also restarted etc as mentioned.
Please download antDongle.py and re-test; I have changed the error-handling in the module. It seems "in use" works different than under Windows/Linux
I'm looking to set up my tacx trainer on my mac - is there something similar for mac? Or can this be run on mac OS?