Open main menu

Changes

My Test

97 bytes added, 20 March
{{GD Template Impl}}
__NOTOC__==Overview==This is script installation tutorial for [[NASPiX735]]v2.5 & v3.0, it will replace [[NASPi Gemini 2.5X735 Software | X735 Software installation tutorial]], although [[NASPi CM4-M2X735 Software | X735 Software installation tutorial]] is still available, but we strongly recommend that you use this script tutorial, which simplifies the installation process and [[NASPi CM4reduces dependencies on third-2party python libraries.5]]
This script also works on [https://www.raspberrypi.com/software/operating-systems/ bookworm] OS, and test it on Jan. 9th 2024.
The original key pwm fan control core shell script is of [[X735-script]] comes from from [https://github.com/pimlie/geekworm-x-c1 pimlie/geekworm-x-c1], pimlie implements the pwm fan shell script, which does not depend on third-party python libraries at all. Thanks to pimlie.
Now we think you have successfully flashed the OS Image into Micro SD and and power on the device, and you have also completed the operations such as creating new user required in some Raspberry Pi OS. You need to perform the following operations in <code>Terminal</code>.
After your system boots, then you need to open <code>Terminal</code> prpgram, then type the following command to complete the installation of the script
'''[NOTE]'''
If you are a new userusing an '''ubuntu''' system, please ignore this '''NOTEDO NOT''' If you are using the latest Raspberry Pi OS bookworm use version or have updated the OS kernel to the latest version 6'''ubuntu 23.604''', then otherwise you will get an error similar to the following error after running the <code>xoff</code> commandwhen you run '''x735off''':
<pre>
/usr/local/bin/x-c1x735-softsd.sh: line 5: echo/sys/class/gpio/export: writing error: Invalid argumentNo such file or directory/usr/local/bin/x-c1x735-softsd.sh: line 6: /sys/class/gpio/gpio27gpio20/direction: No such file or directory/usr/local/bin/x-c1x735-softsd.sh: line 7: /sys/class/gpio/gpio27gpio20/value: No such file or directory
Your device will shutting down in 4 seconds...
/usr/local/bin/x-c1x735-softsd.sh: line 19: /sys/class/gpio/gpio27gpio20/value: No such file or directory
</pre>
The cause of this error is due to a kernel update, please perform the following update to solve the issue;
1. First go back to '''Resolved'''! Please delete the directory where you installed xscript old installation folder and you will see re-install it by the following guide.  ''xscript'PS' folder'': This issure is be fiexed, please refer to https://github.com/geekworm-com/x735-script/issues/2
2. Then run the following command:
<pre>
cd xscript
rm x-c1-softsd.sh x-c1-pwr.sh -f
git pull origin
chmod +x *.sh
sudo cp -f . /x-c1-softsd.sh /usr/local/bin/
sudo cp -f . /x-c1-pwr.sh /usr/local/bin/
sudo reboot
</pre>
==OS that has been tested==
* Raspbian
* Twister
'''Note:''' Not tested with '''Home Assistant''', for some reason, we are not able to upgrade and use the Home Assistant to test, please pay attention to check if there is any update in the future.(If you have successfully tested Home Assistant, welcome to share your experience via email at: support@geekworm.com)==Install=====Preconfigured <code>config.txt</code>===To install pwm fan, first add <code>dtoverlay=pwm-2chan,pin2=13,func2=4</code> to <code>/boot/firmware/config.txt</code> under [all] or the end of file and <code>reboot</code>:
sudo nano /boot/firmware/config.txt
Save & exit.
sudo reboot
===Clone the script===<pre>Clone pruduct software script git clone https://github.com/geekworm-com/xscriptx735-script cd xscriptx735-script chmod +x *.sh</pre>
'''PS''': For some OS such as ''Raspberry Pi OS Lite'', the '''''git''''' tool is not installed by default, if you get an error like ''error: -bash: git: command not found'', please run the following command to install the git tool.
sudo apt install -y git
<!--
2. Download xGPIO tool
wget https://github.com/geekworm-com/xgpio/raw/main/bin/ubuntu/xgpio_pwr
wget https://github.com/geekworm-com/xgpio/raw/main/bin/ubuntu/xgpio_soft
After the download is successful, there will be two files xGPIO_pwr and xGPIO_soft in the current directory.
-->
===Create the x-c1x735-fan service===<span class="tb_red_bold"> Note: If your device does not support x735-fan service is for pwm fans or you are not using fan, the pwm, you can skip this step</span>fan will automatically adjust the runing speed according to the temperature of the cpu after the service is started.<pre>sudo cp -f ./x-c1-Run the following command to install fan.sh /usr/local/bin/service script;sudo cp -f ./xinstall-c1fan-fanservice.service /lib/systemd/systemsudo systemctl daemon-reloadsudo systemctl enable x-c1-fansudo systemctl start x-c1-fan</pre>sh
Then the pwm fan starts running.
===Create the x-c1x735-pwr service===If you are using <prespan class="tb_red">ubuntu verson 23.04</span> or more high version, please run the following command:sudo cp -f ./xinstall-c1pwr-pwrservice-ubuntu.sh /usr/local/bin/sudo cp -f x-c1-pwrOR run the following command to install power management script; .service /lib/systemd/systemsudo systemctl daemon-reloadsudo systemctl enable x-c1install-pwrsudo systemctl start x-c1-pwr</pre>service.sh
==Prepair software shutdown script==
If you are using <span class="tb_red">ubuntu verson 23.04</span> or more high version, please run the following command: sudo cp -f ./xinstall-c1sss-softsdubuntu.sh /usr/local/bin/Create a alias <code>xoff</code> OR, Run the following command to execute the install software shutdownscript (sss),<pre>echo "alias xoff='sudo /usr ./local/bin/xinstall-c1-softsdsss.sh'" >> ~/.bashrcsource ~/.bashrcAfter the installation is complete, an <code>x735xoff</precode>command will be created to shut down the software.Then you can run <code>xoffx735xoff</code> to execute software shutdown. ==Uninstall==Run the following command to uninstall all. ./uninstall.sh
===Test safe shutdown===
'''Software safe shutdown command''':
xoffx735off<span class="tb_red">DON'T run the 'shutdown' linux command to shut down, otherwise the power of x735 shield will not be shut down.</span>
'''Hardware safe shutdown operation''':
* press <code>7-8</code> seconds to force shutdown.
==Sample=Read fan speed===#The code for fan speed control is now in the <code>x-c1-fanread_fan_speed.shpy</code> is a sample python file.#<code>on how to read the speed of the pwm fan-rpi.py</code> and <code>Run the following command to get the speed of the fan: cd ~x735-pigpioscript sudo python3 read_fan_speed.py</code> are no longer used, and are reserved here for research and use by python lovers only.
==Uninstall==Uninstall <code>xThis `read_fan_speed.py` python file depends on the third-c1party python library `Rpi.GPIO`. In the official Raspberry Pi OS and most third-fanparty OS, this library is installed by default. If you run this file and get some errors, try to run the following command to install the Rpi.GPIOy library.service</code>: sudo systemctl stop x-c1-fan sudo systemctl disable xapt-c1get install -fanUninstall <code>xy python3-c1smbus python3-pwrrpi.service</code>: sudo systemctl stop x-c1-pwr sudo systemctl disable x-c1-pwrgpio
Remove the <code>xoff</code> allias on Or you can refer to [[How to Install RPi.bashrc file sudo sed -i '/xoff/d' ~/.bashrc source ~/.bashrcGPIO Python Library]]
===Other===
<code>pwm_fan_control.py</code> is no longer used, and are reserved here for research and use by python lovers only.
==Support==
Email: support@geekworm.com If you have any problems during usesome questions or suggestions, please contact us by email and tell us the product model you are using and the OS version you are usingto <span class="tb_red">support@geekworm.com</span>
==FAQ==
</html>
Return to [[X735]]
<!--Add review function! -->