Difference between revisions of "X-C1 Software"
(→FAQ) |
(→FAQ) |
||
Line 307: | Line 307: | ||
[[File:Volumio-rc-local.jpg|800px]] | [[File:Volumio-rc-local.jpg|800px]] | ||
− | + | <pre> | |
Q2:How to get the current fan speed value? As I remember old x735 software where with such read_fan_speed.py script example, but not found such in X-C1. | Q2:How to get the current fan speed value? As I remember old x735 software where with such read_fan_speed.py script example, but not found such in X-C1. | ||
<pre> | <pre> |
Revision as of 18:24, 22 November 2022
[Update]
Support Umbrel now.
The script is not tested VMware ESXI ARM operating system. To make the 3pin PWM cooling fan running, please remove/pull out the yellow cable if you use X-C1 V1.0 version.
NOTE:
In general, two important libraries are needed to run this script:
1. pigpiod, refer to http://abyz.me.uk/rpi/pigpio/download.html
2. Python, try to run 'python --version' to check it.
Contents
For Raspbian / RetroPie / Twister OS v2.0.2
Test this script based on the following OS:
- Tested '2022-04-04-raspios-buster-armhf.img" on Apr. 13, 2022;
- Raspbian 2021-05-07-raspios-buster-armhf, 2021-10-30-raspios-bullseye-armhf.img, 2021-10-30-raspios-bullseye-armhf-lite.img
- RetroPie 4.7.1
- Twister OS v2.0.2.
install
cd ~ sudo apt-get update sudo apt-get upgrade -y sudo apt-get install -y git pigpio sudo apt-get install -y python3-pigpio python3-smbus git clone https://github.com/geekworm-com/x-c1.git cd x-c1 sudo chmod +x *.sh sudo bash install.sh echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc sudo reboot
If reboot fails, please force shutdown or power off and restart
PWM fan control
The script is installed successfully and the fan starts to run
Test safe shutdown
xoff
- Please run 'xoff' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of X-C1 will not be shut down.
- press button switch `1-2` seconds to reboot
- press button switch `3` seconds to safe shutdown,
- press `7-8` seconds to force shutdown.
uninstall
sudo ./uninstall.sh
For ubuntu mate / ubuntun desktop / ubuntu server
Test this script based on the following OS:
- ubuntu-mate-20.04.1-desktop
- ubuntu server 21.04
- ubuntu-21.04-preinstalled-desktop-arm64+raspi
install
cd ~ sudo apt-get update sudo apt-get upgrade sudo apt-get install -y unzip make gcc python git wiringpi python3-pigpio python-setuptools sudo apt-get install -y python3-distutils #install pigpio library, also refer to http://abyz.me.uk/rpi/pigpio/download.html wget https://github.com/joan2937/pigpio/archive/master.zip unzip master.zip cd pigpio-master sudo make sudo make install cd ~ git clone https://github.com/geekworm-com/x-c1 cd x-c1 sudo chmod +x *.sh sudo bash install-ubuntu.sh echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc sudo reboot
Test safe shutdown
xoff
- Please run 'xoff' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of X-C1 will not be shut down.
- press button switch 1-2 seconds to reboot
- press button switch 3 seconds to safe shutdown,
- press 7-8 seconds to force shutdown.
uninstall
sudo ./uninstall-ubuntu.sh
For myNode OS and Umbrel
About myNode, please refer to http://www.mynodebtc.com/
About Umbrel, please refer to https://getumbrel.com/
Install
Login to mynode teminal via Putty or Xsheel tool, the default user name is `admin`, default password is `bolt`, then run the following command:
Login to mynode teminal via Putty or Xsheel tool, the default user name is `umbrel`, default password is `moneyprintergobrrr`, then run the following command:
FAQ
Q: What are the credentials to SSH into my Umbrel?
A: ssh umbrel@umbrel.local (or ssh umbrel@<IP address of your Umbrel>). The password is the same as your Umbrel's password. If you haven't set a password yet, the default password is: moneyprintergobrrr.
sudo apt-get update sudo apt-get install pigpio python-pigpio python-smbus wiringpi -y git clone https://github.com/geekworm-com/x-c1 cd x-c1 chmod +x *.sh sudo bash install-mynode.sh echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc sudo reboot
PWM fan control
The script is installed successfully and the fan starts to run
Test safe shutdown
xoff
- Please run 'xoff' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of X-C1 will not be shut down.
- press button switch 1-2 seconds to reboot
- press button switch 3 seconds to safe shutdown,
- press 7-8 seconds to force shutdown.
uninstall
./uninstall-mynode.sh
For DietPi
About DietPi, please refer to URL
Test 'DietPi_RPi-ARMv6-Bullseye.image' on May 5th, 2022.
Install
Test it base DietPi_RPi-ARMv8-Buster.img
login via teminal window, the default user name is `root`, password is `dietpi`, then run the following command:
sudo apt-get update sudo apt-get install git pigpiod python3-pigpio python3-smbus python3-rpi.gpio -y git clone https://github.com/geekworm-com/x-c1 cd x-c1 chmod +x *.sh sudo bash install-dietPi.sh echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc sudo reboot
PWM fan control
The script is installed successfully and the fan starts to run
Test safe shutdown
xoff
- Please run 'xoff' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of X-C1 will not be shut down.
- press button switch `1-2` seconds to reboot
- press button switch `3` seconds to safe shutdown,
- press `7-8` seconds to force shutdown.
uninstall
sudo ./uninstall-dietPi.sh
For Manjaro
About Manjaro, please refer to https://manjaro.org/
Test this script based on Manjaro-ARM-kde-plasma-rpi4-21.07.img
install
cd ~ sudo pacman -Syyu sudo pacman -S unzip make gcc python python-setuptools git #install pigpio library, also refer to http://abyz.me.uk/rpi/pigpio/download.html wget https://github.com/joan2937/pigpio/archive/master.zip unzip master.zip cd pigpio-master sudo make sudo make install sudo cp /usr/local/lib/libpigpio* /usr/lib/ #install wiringpi git clone https://github.com/WiringPi/WiringPi.git cd WiringPi ./build cd ~ git clone https://github.com/geekworm-com/x-c1 cd x-c1 sudo chmod +x *.sh sudo bash install-manjaro.sh #create a alias xoff echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc sudo reboot
PWM fan control
The script is installed successfully and the fan starts to run
Test safe shutdown
xoff
- Please run 'xoff' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of X-C1 will not be shut down.
- press button switch `1-2` seconds to reboot
- press button switch `3` seconds to safe shutdown,
- press `7-8` seconds to force shutdown.
uninstall
sudo ./uninstall-ubuntu.sh
For LibreELEC
With LibreELEC it is not possible to change the system for security and stability reasons so even 'apt-get' would not be able to do this, so we cannot install some third-party libraries like pigpiod, Therefore, safe shutdown and dynamic adjustment of fan speed cannot be supported on liberelec.
Please pull out the yellow wire of the fan to make the fan run immediately
return to NASPi
For Volumio
Test this script based on the following OS:
- Volumio-3.175-2021-12-13-pi.img
install
cd ~ sudo apt-get update sudo apt-get upgrade sudo apt-get install -y git pigpio sudo apt-get install -y python-pigpio python3-pigpio sudo apt-get install -y python-smbus python3-smbus git clone https://github.com/geekworm-com/x-c1.git cd x-c1 sudo chmod +x *.sh sudo bash volumio.sh echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc sudo reboot
PWM fan control
The script is installed successfully and the fan starts to run
Test safe shutdown
xoff
- Please run 'xoff' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of X-C1 will not be shut down.
- press button switch `1-2` seconds to reboot
- press button switch `3` seconds to safe shutdown,
- press `7-8` seconds to force shutdown.
uninstall
sudo ./uninstall.sh
Note
Enable SSH: http://volumio.local/dev/ Name: volumio Password: volumio
we use the default password to run the volumio.sh, please replace default password 'volumio' with your new password in volumio.sh file .(Line 72)
FAQ
Q1: Can't connect to pigpio at localhost(8888)
Can't connect to pigpio at localhost(8888) Did you start the pigpio daemon? E.g. sudo pigpiod Did you specify the correct Pi host/port in the environment variables PIGPIO_ADDR/PIGPIO_PORT? E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888 Did you specify the correct Pi host/port in the pigpio.pi() function? E.g. pigpio.pi('soft', 8888) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Traceback (most recent call last): File "/home/volumio/x-c1/fan.py", line 8, in <module> pwm.set_mode(servo, pigpio.OUTPUT) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1376, in set_mode return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode)) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1025, in _pigpio_command sl.s.send(struct.pack('IIII', cmd, p1, p2, 0)) AttributeError: 'NoneType' object has no attribute 'send'
A: If you find an error similar to the above, it is because pigpiod library is not started, we need to run pigpiod first,
sudo pigpiod python 'your directory'/x-c1/fan.py &
If 'sudo' command request a password, you can use the following command:
echo 'your password' | sudo -S pigpiod python 'your directory'/x-c1/fan.py &
You can put these two lines in the /etc/rc.local file so that it will run automatically after booting.
Q2:How to get the current fan speed value? As I remember old x735 software where with such read_fan_speed.py script example, but not found such in X-C1.A: The X-C1's PWM fan is a 3Pin FAN, and does not support reading speed. The Fan of X735 is a 4Pin PWM fan.
Enable comment auto-refresher
- 1
- 2
- >
Anonymous user #73one month agoScore 0Permalink |Lisa29 days agoScore 0PermalinkAnonymous user #722 months agoScore 0Permalink |Anonymous user #719 months agoScore 0Permalink |Anonymous user #709 months agoScore 0Permalink |Walker9 months agoScore 0PermalinkAnonymous user #6910 months agoScore 0Permalink |Anonymous user #6813 months agoScore 0Permalink |Harry13 months agoScore 0PermalinkHarry13 months agoScore 0PermalinkHarry13 months agoScore 0PermalinkAnonymous user #6614 months agoScore 0Permalink |Anonymous user #6714 months agoScore 0PermalinkAnonymous user #6614 months agoScore 0PermalinkAnonymous user #6414 months agoScore 0Permalink |Anonymous user #6514 months agoScore 0PermalinkAnonymous user #6314 months agoScore 0Permalink |Anonymous user #6514 months agoScore 0PermalinkAnonymous user #6215 months agoScore 0Permalink |Lisa15 months agoScore 0PermalinkAnonymous user #6115 months agoScore 0Permalink |Anonymous user #6514 months agoScore 0PermalinkAnonymous user #6514 months agoScore 0PermalinkAnonymous user #5915 months agoScore 0Permalink |Anonymous user #6015 months agoScore 0PermalinkAnonymous user #6115 months agoScore 0PermalinkAnonymous user #5815 months agoScore 0Permalink |Lisa15 months agoScore 0PermalinkAnonymous user #5815 months agoScore 0PermalinkLisa15 months agoScore 0PermalinkAnonymous user #5616 months agoScore 0Permalink |Lisa16 months agoScore 0PermalinkAnonymous user #5716 months agoScore 0PermalinkLisa16 months agoScore 0PermalinkAnonymous user #5517 months agoScore 0Permalink |Lisa17 months agoScore 0PermalinkAnonymous user #5417 months agoScore 0Permalink |Lisa17 months agoScore 0PermalinkAnonymous user #5317 months agoScore 0Permalink |Anonymous user #5217 months agoScore 0Permalink |Lisa17 months agoScore 0PermalinkAnonymous user #5119 months agoScore 0Permalink |Lisa19 months agoScore 0PermalinkAnonymous user #5019 months agoScore 0Permalink |Anonymous user #4919 months agoScore 0Permalink |Anonymous user #4821 months agoScore 0Permalink |Lisa21 months agoScore 0PermalinkAnonymous user #4721 months agoScore 0Permalink |Lisa21 months agoScore 0PermalinkAnonymous user #4621 months agoScore 0Permalink |Lisa21 months agoScore 0PermalinkAnonymous user #4421 months agoScore 0Permalink |Lisa21 months agoScore 0PermalinkAnonymous user #4521 months agoScore 0PermalinkAnonymous user #4621 months agoScore 0PermalinkAnonymous user #4322 months agoScore 0Permalink |Anonymous user #4223 months agoScore 0Permalink |Lisa23 months agoScore 0PermalinkAnonymous user #4123 months agoScore 0Permalink |Lisa23 months agoScore 0PermalinkLisa24 months agoScore 0Permalink |Anonymous user #4024 months agoScore 0PermalinkAnonymous user #4024 months agoScore 0Permalink |Anonymous user #3924 months agoScore 0Permalink |Lisa24 months agoScore 0PermalinkAnonymous user #3825 months agoScore 0Permalink |Lisa25 months agoScore 0PermalinkAnonymous user #3725 months agoScore 0Permalink |Anonymous user #3626 months agoScore 0Permalink |Lisa26 months agoScore 0PermalinkAnonymous user #3527 months agoScore 0Permalink |Lisa26 months agoScore 0PermalinkAnonymous user #3427 months agoScore 0Permalink |Anonymous user #3328 months agoScore 0Permalink |Anonymous user #3228 months agoScore 0Permalink |Lisa27 months agoScore 0PermalinkAnonymous user #3128 months agoScore 0Permalink |Lisa28 months agoScore 0PermalinkAnonymous user #3029 months agoScore 0Permalink |Lisa28 months agoScore 0PermalinkAnonymous user #2829 months agoScore 0Permalink |Anonymous user #2929 months agoScore 0PermalinkAnonymous user #2729 months agoScore 0Permalink |Lisa29 months agoScore 0PermalinkAnonymous user #2529 months agoScore 0Permalink |Lisa29 months agoScore 0PermalinkAnonymous user #2629 months agoScore 0PermalinkLisa29 months agoScore 0PermalinkAnonymous user #1729 months agoScore 0PermalinkAnonymous user #2429 months agoScore 0Permalink |Anonymous user #2430 months agoScore 0Permalink |Lisa30 months agoScore 0PermalinkAnonymous user #2430 months agoScore 0PermalinkAnonymous user #2430 months agoScore 0PermalinkLisa30 months agoScore 0PermalinkAnonymous user #2429 months agoScore 0PermalinkAnonymous user #2330 months agoScore 0Permalink |Anonymous user #830 months agoScore 0Permalink |Anonymous user #2130 months agoScore 0Permalink |Lisa30 months agoScore 0PermalinkAnonymous user #2230 months agoScore 0Permalink |Anonymous user #2130 months agoScore 0Permalink |Anonymous user #2130 months agoScore 0PermalinkLisa30 months agoScore 0Permalink
- 1
- 2
- >