Recalbox 9 and argonone setup script

Hi all, I tried to install the argonone script with:

curl https://download.argon40.com/argonone-setup-recalbox.sh | bash

but I get some errors:

Starting script /recalbox/scripts/argonone/argononed.py ...
/etc/init.d/S99argononed [STARTED]
***************************
Argon One Setup Completed.
***************************

Use argonone-config to configure fan
Use argonone-uninstall to uninstall

# Traceback (most recent call last):
  File "/recalbox/scripts/argonone/argononed.py", line 8, in <module>
    bus=smbus.SMBus(1)
        ^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/recalbox/scripts/argonone/argononed.py", line 11, in <module>
    bus=smbus.SMBus(0)
        ^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/recalbox/scripts/argonone/argononed.py", line 13, in <module>
    sys.exit(1)
    ^^^
NameError: name 'sys' is not defined

Is there a way to fix this script to get it working on Recalbox 9.x?

Thanks.

Here seems to be the discussion and a link to a modified script for RPi4. But I wouldn’t expect that it will work with RPi5.

For RPi5 it would need:

  • a recent python3 library for I2C (smbus)
  • a library or binary to control GPIO pins with RPi5 support
  • migration of the script to use these 2 libraries

Currently I couldn‘t locate a documentation about the libraries provided by Recalbox. So this is the main part to clarify.

EDIT:
Regarding the fan there is also that available:

Unfortunately, I don’t know Python and I am not able to do it myself.
I hope that someone from Argon40 updates the script to support Recalbox 9.x.

The script you downloaded from Argon40 must intended for at least 2 generations before Recalbox 9, maybe 6 or 7 - I don’t know the release cycle.

The main problem is not Python itself at the moment, here I or other users could help you too. The main problem is whose customization (to include only the needed things and get it small) of Recalbox 8/9.
If there is no support for Python3 libraries included in the Recalbox image, you cannot use a Python script. A newer one doesn’t change anything.

The only alternative would be a bash script, if tools like pinctrl or gpioget/gpioset, i2cset, i2cget are available. It seems you have a working installation on your SD card, so you could check via SSH if the commands available or not.

The maintainers of Recalbox seem to have decided 2 years ago that they will use their own implementation of fan control (recalbox-wpaf). That’s why maintenance (add support for RPi5/Argon ONE V3) is their responsibility now.

If you are only interested in fan control, you could also disconnect the fan cabel from the case pcb and attach it to the RPi5 pcb directly. Modern linux kernels support that and you can use the kernel integrated fan control.