-
-
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
Installation instructions Raspberry - Bluetooth #192
Comments
Don't have a Raspberry PI 3B so can't test this directly, but it looks quite thorough! I have a few suggestions on how to improve this further (well, I hope so at least):
Some more general ideas that may or may not make sense to persue:
|
First of all, props for writing this instruction, very thorough. |
If the device you use Zwift/Rouvy/etc on has Bluetooth LE (or if you are using Zwift on PC with the Companion app on the phone) as well and you are not using any ANT-only power meter/sensor, yes, no ANT dongle required.
I think so, yes. There are a number of potential disadvantages to building images that way:
For that reason, images are usually built in an automated way on a PC/server instead. But that is quite a bit more work to set-up, so unless someone volunteers to do that, I think your image could still be quite helpful for others! |
Not sure what the best options are long-term:
|
I'm stuck at the following step: The virtual environment needs to be activated for the following with this command:
I get the message the file or folder does not exist? Using command ls -all, it does not exist indeed in the home folder? |
test "$ source --help", does this give you the help messages? If not something went wrong with your virtual environment install. |
This does give me the help message. I also didn;t get any errors during the virtual environment install. The venv folder is not visible in the home folder though? |
Wooops, noob at work here. I skipped a step, I've succeeded now. Continuing install on the RPi3. |
@switchabl Thanks a lot for the great comments. I will pick this up and try to work through your proposal. I do agree with almost all of it. I did try to run without stopping the bluetooth service and not using the hciconfig command, however this did not work for me. Maybe you have a suggestion there. Regarding the virtual environment in the script, this was just to make the startup as easy as possible. I have already altered the text to include the command line parameters for startup. Very nice suggestion there. Regarding your general ideas:
|
Well, Thanks a bunch. I successfully connected my iPhone to the Tacx via BLE. Tomorrow I will set my bike up on the Tacx and make an attempt with my laptop. |
Nice! Thanks for the feedback. Good luck with the test tomorrow. |
It seems I was wrong, I looked at the bleno docs (the library used for the Bluetooth functionality) and apparently they are both necessary.
Yes, if you are using it interactively, it definitely makes sense. In a script it apparently isn't necessary most of the times as long as you call the right Python interpreter. If it is (in case FortiusANT expects the Python interpreter in PATH or something), I believe you can at least skip the
I was under the impression that the latest version of FortiusANT doesn't import wx in CLI mode. So I was hoping that
may be all that is required (apart from the permissions and Bluetooth part). But maybe not, I haven't tried yet.
Yes, I wouldn't be surprised if running it continously uncovered some stability bugs. I have some plans to improve calibration (save calibration value between sessions; allow calibration on request, not on startup; allow calibration requests through ANT/Bluetooth) that would probably help with the head-less case as well. |
Hi, by excecuting all the commands wtal710174 it sure works perfectly on a raspberry 3b+ Adding |
I can also attest that the natallation and configuration steps work on a raspberry Pi 4. I have a 7” touchscreen connected to the raspberry Pi HDMI port allowing for startup/shutdown without external keyboard or mouse. Happily able to run Zwift app on iPhone, Zwift app on Windows with FortiusAnt connected via iPhone Zwift Companion app. There does seem to be some GUI related issues, in that the GUI becomes unresponsive, and requires a kill command to close out. Even though the GUI becomes unresponsive, FortiusANT continues to function. Mike |
How do I start the GUI? I attempted with -g but it didn’t work. |
It is also possible to start FortiusANT by simply clicking in the script /home/pi/FortiusANT.sh in the filebrower. |
Thanks!
Outlook voor iOS<https://aka.ms/o0ukef> downloaden
…________________________________
Van: TacxBiker <notifications@github.com>
Verzonden: Thursday, January 7, 2021 8:39:59 AM
Aan: WouterJD/FortiusANT <FortiusANT@noreply.github.com>
CC: wouterstrand <wouter_reinhard@hotmail.com>; Comment <comment@noreply.github.com>
Onderwerp: Re: [WouterJD/FortiusANT] Installation instructions Raspberry - Bluetooth (#192)
It is also possible to start FortiusANT by simply clicking in the script /home/pi/FortiusANT.sh in the filebrower.
Then the GUI is visible.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#192 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASC53BTPNPCLGESAY2FJWFDSYVQM7ANCNFSM4VTQM5XA>.
|
One thing, it is not possible to add opperants when clicking on the script. |
I created a little add on which might be useful to others as well. When I started the GUI today for testing some stuff I noticed that the GUI is showing new versions in the status bar if available (very nice feature :-)). Therefore I implemented an automatic update in the script, to check for the latest version during start up and update the new files. In order to do this you need to implement the following. Step 1:
Step 2 - Get new code from repository (needs to be done in the FortiusANT directory)
If you implement this line in the script after the password section with
the script will always check for updates and download the files before starting FortiusANT. |
Bluetooth without sudo for piI followed @switchabl 's advice. This worked kind of for me. So step 1 is complete ... pi can start and stop bluetooth, however a password is still required. Did anybody get this working without password request for pi so far? Edit: Forget it! I have figured it out and will post a short step by step with an updated script shortly. Maybe I just need some more sleep and less riding on my bike... |
@TacxBiker Sounds like you do not need a sudo password for the script anymore, how did you get this done? Or are you starting the script in a terminal after double clicking? |
On more idea for improvement. Some of the users here talk about running the Pi headless and just attaching it to the trainer to make it kind of an interface that does not require any input through a terminal or touchscreen. @switchabl mentioned the service before. What about connecting an on/off switch to the IO-ports of the raspberry, which starts the script or service in on position and stops the script or service in off position. Anybody that did something similar in the past and has an idea how to implement this for the user pi (script) or as a service that listens to the switch status? |
@mikeherriman Thanks for the feedback! |
Bluetooth without Sudo and updated scriptBased on the remarks from @switchabl above. Edit: $@ was lacking the quotation marks. Changed to if [ -z "$@" ] First give user the right to use hciconfig without sudo
Then enter the command 'sudo visudo' to edit the sudoers file. In the section
This will grant all member of the group usbtacx the right to start bluetooth service without entering a password. (Comment: I tried to run the command without sudo, since this works for the hciconfig command. If you ommit the sudo you will have to enter a password) Now edit the FortiusANT script with
Save the changed file restart the RaspberryPi with In the beginning of the script you can set your default command line options now in case you start the script with no options. Now you should be able to start the script without any issue by double clicking the file in the file browser in the graphical interface (using default options) or as before in a terminal with |
I just updated the sudouser file as instructed, edited the FortiusANT.sh file as instructed. I also added the switches inside the script (-a -g -H0 -c12). Created desktop shortcut to the script. |
@wtal710174 |
@TacxBiker Which script are you using? Please make sure you have |
@decodeais I followed the installation instructions #192 and it worked right-away.
I understand this is to "disable standard ble and enable ble for nodejs" but that's my interpretation. I'm gathering all exchanged data into the manual, the publication will take some time. |
Thank you, I already did everything written in the description. When you said that it is really working with the internaI RP4 bluetooth i started testing again. |
@WouterJD - do you need/want any help updating the manual for RPi installation? Happy to lend a hand. |
Thanks @MeanHat I'll come back to it when required. |
@wtal710174, @decodeais, @MeanHat Thanks for all the inspiration and documentation! I will make a wiki-page where all special pictures will be gathered "Raspberry page of glory"; who has a fancier title for the page? |
I have integrated Raspberry Pi into FortiusAnt, code, installation scripts and manual. Tonight I cleaned the SD-card and reinstalled everything. BUT the bluetooth hci0 device does not work:
and when I give the sudo service bluetooth status:
Suggestions appreciated! |
Hi @WouterJD - great work on the new Release and the updated manual https://github.com/WouterJD/FortiusANT/blob/Raspberry_Release6/doc/FortiusANTUserManual.pdf. I'll happily test out the new v6. I've changed the code running the miniTFT display as Bluetooth was dropping out after about 2 mins. I will post the updated version which fixes this. Hope you are able to fix your Bluetooth issue - if I have any suggestions I'll let you know. |
Yesterday (ahum it was 01:00) I switched the RPI off, left it for tonite to redo the installation. |
@wtal710174 I hope hope you can live with how I scripted and documented. After all it's your work I "scrambled". It sure gives thoughts how to redo the windows installation. |
Makes me happy to see that I could give something back to this awesome project, which increased my time on the bike tremendously during the winter 🥇. I will check the documentation and let you know if I have any remarks. |
And I thought stuff like this happens on Windows only ... |
A hard wake-up call :-(. |
@martin-vi do you follow this issue? @wtal710174 references https://gist.github.com/martin-vi/5206b6b26faf6f2d6121f6c8f300e44d and I think it would be good to integrate that into the current description and manual. My consideration to see BLE as the default for Raspberry Pi is that it's default onboard AND there is a lot of confusion on ANT-dongles. The Raspberry Pi can then be used from a Smartphone. (Ahum ... this part is not in the manual yet). What is your consideration to use ANT? |
@MeanHat do you use ANT or BLE? |
I intend to extend the manual with the following section: 3.12.7 Now pair with a CTPZwift, Trainer Road, Rouvy, Sufferfest, Golden Cheetah, Road Grand Tour, TTS and many others can now pair with the Bluetooth trainer “FortiusANT Trainer” on a device that supports BLE. Perhaps a Smartphone is the most generally available device to use and from there the screen can be streamed to a TV. Of course, you can also use a PC with a Bluetooth dongle. Comment appreciated |
Another question: when the .sh files are fetched from git, the execute bit is not set and hence the files are not executable using a double-click from the file-manager. How could that be solved? |
Supporting @martin-vi's points about both Bluetooth and phones I'd add:
|
Hi @WouterJD - I've been using Bluetooth with the minTFT display but have used ANT for a headless RPi0 version I did for my neighbour last year. I'll do that. |
I've seen that also. Double clicking the .sh file from the file-manager
provides me with three main options:
1. Execute
2. Execute in Terminal Mode
3. Open (for editing)
When testing FortiusANT with a GUI I found it preferable to start using
option #2. Running headless I have called the .sh file from a startup
script which works fine (I have also opened it from the python miniTFT
Controller using Popen).
Not sure if that helps?
…On Sat, Mar 6, 2021 at 8:02 AM Wouter Dubbeldam ***@***.***> wrote:
Another question: when the .sh files are fetched from git, the execute bit
is not set and hence the files are nmot executable using a double-click
from the file-manager. How could that be solved?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARS665E3XFXH4XCL5EQCQEDTCHOQ5ANCNFSM4VTQM5XA>
.
|
hello @WouterJD, in Windows you can set the execution flag by this git command. |
Extra section looks good. I think it would be useful to highlight that ANT
also works (although not the preferred option) in case someone is
specifically looking for that option. For example:
- Zwift, Trainer Road, Rouvy, Sufferfest, Golden Cheetah, Road Grand
Tour, TTS and many others can now pair with the Bluetooth trainer*
identified as* “FortiusANT Trainer” on a device that supports BLE.
Perhaps a Smartphone is the most generally available device to use and from
there the screen can be streamed to a TV* or monitor*. Of course, you
can also use a PC with a Bluetooth dongle. *It is also possible to use
ANT as an alternative to BLE though this is not generally preferred by
FortiusANT users as the ANT dongles are often more expensive and harder to
buy, and most CTPs seem to be committed to supporting BLE.*
Just a suggestion...
…On Sat, Mar 6, 2021 at 8:01 AM Wouter Dubbeldam ***@***.***> wrote:
I intend to extend the manual with the following section:
3.12.7 Now pair with a CTP
Zwift, Trainer Road, Rouvy, Sufferfest, Golden Cheetah, Road Grand Tour,
TTS and many others can now pair with the Bluetooth trainer “FortiusANT
Trainer” on a device that supports BLE. Perhaps a Smartphone is the most
generally available device to use and from there the screen can be streamed
to a TV. Of course, you can also use a PC with a Bluetooth dongle.
I would think that this the recommended configuration because BLE is
native on Raspberry Pi, a Bluetooth dongle is usually cheaper than an
ANT-dongle and because ANT-dongles are hard to get (see issue #61
<#61>). Also, it seems that
the market of CTP’s is moving from ANT to BLE; usually Bluetooth is
preferred and/or supported before ANT.
------------------------------
Comment appreciated
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARS665HV2BM3MMFMOUPFHJLTCHONXANCNFSM4VTQM5XA>
.
|
Would it be possible to make kind of list which Tablet or smartphone is working. For example: |
A hardware compatibility list would be very limitted since usually when things work, it's not reported. |
Discussion moved to #274, I suggest we close this one. |
The intend is to create installation instructions for RaspberryPi OS. Since I have a RaspberryPi 3B this will be mostly base on this device. Let's exchange here to make this an instruction for all Raspberries around.
I am running a Fortius Trainer (T1930) with a T1932 head unit and the T1941 motor combined with the VR Steering Frame.
My original instruction can be found here: https://gist.github.com/wtal710174/23081b986ab05c9a17facfec2d738202. However I would like to continue the work in this issue.
Using the instructions I have the Raspberry control the Fortius Trainer with only the USB cable connected to it. I run Zwift on my iPad or Laptop connected using Bluetooth. I run the FortiusANT without the GUI in a terminal.
FortiusANT BLE on Raspberry PI 3B Installation
This is a short description of the necessary steps for the installation of the FortiusANT project by WouterJD. The project is located here (https://github.com/WouterJD/FortiusANT).
The first part of this document is taken from the USB ANT Installation Instruction written by martin-vi which is located here (https://gist.github.com/martin-vi/5206b6b26faf6f2d6121f6c8f300e44d).
Prerequisits
via git:
or via download
Now you should have a FortiusAnt folder in your home. Check with ls -all if the folder belongs to you.
There is an updated version of this instruction here, which introduces some improvements. You can continue with the updated version from this point. Just click on the link.
Install wxPython
Download pre-build wxPython package to home folder. This wheel package works for an ARM7l CPU.
Install package with
If you can not use the prebuild package, you need follow the install instructions below to build your own wxPython by replacing the version with 4.1.1 (This can take up to 18 hours depending on the RaspberryPi you are using):
https://www.marcdobler.com/2020/05/17/how-to-compile-and-install-wxpython-on-raspberry-pi/
Install required packages
Setup virtual environment for Python
Afterwards, the installation of packages for FortiusANT always requires the virtualv to be activated first. This also applies to starting FortiusANT.
The virtual environment needs to be activated for the following with this command:
Node JS installation
Follow the installation instruction on https://www.makersupplies.sg/blogs/tutorials/how-to-install-node-js-and-npm-on-the-raspberry-pi
For the Raspberry Pi 3B the following steps apply for version 14.15.3:
After installing node to the system, you have to set it up for FortiusANT
The npm install command will display several warnings which can be ignored.
Last step is to grant the node binary cap_net_raw privileges, so it can start/stop BLE advertising without root access.
Install FortiusANT dependencies
Create startup script for FortiusANT
Check the updated script for starting without sudo in the comment 'Bluetooth without Sudo and updated script' below
Save file with control+O and exit file with control+x and make script executable with the following command
Give user access to USB port
Run the following commands to create an access file in /etc/udev/rules and reboot Raspberry to activate rule
Let's fire it up
Connect your trainer to one of the USB ports of the Raspberry Pi and execute FortiusANT with
Next, the calibration procedure will start with a pedal kick. After the procedure is complete, the bluetooth starts broadcasting identifying the Raspberry Pi as periphal device with the identifier 'FortiusANT Trainer'. This one you can connect to your CTP.
After the calibration you might see a couple of error messages. This happens while the http server is being established and the program is not able to access it. After 5-10 secondes the connection should be stable and you will see the normal output in the terminal like the one below.
The text was updated successfully, but these errors were encountered: