Open main menu

Changes

My Test

1,353 bytes added, 20 March
no edit summary
{{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>.  '''[NOTE]''' If you are using an '''ubuntu''' system, '''DO NOT''' use version '''ubuntu 23.04''', otherwise you will get an error similar to the following when you run '''x735off''':<pre>/usr/local/bin/x735-softsd.sh: line 5: /sys/class/gpio/export: No such file or directory/usr/local/bin/x735-softsd.sh: line 6: /sys/class/gpio/gpio20/direction: No such file or directory/usr/local/bin/x735-softsd.sh: line 7: /sys/class/gpio/gpio20/value: No such file or directoryYour device will shutting down in 4 seconds.../usr/local/bin/x735-softsd.sh: line 19: /sys/class/gpio/gpio20/value: No such file or directory</pre> There is no '''gpio''' directory in the '''/sys/class''' directory The reason for the error is because since Ubuntu 23.04 uses the latest 6.2 Linux kernel, we wait for the official update; We recommend that you use '''ubuntu 22.04''', and we have also tested the current script on version 22.04. '''PS''': This issure is be fiexed, please refer to https://github.com/geekworm-com/x735-script/issues/2
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
==OS that has been tested==
* 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
==Download =Clone the script===<pre> 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
===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 stepfan will automatically adjust the runing speed according to the temperature of the cpu after the service is started.</spanpre>sudo cp -f ./x735-fan.sh /usr/local/bin/Run the following command to install sudo cp -f ./x735-fan .service script; /lib/systemd/systemsudo systemctl daemon-reload ./installsudo systemctl enable x735-fansudo systemctl start x735-service.shfan</pre>
Then the pwm fan starts running.
===Create the x-c1x735-pwr service===If you are using <span class="tb_red">ubuntu verson 23x735-pwr service will be responsible for power management and hardware safe shutdown.04</spanpre> or more high version, please run the following command: sudo cp -f ./installx735-pwr.sh /usr/local/bin/sudo cp -servicef x735-ubuntupwr.shservice /lib/systemd/systemOR run the following command to install power management script;sudo systemctl daemon-reload ./installsudo systemctl enable x735-pwrsudo systemctl start x735-service.shpwr</pre>
===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 ./installx735-sss-ubuntusoftsd.sh /usr/local/bin/OR, Run the following Create a alias <code>x735off</code> command to install execute the software shutdown script (sss), .<pre>echo "alias x735off='sudo /usr/local/bin/installx735-ssssoftsd.sh'" >> ~/.bashrcsource ~/.bashrcAfter the installation is complete, an <code>xoff</codepre> command will be created to shut down the software.Then you can run <code>xoffx735off</code> to execute software shutdown.
===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 fileon how to read the speed of the pwm fan.Run the following command to get the speed of the fan:#<code>fan cd ~x735-rpiscript sudo python3 read_fan_speed.py This `read_fan_speed.py</code> ` python file depends on the third-party python library `Rpi.GPIO`. In the official Raspberry Pi OS and <code>fanmost third-pigpioparty OS, this library is installed by default.py</code> are no longer usedIf you run this file and get some errors, and are reserved here for research and use by python lovers onlytry to run the following command to install the Rpi.GPIOy library. sudo apt-get install -y python3-smbus python3-rpi.gpio
==Uninstall==Run the following command Or you can refer to uninstall all. ./uninstall[[How to Install RPi.shGPIO 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! -->