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

(#66) Implement BLE using bless #384

Merged
merged 29 commits into from
Aug 9, 2022
Merged

(#66) Implement BLE using bless #384

merged 29 commits into from
Aug 9, 2022

Conversation

WouterJD
Copy link
Owner

@WouterJD WouterJD commented Mar 3, 2022

bless is a python library that enables python programs to create a BLE Service.

For FortiusAnt that means a FitnessMachineService FTMS.
This was implemented using node to circumvent the lack of a python library.

Notes how to test:

  • Use the Implement-BLE-using-bless branch
  • Execute pip install bless
  • Specify -bb (instead of -b) to select the bless library instead of node.js (e.g. FortiusAnt (gui, autostart, BLESS).bat)
  • Take care that on Windows a BLE-5 dongle must be present, the native windows driver is OK (no zadig required)
  • Other platforms not yet tested, due to absence of test-hardware - being ordered :-)

Related changes:

  • Debugging with -d became too complex, being numeric. Now specify -d CEWIDbpjmuafA (b=ble, u=usb, D=DEBUG)
  • When standard python logging is selected (CEWID for Critical, Error, Warning, Info, Debug) then the logging library is used.

@WouterJD
Copy link
Owner Author

WouterJD commented Mar 16, 2022

Current status:

  • FortiusAnt -bb works with the bless library; NodeJs no longer required
  • Tested with Trainer Road and Rouvy on android and FortiusAnt on Windows/Raspberry

Dependency:

  • Windows 10 requires BLE/5 dongle

Installation:

  • check requirements.txt
  • On raspberry run 9_GrantAccessToBluetoothForBless.sh (modified dd. april 7th)

Test

  • run bleBless.py, which starts a simulated FTMS OR run FortiusAnt -a -g -bb -s (simulator)
  • run bleBleak.py, which simulates a CTP

Succes!

@WouterJD
Copy link
Owner Author

WouterJD commented Apr 11, 2022

I have the impression BLE/bless implementation is now done.
Unfortunately, you will see the BLE-address in Zwift/Rouvy/TrainerRoad when FortiusAnt is runnning on raspberry and the windows-hostname when running on Windows 10. This is caused by the underlaying libraries and I cannot solve it.

Please let me know; ready for integration in Master

@WouterJD
Copy link
Owner Author

Verion number set to 6.4. Manual updated. Minor modifications. See wiki for solved issues.

@WouterJD
Copy link
Owner Author

Using the bless/development branch; the BLE implementation now works on Raspberry and Windows.
As soon as @kevincar has merged development, I can merge as well.

@WouterJD WouterJD merged commit 1cb9029 into master Aug 9, 2022
@WouterJD WouterJD deleted the Implement-BLE-using-bless branch August 9, 2022 19:07
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

Successfully merging this pull request may close these issues.

None yet

1 participant