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

Running on a mac #11

Open
JamesBudge opened this issue Nov 7, 2017 · 20 comments
Open

Running on a mac #11

JamesBudge opened this issue Nov 7, 2017 · 20 comments

Comments

@JamesBudge
Copy link

Hello John,

Tried to run it on my Mac, but running up against an issue.

Getting the following error message in the debug:
get ant stick
No backend available
No backend- check libusb
No backend available
No backend- check libusb
ANT Stick not found

any thoughts?
checked in system information and the ant stick is listed there. No instances of zwift or garmin etc running.

Thanks,

James

@john-38787364
Copy link
Owner

You need libusb. Can you try after
brew install libusb-compat

1 similar comment
@john-38787364
Copy link
Owner

You need libusb. Can you try after
brew install libusb-compat

@JamesBudge
Copy link
Author

JamesBudge commented Nov 7, 2017

Thanks John,

installed libusb (and brew!) and that gets me to the same point as the raspberry pi, looks like I've had the same install issue, will try the install script for both and see how I get on:

sudo python /Users/James/antifier/antifier.py --debug
Assuming fixed resistance return value from trainer
get ant stick
Trying to write to 4104 dongle
USB READ ERROR [Errno 60] Operation timed out
<< ['a4016f20ea']
Using Suunto dongle
get trainer
0x1932
Found variable resistance return value from trainer
Exception in thread Thread-2:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Users/James/antifier/antifier.py", line 500, in run
pc_dict = trainer.parse_factors(power_curve)#get power curve dictionary
File "/Users/James/antifier/trainer.py", line 116, in parse_factors
temp = open(filename,'r').read().split('\n')
IOError: [Errno 2] No such file or directory: 'power_calc_factors_fortius.txt'

@john-38787364
Copy link
Owner

I've updated the install script and removed scipy:)

@JamesBudge
Copy link
Author

Thanks John,

Saw that you had done so and so retried a fresh install. But still getting the following (weirdly the file that says is missing is in the folder:

Assuming fixed resistance return value from trainer
get ant stick
Trying to write to 4104 dongle
USB READ ERROR [Errno 60] Operation timed out
<< ['a4016f20ea']
Using Suunto dongle
get trainer
0x1932
Found variable resistance return value from trainer
Exception in thread Thread-2:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Users/James/antifier/antifier.py", line 500, in run
pc_dict = trainer.parse_factors(power_curve)#get power curve dictionary
File "/Users/James/antifier/trainer.py", line 116, in parse_factors
temp = open(filename,'r').read().split('\n')
IOError: [Errno 2] No such file or directory: 'power_calc_factors_fortius.txt'

Thanks again for your continued help.

@john-38787364
Copy link
Owner

john-38787364 commented Nov 7, 2017 via email

@JamesBudge
Copy link
Author

Oh that was very silly of me, no I wasn't.

Have done so now and it runs but couldn't pick up a signal when in zwift.

ran with debug and now getting the follow:
1510163135317 >> a4094e001902000000000030c80000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0.0 0 0 0 0 0
2017-11-08 17:45:35.567 GRADE 0 %
2017-11-08 17:45:35.568 TRAINER DATA a4 09 4e 00 10 19 03 00 00 00 00 30 d9 00 00

Any ideas what I'm doing wrong now?

Thank again,

James

@JamesBudge
Copy link
Author

realise part of the problem (connecting to zwift) may be that my two ant+ dongles are not the same version one is 1008 one 1004. The 1004 version is not recognised by antifier on either my mac or my raspberry pi (understandable as you state that its only built for 1008 and 1009).

However zwift recognised the 1004 ant+ stick but doesn't pick up the signal from the 1008 broadcasting from antifier on the raspberry pi (which isn't having the above err no 60 issue)

Will get one or two newer ant+ sticks and see if I can at least get it working with my raspberry pi!

@john-38787364
Copy link
Owner

john-38787364 commented Nov 8, 2017 via email

@JamesBudge
Copy link
Author

Hello John,

Thanks for your message. Here is the debug script using the 1008. for some reason it wouldn't let me use the out.log on the mac so have just copied the debug output from the terminal, hope thats ok!

Happy to try and get the 1004 working too if they will speak to each other!

