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

Can't make FortiusAnt to transmit info via BLE "Bluetooth interface n/a; Check exception." #466

Open
DavidMedina092 opened this issue Sep 7, 2024 · 11 comments

Comments

@DavidMedina092
Copy link

Hi there. I just recently heard about this amazing project. I have an old (but still working) i-flow magnetic tacx trainer. I'm running FortiusAnt on a MacBook air. I have already installed python, brew, and the libusb libraries. Also i ran the requirements.txt thing.

My issue: when i run FortiusAnt i'm able to pair with my usb head unit (tacx t1932 fortius) and the ant message below says "Bluetooth interface aviable (bless)". But the moment i hit the start button, the message changes to "Bluetooth interface n/a; Check exception." and i cannot find my trainer on any training app. I believe that there is nothing being transmitted via bluetooth in the first place.
I have basic knowledge of python and don't have hardcore programming abilities like you guys. But any help would be greatly appreciated.
By the way. Add me to the map. I'm from Mexico City. Thanks!

@WouterJD
Copy link
Owner

WouterJD commented Sep 9, 2024

Welcome to the FortiusANT community
Please consider to visit the sponsor page


Hi David; I'm happy to hear that you found FortiusAnt and that it's almost working.
I understand you have a USB-connected headunit, being the T1932 one.

Now BLE does not work; I would appreciate some more info; at lease the screen print of the console (black window) and the FortiusAnt main screen.
BLE is not the easiest interface, because drivers keep changing.

Let's see; perhaps I can help...

@DavidMedina092
Copy link
Author

DavidMedina092 commented Sep 9, 2024

Hello again. I don't know what actually happened. I tried to restart the graphic interface to copy the error message that i was getting and now it doesn't even pop. I'm just stuck with the following message:

"FortiusANT is open source and can be used freely.
[.... .....]
or visit the sponsoring page https://github.com/sponsors/WouterJD

17:14:31,139: Dongle - No (free) ANT-dongle found
17:14:31,139: Find and initialise USB head unit
17:14:31,140: No Tacx trainer found
17:14:31,140: Tacx - No Tacx trainer found
17:14:31,140: AntHRM - Heartrate expected from ANT+ HRM
Exit status: 0

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Proceso completado]"

Maybe some more computer knowledge is needed to run FortiusAnt or maybe my computer is just old (as my trainer). Whatever it is i just don't seem to be able to run it properly.
Yesterday y tried running it on an old windows10 laptop. I tried the windows executable and i get the same message as the beginning "Bluetooth interface n/a; Check exception". Thanks anyways for all the effort that you put into this project. I think i wont be able to run it.

P.D: the message that i get on my windows10 laptop says: "18:21:15,227: -b and -bb both specified, -bb is selected
18:21:22,027: ---------- BLE-devices are activated ----------
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 932, in _bootstrap_inner
File "threading.py", line 870, in run
File "FortiusAnt.py", line 490, in Tacx2DongleThread
File "FortiusAnt.py", line 171, in Tacx2Dongle
File "FortiusAntBody.py", line 676, in Tacx2Dongle
File "FortiusAntBody.py", line 1384, in Tacx2DongleSub
File "bleBless.py", line 358, in SetAthleteData
File "bless\backends\server.py", line 208, in get_characteristic
IndexError: list index out of range
18:21:22,264: clsBleServer._Server(); start() exception [WinError -2147024580] El dispositivo no admite la característica de comando
18:21:22,292: , Bluetooth interface n/a; Check exception."

@WouterJD
Copy link
Owner

WouterJD commented Sep 10, 2024

USB-dongle:
Do you have a USB-dongle in your system?
If yes, another application may have it in use. If there's no other application, unplug and insert to reset the interface.

If you connect to USB-cable at one side and BLE-dongle at other side; no ANT-dongle is required.

BLE interface:
It seems you have no rights to write (El dispositivo no admite la característica de comando); rights must be granted in your operating system.

Refer to 9_GrantAccessToBluetoothForBless.sh which is for raspberry; most likely something like this is needed on mac.

General:
Please summarize what configuration you want to use , refer to the manual, please.

See also first point in this comment; it's important what configuration you want to set-up; using USB, ANT or BLE.

@WouterJD
Copy link
Owner

Do not despair too soon; more than 1000 people world-wide use the application!
Since FortiusAnt runs on your Windows computer, it must be possible to get it running. I'm more familiar with Windows than Macintosh. Do not execute the executable by double-clicking but use the start-up script according to your parameterization!

Good luck

@WouterJD
Copy link
Owner

Hi are you still trying to get things working?
If not, I close the issue until more info is provided.

@DavidMedina092
Copy link
Author

Hello! Yes. I'm still trying. I'm currently near a natural disaster zone and i've not been able to put much attention on the issue. There has been power outrages constantly which impeed to work on the problem.

I ordered a new usb ble dongle to try and solve the issue (which has not been able to arrive to my destination due to roads blocked). Also, i quited on my attempt to run it on my macbook and i will only continue to work on my windows laptop.
Hopefully i will update my progress by tuesday morning.

Link to the news in spanish:
https://www.eluniversal.com.mx/edomex/jilotzingo-sube-a-2-la-cifra-de-muertos-tras-deslave-rescatan-con-vida-a-otras-3-personas/

@WouterJD
Copy link
Owner

Great! Lots of challenges, I see.
Curious on results of next test👍

@DavidMedina092
Copy link
Author

DavidMedina092 commented Sep 18, 2024

Ok. So i just bought a new usb ble dongle. Specifically the Asus BT400. I downloaded the drivers and installed them. Then, i opened the quickstart FortiusAnt app and i keep getting the same message:

clsBleServer._Server(); start() exception [WinError -2147024580] "El dispositivo no admite la característica de comando"
Bluetooth interface n/a; Check exception.

Then i tried with the "-b" configuration and i get the following message
**requests.post() error HTTPConnectionPool(host= 'localhost' , port=9999): Max retries exceded with url: /ant (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0ACEFFD0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')) **

I also tried to run it from the StartUp files but i keep getting from bleak_winrt.windows.devices.bluetooth.genericattributeprofile import ( # type ignore # noqa: E501 ModuleNotFoundError: No module named 'Bleak_winrt'

@WouterJD
Copy link
Owner

To start with the latter; try the command "pip install Bleak_winrt" and see what happens then.
It may be that dependencies are not installed.
I'm not a windows / python / BLE expert, so some trial-and-erro will be required.

@WouterJD
Copy link
Owner

Of course, you have googled the error and found pages like https://support.microsoft.com/es-es/windows/solucionar-problemas-de-bluetooth-en-windows-723e092f-03fa-858b-5c80-131ec3fba75c I cannot tell from distance what the issue could be.

Did you read and follow manual 3.8?

@WouterJD
Copy link
Owner

Please provide more info; not that there are many tacx types around.
Send some photo's.

As asked earlier; I understand you have a USB-connected trainer. Why not use ANT?

BLE/nodejs is a complex installation procedure
BLE/bless is a better setup, but the bless library tends to be less stable as wanted

If you have a USB-trainer; first get that side working and do some tests in test-mode with the -m flag.
That is a good step and provides some confidernce for you that it ever might work.

Then get along with the next step; connecting ZWIFT.

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

2 participants