Closed decodeais closed 3 years ago
I did not realize pull-up/pull-down difference during Raspberry Pi start-up untill FortiusANT is running, because then LEDs are initialized. The selection was 5 leds on a row next to GND. To be added in manual "dim light when booting" I don't know whether it's a problem.
I don't understand what you mean re GPIO5. Please explain.
Thanks for feedback!
When the program runs everything is OK. Such dimmed LEDs make me nervous. In such situations i am always thinking is there something wrong? How do you switch on again. On some RPi you can use GPIO5, on the RPi4 you can use GPIO3 to restart. I made bridge from the button input to this input. Now I can restart with te same button.
How do you switch on again.
Good point, please provide some more info. As complete novice on RPI I pull plug and reconnect, but you are going to give a better solution, I understand😉
Make a wire bridge from the button (GPIO12) to GPI03 and it works to switch on. This was the reason for connecting the button in my version to GPIO3. It saves one IO.
There's nothing to build here, but we need to understand how to wake up the Pi from a halt state before we build the shutdown functionality. Simply put, shorting pins 5 and 6 (GPIO3 and GND) together will wake the Pi up from a halt state.
You mean: FortiusANT should use GPIO3 instead of GPIO5?
For the RPi4 GPIO3 is a better solution, but I don't know all variants.
I think GPIO3 was used by I2C too. But pull down this pin should by also possible.
In my manual I additional configured the start of the shutdown
in the config.txt file. It is nice to be able to shutdown without additional software.
my manual I additional configured the start of the
shutdown
in the config.txt file
DId I miss your manual; please share link
Its only in the discription how to install jow to install without any display or keyboard. https://github.com/decodeais/FortiusANT/blob/Raspi-Status-LED/doc/HeadlessRaspi.md May be found it here, but I think you do not need the special bootloader update. https://stoffl.info/2020/03/31/how-to-raspberry-pi-4-gpio-ein-und-ausschalten-power-on-off-button/
Its only in the discription how to install jow to install without any display or keyboard. https://github.com/decodeais/FortiusANT/blob/Raspi-Status-LED/doc/HeadlessRaspi.md
My 2 cents:
Good work @BikeBeppe64 ! In next version, button is on GPIO3 for described reasons. Just modify https://github.com/WouterJD/FortiusANT/blob/Raspberry_Release6/pythoncode/raspberry.py#L129
- we can install Raspberry OS on a SD card * USB 3 ...
What is the reason that the SD_card on USB3 is faster than in the onboard SD-card slot?
@decodeais @wtal710174 @meanhat @martin-vi @BikeBeppe64 what do you think, should GPIO-pins be customizable? -l [on|off]/3/5/6/13/19/26 (defaults if not specified)
JSON:
[Raspberry] Leds = True | False LedTacx = 5 LedShutdown = 6 LedCadence = 13 LedBLE = 19 LedANT = 26 BtnShutdown= 3
Its only in the discription
@decodeais I saw that link and assumed that issue #192 would contain all info; no problem - has been adopted with pleasure
@decodeais @wtal710174 @MeanHat @martin-vi @BikeBeppe64 what do you think, should GPIO-pins be customizable? -l [on|off]/3/5/6/13/19/26 (defaults if not specified)
@WouterJD: Yes i think this is a great idea, it allows to quickly configure the pins used and does not really affect the code. Maybe another option for the button to specify, if the button is connected as pull up or pull down button.
@WouterJD - release 6 works well on RPi 0 in ANT+ mode (I wanted to obtain a log file for ANT in order to allow the miniTFT to work with ANT as well as BLE like you suggested). I have yet to get RPi0 and Bluetooth to work despite Node adaptations for Armv6l architecture. Like @wtal710174 I like the idea of making the GPIO pins customisable.
Good work @BikeBeppe64 ! In next version, button is on GPIO3 for described reasons. Just modify https://github.com/WouterJD/FortiusANT/blob/Raspberry_Release6/pythoncode/raspberry.py#L129
- we can install Raspberry OS on a SD card * USB 3 ...
What is the reason that the SD_card on USB3 is faster than in the onboard SD-card slot?
https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md
bandwidth and I can use more than one OS on IT.
@BikeBeppe64 I have added it to the manual in section "Installation decisions"; the manual will remain a straight-forward FortiusAnt-dedicated installation which is good for the novice and a reference for others.
release 6 works well on RPi 0 in ANT+ mode
@MeanHat I'm really looking forward to the docu; I will integrate with pleasure. Rpi0 would be THE device for the FortiusAnt bridge. Could be a EUR 25,= solution (excluding the ANTdongle, but BLE available)
@WouterJD - As requested, here are some suggested additions/changes for RPi0 which I hope are useful. This explains some of the differences and how to get it running with ANT (it will need a further script and one modified script based on @martin-vi's instructions to do this. I have highlighted the changes that would be needed. FortiusAnt User Manual v6 - suggested RPi0 modifications.docx I think the next step for me is to continue to figure out the install of BLE on RPi0 with armv6l architecture or ask for help. Hope this helps and is what you were looking for...
@MeanHat thanks for the feedback. Unfortunately, github does not provide a neat WYSIWYG and version-managed wiki and therefore it's word/pdf.
I think the next step for me is to continue to figure out the install of BLE on RPi0 with armv6l
Is the message that FortiusAnt fully works on Rpi0, with exception of -g?
Manual and scripts promoted to Raspberry_Release6; I will do a test myself as well.
@MeanHat thanks for the feedback. Unfortunately, github does not provide a neat WYSIWYG and version-managed wiki and therefore it's word/pdf.
- SSH remark added
- password remark already there
- Rpi0 mentioned; manual focusses on Rpi3/Rpi4
- 2_InstallPackagesANT.sh --> please provide
- 2_InstallPackagesBLE.sh renamed
- 4_InstallWxPython.sh renamed and modified
- 9_GrantAccessToUSB_withReboot --> please provide additional rules. I do not particularly like the cat>> construction and would prefer to have a 10-usbaccess.rules file in the directory. What do you think? Also [SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664", GROUP="usbtacx"] might be generic enough. I would keep it simple; if somebody wants to finetune USB-access, I would leave that for "personal refinement". See also 3.12.2 Installation decisions.
- Command line reference added
- Button / TFT; planned for release 6.1. I guess that there are many possibilities which we cannot support all in FortiusAnt. As soon as my TFT arrives we can do the integration and then document it as well.
Great work @WouterJD -
I've just realised that parameter -D-1 means no ANT dongle so:
Also:
I think the next step for me is to continue to figure out the install of BLE on RPi0 with armv6l
Is the message that FortiusAnt fully works on Rpi0, with exception of -g? In summary for RPi0:
- GUI. Yes, that's correct. Someone smarter and more patient than me might be able to get the GUI working (when I have tried to install wxPython is takes almost a day (as pointed out by others) and ultimately failed). I will try again though.
- ANT. Works fine (one install running FortiusANT headless for several months)
- BLE. Not working yet as result of armv7l to armv6l conversions but still testing. I will let you know. I think this is more of a priority than the GUI as I suspect the main attraction of the RPi0 is the low cost and a display/monitor would add to the cost
-D-1 is already in manual, I think. succes modified in code and (next) manual
@WouterJD - here is an early draft for adding ANT dongle to install 9. DRAFT_forANTdongle-9_GrantAccessToUSB_withReboot.sh.docx along with comments
@MeanHat this evening I will do a test with ANT; enough dongles available :-)
When enhancing a Tacx Fortius with Raspberry Pi0 or Pi4, I would think the price-difference is not very important compared to the whole (Tacx + RPI + work), differently from building a commercial product. If you would build a "Tacx Fortius 2021 Zwift Ready", why would you chose for a Raspberry Rp0?
@MeanHat this evening I will do a test with ANT; enough dongles available :-)
When enhancing a Tacx Fortius with Raspberry Pi0 or Pi4, I would think the price-difference is not very important compared to the whole (Tacx + RPI + work), differently from building a commercial product. If you would build a "Tacx Fortius 2021 Zwift Ready", why would you chose for a Raspberry Rp0?
Good luck with the testing this evening @WouterJD. And you're right that the cost difference is not so huge in relation to the total.
@WouterJD - good news. The RPi0 is now working in Bluetooth mode! Here's a photo of the output from simulation mode:
I'll test it with a trainer and let you know. Would you like me to send you the list of instructions I used or would you prefer me to try to build them into your set up scripts?
Probably main reasons for choosing RPi0 are lower cost, smaller form factor and lower power consumption but not necessarily major issues
On Wed, Mar 10, 2021 at 4:05 PM Wouter Dubbeldam @.***> wrote:
@MeanHat https://github.com/MeanHat this evening I will do a test with ANT; enough dongles available :-)
When enhancing a Tacx Fortius with Raspberry Pi0 or Pi4, I would think the price-difference is not very important compared to the whole (Tacx + RPI + work), differently from building a commercial product. If you would build a "Tacx Fortius 2021 Zwift Ready", why would you chose for a Raspberry Rp0?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WouterJD/FortiusANT/issues/274#issuecomment-795658960, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARS665GREYVCWBDX6XVPXLDTC6KCZANCNFSM4YYDIMGA .
@MeanHat I have reviewed the install scripts and made some minor modifications; [PiShare] is now also automated and scripts can be re-run.
Here is an early draft for adding ANT dongle to install 9
@MeanHat please refer to 9_GrantAccessToUSB_withReboot.sh
and Show USB devices.sh
in our branch.
PS. Are we sure that ant-usb2.conf
does not exist? We now simple overwrite.
I did not check it and cannot do without complete reinstall.
PS2. If these files are "ours" why not name them like that FortiusAnt-usb2.conf and FortiusAnt-usbaccess.rules?
@WouterJD - thanks for links to additional scripts.
I'm about to test RPi0 setup again using your latest scripts. Suggestions/questions I had at this stage are:
@WouterJD - I have tested the scripts on RPi0. The script numbers refer to the numbered list below. General comments are (a) I miss the relative speed of an RPi3 or 4! (b) now seeing "Executive in Terminal" option when double clicking script from file manager (can't explain this but positive news) and (c) love your scripts: makes install significantly easier. Scripts:
Scripts 3 and 5 updated for Rpi0
I did a complete reinstall and ANT works immediatly! Great collaboration!
Bad experience: I (mistakenly) put a BLEdongle in the raspberry. Some special things occurred (flickering screen etc). The BLE-dongle was reported by the lsusb command.
BUT: After removal, BLE was dead and I decided to reinstall the system; which provided another end:end test, which takes 15 minutes from first boot.
Great work! 15 minutes to completely reinstall is super fast and a further confidence boost. All looking great! Is there anything else you would like a hand with?
Scripts 3 and 5 updated for Rpi0
The 2 new scripts look like a great solution. I'll happily test them tomorrow on RPi0 :)
I have updated all scripts They are all rerunnable and fit for Rpi0; of course warning that wxPython is not available
I have run the scripts and from a clean disk it ends with FortiusAnt running :-)
This is good for USB-connected Tacx trainers and BLE-communication. When ANT-communication is desired, some modifications are required. Will check manual for that.
Of course. I'll take a look and get back to you with any comments. Great work.
@WouterJD - in FortiusAntMain.sh all old the logfiles are deleted. I wondered if you might also want to empty the WasteBasket to prevent the build-up of a large number of files over time. In the python program for the minTFT display I set a number of files I wanted to retain (in case I needed to to any retrospective troubleshooting) and then deleted all the older ones in '/home/pi/.local/share/Trash/info/.' and '/home/pi/.local/share/Trash/files/.'
In FortiusAntMain.sh all old the logfiles are deleted
Instead of
rm *.log *.json *.tcx 2>/dev/null
use
find ./ -name '*.log' -type f -mtime +30 -delete
find ./ -name '*.json' -type f -mtime +30 -delete
find ./ -name '*.tcx' -type f -mtime =30 -delete
?
Something similar for the trashcan?
PS. trascan directories are created on first delete :-)
In FortiusAntMain.sh all old the logfiles are deleted
Instead of
rm *.log *.json *.tcx 2>/dev/null
usefind ./ -name '*.log' -type f -mtime +30 -delete
find ./ -name '*.json' -type f -mtime +30 -delete
find ./ -name '*.tcx' -type f -mtime =30 -delete
?Something similar for the trashcan?
PS. trascan directories are created on first delete :-)
I think that would work really well and 30 days sounds appropriate to retain the log etc. files. Regarding the Wastebasket, if the most recent log etc. files are kept in the original folder then the whole wastebasket can be emptied? I understand it is necessary to clear out both '/home/pi/.local/share/Trash/info/.' and '/home/pi/.local/share/Trash/files/.' folders. Hope that works OK.
@WouterJD - your Manual is a really impressive and fabulous achievement. And your English is really excellent. I have gone through the entire manual and made some suggestions for your consideration. In some cases I have checked for errors and in others I have suggested text which may make it easier to understand some of the complexities. I have tried to follow Plain English guidelines (https://plainenglish.co.uk/) as these have been found to be a good basis for English language manuals used internationally. I hope the suggestions are useful but please feel free to disregard any or all of them.
Wauw Keith, what a great job you did; thanks for compliments. I revised the manual and adopted 99% of the remarks. Attached is 6.0.d. Section 5.1 is rewritten, remark on GUIlogfile added. FortiusANT User Manual 6.0.d.zip
@WouterJD - your manual looks fabulous. It's a massive piece of work and really comprehensive and (I think) very easy to read and use. Hopefully it will inspire even more people to use your FortiusAnt system with the confidence to install it. The range of installation options is huge ranging from top end laptop and graphics to the affordable RPi. You've kept so many old Tacx trainers out of landfill and hopefully many more to come (let alone kept so many more people fit during Covid)!
OK. So manual ready; last updates for FortiusAntMain.sh and then Raspberry_Release6 will be published
...
echo Trashcan emptied (keep 1 month)
find /home/pi/.local/share/Trash/ -name '*.log*' -type f -mtime +30 -delete
find /home/pi/.local/share/Trash/ -name '*.json*' -type f -mtime +30 -delete
find /home/pi/.local/share/Trash/ -name '*.tcx*' -type f -mtime +30 -delete
echo Log-files from previous session are deleted (keep two days)
find ./ -name '*.log' -type f -mtime +2 -delete
find ./ -name '*.json' -type f -mtime +2 -delete
find ./ -name '*.tcx' -type f -mtime +2 -delete
...
??
Pull Request now created, ready for merge.
Tonite I bought another Tacx Fortius and got it together with the Tacx Catalogue from 2012. This catalogue provided a great insight in the 2012 product offering, the types of brakes and their power curves - I have added it to the manual. Pieces fell together, check the new sections!
Sounds great. The additional catalogue information in the manual is very helpful. I've shared some additional catalogue information in case it is of use regarding models and features. Probably not a huge help but I thought you might want it if you have not already seen it. IMG_20210314_0001.pdf
I started the test. First problem I saw was that the LED's for Tacx and Shutdown show a dim light. I changed them to GPIO16 and DPIO20. On this ports every thing is OK. The reason are the default internal pullups. Another solution would be to make them activ low and connect them to a power pin, Second Problem switching on does not work on RPi4 by GPIO5. I made a bridge to GPIO3, then it works, but there may be trouble when I2C should be used.