Jamess-MacBook-Pro:~ James$ cd /users/james/antifier/
Jamess-MacBook-Pro:antifier James$ sudo python antifier.py --debug > out.log
-bash: out.log: Permission denied
Jamess-MacBook-Pro:antifier James$ sudo python antifier.py --d > out.log
-bash: out.log: Permission denied
Jamess-MacBook-Pro:antifier James$ sudo python antifier.py -d > out.log
-bash: out.log: Permission denied
Jamess-MacBook-Pro:antifier James$ sudo python antifier.py -d
Password:
Assuming fixed resistance return value from trainer
get ant stick
Trying to write to 4104 dongle
USB READ ERROR [Errno 60] Operation timed out
<< ['a4016f00ca']
Using Suunto dongle
get trainer
0x1932
reset ant stick
1510168374928 >> a4014a00ef0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a4016f20ea']
['a4016f20ea']
calibrate ant stick
1510168374950 >> a4024d0054bf0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40654080300ba360071']
1510168374971 >> a4014a00ef0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a4016f20ea']
1510168374993 >> a4024d003ed50000
USB READ ERROR [Errno 60] Operation timed out
<< []
1510168375014 >> a4094600b9a521fbbd72c345640000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340004600a1']
['a40654080300ba360071', 'a4016f20ea', 'a40340004600a1']
calibrate ant stick FE-C
1510168375035 >> a40342001000f50000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340004200a5']
1510168375056 >> a405510001001105e50000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340005100b6']
1510168375078 >> a402450039da0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340004500a2']
1510168375099 >> a40343000020c40000
USB READ ERROR [Errno 60] Operation timed out
<< []
1510168375120 >> a402600003c50000
USB READ ERROR [Errno 60] Operation timed out
<< ['a4034000600087']
1510168375141 >> a4014b00ee0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340004b00ac']
1510168375162 >> a4094e0050ffff010f008583bb0000
USB READ ERROR [Errno 60] Operation timed out
<< []
['a40340004200a5', 'a40340005100b6', 'a40340004500a2', 'a4034000600087', 'a40340004b00ac']
calibrate ant stick HR
1510168375183 >> a40342011000f40000
USB READ ERROR [Errno 60] Operation timed out
<< []
1510168375204 >> a405510165007801ed0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340015100b7']
1510168375225 >> a402450139db0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340014500a3']
1510168375246 >> a4034301861f7c0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340014300a5']
1510168375267 >> a402600103c40000
USB READ ERROR [Errno 60] Operation timed out
<< ['a4034001600086']
1510168375288 >> a4014b01ef0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340014b00ad']
['a40340015100b7', 'a40340014500a3', 'a40340014300a5', 'a4034001600086', 'a40340014b00ad']
Running 0.0
0.0 0 0 0 0 0
2017-11-08 19:12:55.311 GRADE 0 %
2017-11-08 19:12:55.312 TRAINER DATA a4 09 4e 00 50 ff ff 01 0f 00 85 83 bb 00 00
1510168375312 >> a4094e0050ffff010f008583bb0000
USB READ ERROR [Errno 60] Operation timed out
<< []
[]
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:55.563 GRADE 0 %
2017-11-08 19:12:55.564 TRAINER DATA a4 09 4e 00 19 01 00 00 00 00 00 30 cb 00 00
1510168375564 >> a4094e001901000000000030cb0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5']
['a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:55.815 GRADE 0 %
2017-11-08 19:12:55.816 TRAINER DATA a4 09 4e 00 19 02 00 00 00 00 00 30 c8 00 00
1510168375816 >> a4094e001902000000000030c80000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:56.066 GRADE 0 %
2017-11-08 19:12:56.067 TRAINER DATA a4 09 4e 00 10 19 03 00 00 00 00 30 d9 00 00
1510168376067 >> a4094e001019030000000030d90000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010109ee']
['a40340000103e5', 'a40340010109ee']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:56.318 GRADE 0 %
2017-11-08 19:12:56.319 TRAINER DATA a4 09 4e 00 19 04 00 00 00 00 00 30 ce 00 00
1510168376319 >> a4094e001904000000000030ce0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000109ef']
['a40340010103e4', 'a40340000109ef']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:56.569 GRADE 0 %
2017-11-08 19:12:56.570 TRAINER DATA a4 09 4e 00 19 05 00 00 00 00 00 30 cf 00 00
1510168376570 >> a4094e001905000000000030cf0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000109ef']
['a40340010103e4', 'a40340000109ef']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:56.821 GRADE 0 %
2017-11-08 19:12:56.822 TRAINER DATA a4 09 4e 00 10 19 06 00 00 00 00 30 dc 00 00
1510168376822 >> a4094e001019060000000030dc0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010109ee']
['a40340000103e5', 'a40340010109ee']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:57.072 GRADE 0 %
2017-11-08 19:12:57.073 TRAINER DATA a4 09 4e 00 19 07 00 00 00 00 00 30 cd 00 00
1510168377073 >> a4094e001907000000000030cd0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:57.324 GRADE 0 %
2017-11-08 19:12:57.325 TRAINER DATA a4 09 4e 00 19 08 00 00 00 00 00 30 c2 00 00
1510168377325 >> a4094e001908000000000030c20000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:57.575 GRADE 0 %
2017-11-08 19:12:57.576 TRAINER DATA a4 09 4e 00 10 19 09 00 00 00 00 30 d3 00 00
1510168377576 >> a4094e001019090000000030d30000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:57.827 GRADE 0 %
2017-11-08 19:12:57.828 TRAINER DATA a4 09 4e 00 19 0a 00 00 00 00 00 30 c0 00 00
1510168377828 >> a4094e00190a000000000030c00000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:58.078 GRADE 0 %
2017-11-08 19:12:58.079 TRAINER DATA a4 09 4e 00 19 0b 00 00 00 00 00 30 c1 00 00
1510168378079 >> a4094e00190b000000000030c10000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:58.330 GRADE 0 %
2017-11-08 19:12:58.331 TRAINER DATA a4 09 4e 00 10 19 0c 00 00 00 00 30 d6 00 00
1510168378331 >> a4094e0010190c0000000030d60000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:12:58.581 GRADE 0 %
2017-11-08 19:12:58.582 TRAINER DATA a4 09 4e 00 19 0d 00 00 00 00 00 30 c7 00 00
1510168378582 >> a4094e00190d000000000030c70000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:58.833 GRADE 0 %
2017-11-08 19:12:58.833 TRAINER DATA a4 09 4e 00 19 0e 00 00 00 00 00 30 c4 00 00
1510168378834 >> a4094e00190e000000000030c40000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:59.085 GRADE 0 %
2017-11-08 19:12:59.085 TRAINER DATA a4 09 4e 00 10 19 0f 00 00 00 00 30 d5 00 00
1510168379085 >> a4094e0010190f0000000030d50000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5', 'a40340010103e4']
['a40340010103e4', 'a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:59.336 GRADE 0 %
2017-11-08 19:12:59.337 TRAINER DATA a4 09 4e 00 19 10 00 00 00 00 00 30 da 00 00
1510168379337 >> a4094e001910000000000030da0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:59.588 GRADE 0 %
2017-11-08 19:12:59.589 TRAINER DATA a4 09 4e 00 19 11 00 00 00 00 00 30 db 00 00
1510168379589 >> a4094e001911000000000030db0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:12:59.839 GRADE 0 %
2017-11-08 19:12:59.840 TRAINER DATA a4 09 4e 00 10 19 12 00 00 00 00 30 c8 00 00
1510168379840 >> a4094e001019120000000030c80000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:00.091 GRADE 0 %
2017-11-08 19:13:00.092 TRAINER DATA a4 09 4e 00 19 13 00 00 00 00 00 30 d9 00 00
1510168380092 >> a4094e001913000000000030d90000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:00.343 GRADE 0 %
2017-11-08 19:13:00.343 TRAINER DATA a4 09 4e 00 19 14 00 00 00 00 00 30 de 00 00
1510168380343 >> a4094e001914000000000030de0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:00.594 GRADE 0 %
2017-11-08 19:13:00.595 TRAINER DATA a4 09 4e 00 10 19 15 00 00 00 00 30 cf 00 00
1510168380595 >> a4094e001019150000000030cf0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 255.0
0 0 0 0 0 0
2017-11-08 19:13:00.850 GRADE 0 %
2017-11-08 19:13:00.850 TRAINER DATA a4 09 4e 00 19 16 00 00 00 00 00 30 dc 00 00
1510168380850 >> a4094e001916000000000030dc0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:01.101 GRADE 0 %
2017-11-08 19:13:01.102 TRAINER DATA a4 09 4e 00 19 17 00 00 00 00 00 30 dd 00 00
1510168381102 >> a4094e001917000000000030dd0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:01.353 GRADE 0 %
2017-11-08 19:13:01.353 TRAINER DATA a4 09 4e 00 10 19 18 00 00 00 00 30 c2 00 00
1510168381354 >> a4094e001019180000000030c20000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:01.604 GRADE 0 %
2017-11-08 19:13:01.605 TRAINER DATA a4 09 4e 00 19 19 00 00 00 00 00 30 d3 00 00
1510168381605 >> a4094e001919000000000030d30000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:01.856 GRADE 0 %
2017-11-08 19:13:01.856 TRAINER DATA a4 09 4e 00 19 1a 00 00 00 00 00 30 d0 00 00
1510168381856 >> a4094e00191a000000000030d00000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:02.107 GRADE 0 %
2017-11-08 19:13:02.108 TRAINER DATA a4 09 4e 00 10 19 1b 00 00 00 00 30 c1 00 00
1510168382108 >> a4094e0010191b0000000030c10000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:02.359 GRADE 0 %
2017-11-08 19:13:02.360 TRAINER DATA a4 09 4e 00 19 1c 00 00 00 00 00 30 d6 00 00
1510168382360 >> a4094e00191c000000000030d60000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:02.611 GRADE 0 %
2017-11-08 19:13:02.611 TRAINER DATA a4 09 4e 00 19 1d 00 00 00 00 00 30 d7 00 00
1510168382611 >> a4094e00191d000000000030d70000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:02.862 GRADE 0 %
2017-11-08 19:13:02.863 TRAINER DATA a4 09 4e 00 10 19 1e 00 00 00 00 30 c4 00 00
1510168382863 >> a4094e0010191e0000000030c40000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:03.114 GRADE 0 %
2017-11-08 19:13:03.114 TRAINER DATA a4 09 4e 00 19 1f 00 00 00 00 00 30 d5 00 00
1510168383114 >> a4094e00191f000000000030d50000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:03.365 GRADE 0 %
2017-11-08 19:13:03.366 TRAINER DATA a4 09 4e 00 19 20 00 00 00 00 00 30 ea 00 00
1510168383366 >> a4094e001920000000000030ea0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:03.617 GRADE 0 %
2017-11-08 19:13:03.617 TRAINER DATA a4 09 4e 00 51 ff ff 01 01 00 00 00 b2 00 00
1510168383617 >> a4094e0051ffff0101000000b20000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:03.868 GRADE 0 %
2017-11-08 19:13:03.869 TRAINER DATA a4 09 4e 00 51 ff ff 01 01 00 00 00 b2 00 00
1510168383869 >> a4094e0051ffff0101000000b20000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:04.120 GRADE 0 %
2017-11-08 19:13:04.120 TRAINER DATA a4 09 4e 00 19 23 00 00 00 00 00 30 e9 00 00
1510168384120 >> a4094e001923000000000030e90000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:04.371 GRADE 0 %
2017-11-08 19:13:04.372 TRAINER DATA a4 09 4e 00 10 19 24 00 00 00 00 30 fe 00 00
1510168384372 >> a4094e001019240000000030fe0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 254.0
0 0 0 0 0 0
2017-11-08 19:13:04.625 GRADE 0 %
2017-11-08 19:13:04.626 TRAINER DATA a4 09 4e 00 19 25 00 00 00 00 00 30 ef 00 00
1510168384626 >> a4094e001925000000000030ef0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:04.876 GRADE 0 %
2017-11-08 19:13:04.877 TRAINER DATA a4 09 4e 00 19 26 00 00 00 00 00 30 ec 00 00
1510168384877 >> a4094e001926000000000030ec0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4']
['a40340000103e5', 'a40340010103e4']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:05.128 GRADE 0 %
2017-11-08 19:13:05.128 TRAINER DATA a4 09 4e 00 10 19 27 00 00 00 00 30 fd 00 00
1510168385129 >> a4094e001019270000000030fd0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a40340010103e4', 'a40340000103e5']
['a40340000103e5', 'a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:05.379 GRADE 0 %
2017-11-08 19:13:05.380 TRAINER DATA a4 09 4e 00 19 28 00 00 00 00 00 30 e2 00 00
1510168385380 >> a4094e001928000000000030e20000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:05.631 GRADE 0 %
2017-11-08 19:13:05.631 TRAINER DATA a4 09 4e 00 19 29 00 00 00 00 00 30 e3 00 00
1510168385631 >> a4094e001929000000000030e30000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 255.0
0 0 0 0 0 0
2017-11-08 19:13:05.885 GRADE 0 %
2017-11-08 19:13:05.886 TRAINER DATA a4 09 4e 00 10 19 2a 00 00 00 00 30 f0 00 00
1510168385886 >> a4094e0010192a0000000030f00000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:06.137 GRADE 0 %
2017-11-08 19:13:06.137 TRAINER DATA a4 09 4e 00 19 2b 00 00 00 00 00 30 e1 00 00
1510168386138 >> a4094e00192b000000000030e10000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:06.388 GRADE 0 %
2017-11-08 19:13:06.389 TRAINER DATA a4 09 4e 00 19 2c 00 00 00 00 00 30 e6 00 00
1510168386389 >> a4094e00192c000000000030e60000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:06.641 GRADE 0 %
2017-11-08 19:13:06.641 TRAINER DATA a4 09 4e 00 10 19 2d 00 00 00 00 30 f7 00 00
1510168386641 >> a4094e0010192d0000000030f70000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:06.892 GRADE 0 %
2017-11-08 19:13:06.893 TRAINER DATA a4 09 4e 00 19 2e 00 00 00 00 00 30 e4 00 00
1510168386893 >> a4094e00192e000000000030e40000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:07.144 GRADE 0 %
2017-11-08 19:13:07.144 TRAINER DATA a4 09 4e 00 19 2f 00 00 00 00 00 30 e5 00 00
1510168387145 >> a4094e00192f000000000030e50000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:07.396 GRADE 0 %
2017-11-08 19:13:07.397 TRAINER DATA a4 09 4e 00 10 19 30 00 00 00 00 30 ea 00 00
1510168387397 >> a4094e001019300000000030ea0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:07.648 GRADE 0 %
2017-11-08 19:13:07.649 TRAINER DATA a4 09 4e 00 19 31 00 00 00 00 00 30 fb 00 00
1510168387649 >> a4094e001931000000000030fb0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:07.899 GRADE 0 %
2017-11-08 19:13:07.900 TRAINER DATA a4 09 4e 00 19 32 00 00 00 00 00 30 f8 00 00
1510168387900 >> a4094e001932000000000030f80000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:08.151 GRADE 0 %
2017-11-08 19:13:08.151 TRAINER DATA a4 09 4e 00 10 19 33 00 00 00 00 30 e9 00 00
1510168388151 >> a4094e001019330000000030e90000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:08.403 GRADE 0 %
2017-11-08 19:13:08.404 TRAINER DATA a4 09 4e 00 19 34 00 00 00 00 00 30 fe 00 00
1510168388404 >> a4094e001934000000000030fe0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:08.655 GRADE 0 %
2017-11-08 19:13:08.656 TRAINER DATA a4 09 4e 00 19 35 00 00 00 00 00 30 ff 00 00
1510168388656 >> a4094e001935000000000030ff0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:08.906 GRADE 0 %
2017-11-08 19:13:08.906 TRAINER DATA a4 09 4e 00 10 19 36 00 00 00 00 30 ec 00 00
1510168388907 >> a4094e001019360000000030ec0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:09.157 GRADE 0 %
2017-11-08 19:13:09.158 TRAINER DATA a4 09 4e 00 19 37 00 00 00 00 00 30 fd 00 00
1510168389158 >> a4094e001937000000000030fd0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 253.0
0 0 0 0 0 0
2017-11-08 19:13:09.410 GRADE 0 %
2017-11-08 19:13:09.411 TRAINER DATA a4 09 4e 00 19 38 00 00 00 00 00 30 f2 00 00
1510168389411 >> a4094e001938000000000030f20000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:09.662 GRADE 0 %
2017-11-08 19:13:09.663 TRAINER DATA a4 09 4e 00 10 19 39 00 00 00 00 30 e3 00 00
1510168389663 >> a4094e001019390000000030e30000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 252.0
0 0 0 0 0 0
2017-11-08 19:13:09.914 GRADE 0 %
2017-11-08 19:13:09.915 TRAINER DATA a4 09 4e 00 19 3a 00 00 00 00 00 30 f0 00 00
1510168389915 >> a4094e00193a000000000030f00000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5']
['a40340010103e4', 'a40340000103e5']
Running 251.0
0 0 0 0 0 0
2017-11-08 19:13:10.165 GRADE 0 %
2017-11-08 19:13:10.166 TRAINER DATA a4 09 4e 00 19 3b 00 00 00 00 00 30 f1 00 00
1510168390166 >> a4094e00193b000000000030f10000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340010103e4', 'a40340000103e5', 'a40340010103e4']
['a40340010103e4', 'a40340000103e5', 'a40340010103e4']
1510168390416 >> a4014a00ef0000
USB READ ERROR [Errno 60] Operation timed out
<< ['a40340000103e5', 'a4016f20ea']
['a40340000103e5', 'a4016f20ea']
Exception in thread Thread-2:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "antifier.py", line 774, in run
dev_ant.close()
AttributeError: 'Device' object has no attribute 'close'

@john-38787364
Copy link
Owner

Thanks James- we now have the libusb backend working :) can you ensure the ANT+ dongle is installed as a libusb device? It seems libusb is having problems reading and writing to it. If you've used the dongle on the mac with another application a kernel device may be blocking it. Try
sudo kextunload /System/Library/Extensions/SiLabsUSBDriver.kext
(see https://github.com/libusb/libusb/wiki/FAQ#How_can_I_run_libusb_applications_under_Mac_OS_X_if_there_is_already_a_kernel_extension_installed_for_the_device)

If this doesn't work we can try writing to the dongle via the serial kernel extension rather than through libusb

@john-38787364
Copy link
Owner

Hi James- I've added 1004 dongles into the device scan. This only applies to Windows/Mac. Can you redownload the ant.py script and try again? (once we've got libusb working)

@JamesBudge
Copy link
Author

Hello John,

Thanks you for both your above messages.
I have reinstalled the script with the updated ant.py, many thanks.

I tried your recommend:
sudo kextunload /System/Library/Extensions/SiLabsUSBDriver.kext

But get back:
Jamess-MacBook-Pro:~ James$ sudo kextunload /System/Library/Extensions/SiLabsUSBDriver.kext
Password:
Can't open CFBundle for /System/Library/Extensions/SiLabsUSBDriver.kext.
Can't create /System/Library/Extensions/SiLabsUSBDriver.kext.

When I go into this directory there is no SiLabsUSBDriver.kext.
Is this something I need to install?

Sorry these are probably rather incompetent questions my limit in coding is the occasional line in R for work!

@john-38787364
Copy link
Owner

I'm going to try to load OSX in VirtualBox and replicate!

@JamesBudge
Copy link
Author

Thanks John!

@metyl
Copy link

metyl commented Nov 13, 2017

Hi
I'm another macOS user ready to help, but I have few question at start:

  • which version of python should we use (2 or 3)
  • which version of libusb should we use (1.0 or 0.1 with compatibility wrapper)

I get to the same error as above:

Assuming fixed resistance return value from trainer
get ant stick
Trying to write to 4104 dongle
USB READ ERROR [Errno 60] Operation timed out
<< ['a4016f20ea']
Using Suunto dongle
get trainer

I have Adidas miCoach ANT+ USB dongle (don't have a 2nd ANT+ receiver yet).
Not sure is it supported or not, here are some info about this dongle.

$ system_profiler SPUSBDataType

        ANT USBStick2:

          Product ID: 0x1008
          Vendor ID: 0x0fcf  (Dynastream Innovations Inc.)
          Version: 1.00
          Serial Number: C06A81F
          Speed: Up to 12 Mb/sec
          Manufacturer: Dynastream Innovations
          Location ID: 0x14200000 / 12
          Current Available (mA): 500
          Current Required (mA): 100
          Extra Operating Current (mA): 0

$ ioreg -p IOUSB -l

    ANT USBStick2@14200000  <class AppleUSBDevice, id 0x100015328, registered, matched, active, busy 0 (2 ms), retain 17>
        {
          "sessionID" = 94600358399326
          "iManufacturer" = 1
          "bNumConfigurations" = 1
          "idProduct" = 4104
          "bcdDevice" = 256
          "Bus Power Available" = 250
          "USB Address" = 13
          "bMaxPacketSize0" = 32
          "iProduct" = 2
          "iSerialNumber" = 3
          "bDeviceClass" = 0
          "Built-In" = No
          "locationID" = 337641472
          "bDeviceSubClass" = 0
          "bcdUSB" = 512
          "USB Product Name" = "ANT USBStick2"
          "PortNum" = 2
          "non-removable" = "no"
          "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
          "bDeviceProtocol" = 0
          "IOUserClientClass" = "IOUSBDeviceUserClientV2"
          "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3$
          "kUSBCurrentConfiguration" = 1
          "Device Speed" = 1
          "USB Vendor Name" = "Dynastream Innovations"
          "idVendor" = 4047
          "IOGeneralInterest" = "IOCommand is not serializable"
          "USB Serial Number" = "C06A81F"
          "IOClassNameOverride" = "IOUSBDevice"
        }

@john-38787364
Copy link
Owner

Using python 2.7, any version of libusb should work but 1 is recommended

@metyl
Copy link

metyl commented Nov 13, 2017

I have connected Fortius with blue T1942 head unit but there is also problem with loading tacx firmware:

Found uninitialised 1942 head unit
sh: fxload-libusb.exe: command not found
Initialising head unit, please wait 5 seconds
Unable to initialise trainer

How .exe file should work on macOS or linux?

Info about connected T1942 head unit:
$ system_profiler SPUSBDataType

Vendor-Specific Device:

          Product ID: 0xe6be
          Vendor ID: 0x3561
          Version: 20.01
          Speed: Up to 12 Mb/sec
          Location ID: 0x14100000 / 19
          Current Available (mA): 500
          Extra Operating Current (mA): 0

$ ioreg -p IOUSB -l

    +-o IOUSBHostDevice@14100000  <class AppleUSBDevice, id 0x100015ad6, registered, matched, active, busy 0 (4 ms), retain 14>
    |   {
    |     "sessionID" = 102714576366627
    |     "iManufacturer" = 0
    |     "bNumConfigurations" = 1
    |     "idProduct" = 59070
    |     "bcdDevice" = 8193
    |     "Bus Power Available" = 250
    |     "USB Address" = 19
    |     "bMaxPacketSize0" = 64
    |     "iProduct" = 0
    |     "iSerialNumber" = 0
    |     "bDeviceClass" = 255
    |     "Built-In" = No
    |     "locationID" = 336592896
    |     "bDeviceSubClass" = 255
    |     "bcdUSB" = 256
    |     "IOUserClientClass" = "IOUSBDeviceUserClientV2"
    |     "PortNum" = 1
    |     "non-removable" = "no"
    |     "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
    |     "bDeviceProtocol" = 255
    |     "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
    |     "Device Speed" = 1
    |     "idVendor" = 13665
    |     "IOGeneralInterest" = "IOCommand is not serializable"
    |     "IOClassNameOverride" = "IOUSBDevice"
    |   }

@john-38787364
Copy link
Owner

Sorry guys not having a Mac or knowing much about them I can't help. Can I suggest a Raspberry Pi or even a Pi Zero as a low cost alternative until someone sorts Macs out?

@metyl
Copy link

metyl commented Nov 14, 2017

I managed to run antifier on macOS but need to test it.
@john-38787364 why do You bypass timeout error at

if "timeout error" in str(e):

I have the same error on macOS.

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

No branches or pull requests

3 participants