I just put my Umbrel into a DeskPi Pro v2 case, but I cannot get the fan to work. I ran the “install.sh” script as I’ve seen recommended. I’m running 0.5.3 on RPi4mB. Anyone using this case and have any luck getting it to work? (nice case btw)
hello kenwdelong,
I use the DeskPi Pro V2 with a Raspi 4 4GB.
The platform is a Linux 11.6 Bullsey 64Bit with an Umbrel test system.
From the beginning the problem was that with 32/64Bit system the fan of the DeskPi Pro only ran for 15min and then simply switched off.
The problem is that the manufacturer has flooded the allocated memory with his script and a crash of the software had to result.
I found a discussion in which a user uses the python script and since then the problem is solved for me.
By the way, the python script is also offered by the manufacturer but not used.
Besides, the manufacturer script is worse.
Don’t worry, it’s not that complicated. If you need help write here again.
Follow the entry of “bartlet7827”.
Here is the link:
https://bytemeta.vip/repo/DeskPi-Team/deskpi/issues/81?page=5
Thanks for your note!
I think my problem is something else, I can’t even get it to start. I don’t have a /dev/ttyUSB0 file, and after I run deskpi-config, I have a text file there!
-rw-r--r-- 1 root root 8 Apr 26 19:54 /dev/ttyUSB0
And I also see this
umbrel@umbrel:~ $ pwmFanControl64
Can not open /dev/ttyUSB0 serial port ErrorCode: No such file or directory
Please check the /boot/config.txt file and add dtoverlay=dwc2, dr_mode=host and reboot RPi
Please check serial port over OTG
---Serial Port Can not detected---
So something went wrong with setting up the serial port and I cannot figure out how to fix it.
Running the python script gave
umbrel@umbrel:~ $ ./fanScript.py
Traceback (most recent call last):
File "./fanScript.py", line 9, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
I’m not sure how to fix this either; pip install serial
?
2.1 Install “Modul Python Serial”
- sudo apt-get install python3
- sudo apt install python3-pip
- sudo pip3 install pyserial
verify
- python3 -m pip show pyserial
answer… Name: pyserial, Version: 3.5, Summery Python Serial Port Extension, e.g. - sudo reboot
Thanks for your reply.
umbrel@umbrel:~ $ ./fanScript.py
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./fanScript.py", line 27, in openSerPort
serPort = serial.Serial("/dev/ttyUSB0", 9600, timeout=30) #Open the serial port (ttyUSB0). Deskpi uses it to communicate with the Deskpi Pro fan.
File "/usr/local/lib/python3.7/dist-packages/serial/serialutil.py", line 244, in __init__
self.open()
File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
Looks like the whole USB2 infrastructure is not working. I plugged in a mouse to the front (USB2) port, and no USB devices were created in /dev. So I think something went completely wrong and it’s just broken. I think I’m stuck.
Hello kenwdelong,
let’s solve problems one by one.
- your problem is in the third post which i read over …
“Please check /boot/config.txt file and add dtoverlay=dwc2, dr_mode=host to config.txt file and reboot RPi”.
-
Command
sudo nano /boot/config.txt -
paste at the bottom, save file and reboot
[all]
dtoverlay=dwc2,dr_mode=host
In this link from the manufacturer it is written that “dtoverlay=dwc2, dr_mode=host” must be added.
https://wiki.deskpi.com/deskpipro/
Search for …
Select 6 and then enter 45 and confirm, and then enter 50, which means you set the fan speed to 50% when the CPU temperature is above 45 degrees, there are 4 levels to set. NOTE: 50% speed level means you have already sent PWM50 to /dev/ttyUSB0 port, and this port will be available if you add dtoverlay=dwc2,dr_mode=host to /boot/config.txt file and reboot DeskPi.
- afterwards you should check if your user with which you establish the SSH connection also has access to the directory /dev/ttyUSB0.
-
check with the command
dmesg | grep tty -
the response could be as follows
[ 6.491696] usb 3-1.4: ch341-uart converter now attached to ttyUSB0
Maybe you have to change the permissions to the directory /dev/ttyUSB0.
feedback please
No luck. That line is in config.txt. Running the deskpi-config and selecting 25% results in a text file at /dev/ttyUSB0 that has the text pwm_025.
umbrel@umbrel:~ $ cat /dev/ttyUSB0
pwm_025
Running the dmesg command give:
umbrel@umbrel:~ $ dmesg | grep tty
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=E4:5F:01:8D:F4:C6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 usb-storage.quirks=152d:1561:u,152d:1576:u,152d:0578:u,125f:a76a:u,04e8:61b6:u console=ttyS0,115200 console=tty1 root=PARTUUID=2817b225-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.000819] printk: console [tty1] enabled
[ 1.498941] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 21, base_baud = 0) is a PL011 rev2
I also ran sudo ./uninstall-raspian-64bit.sh
and then after it rebooted ran sudo install-raspian-64bit.sh
again. Same result.
There are two possible errors
-
the file ttyUSB0 is not created automatically
(but should be when you plug in a USB device) -
access rights to the file ttyUSB0
(set rights to the file)
- check if Serial Console is active with
- raspi-config nonint get_serial_hw
answer should be
1
–>>if not - sudo nano /boot/config.txt
add at the end
add enable_uart=1
reboot and execute command again
- check if in the directory /dev the file ttyUSB0 is present
- sudo ls /dev
if not, I can’t help anymore.
Normally the file ttyUSB0 should be created automatically when a USB device is connected. But I have found many entries that have the same problem.
-
to show the permissions for "/dev/ttyUSB0
ls -l /dev/ttyUSB0
answer should be
crw-rw---- 1 root dialout 188, 0 Apr 28 xx:xx /dev/ttyUSB0
or
crw-rw---- 1 root root 188, 0 Apr 28 xx:xx /dev/ttyUSB0 -
check if you are in the group dialout
- groups username
if not, add yourself - sudo adduser username dialout
don’t forget the reboot
feedback please
- Yes, I got “1” as the answer
- No, no /dev/ttyUSB0
- User umbrel is in group dialout
Thanks for your help…I think I just got bad hardware or maybe I didn’t install the cables correctly or something. Those little ribbon connectors are hard to get right.
hello kenwdelong,
I don’t think you have a bad hardware.
[Edit]
I just flashed a small blank SD card with
Raspberry Pi OS Lite (64-bit)
Published: 2023-02-21
–> after the first start, the fan starts immediately.
–> check if the fan is stuck and can not rotate, it also happened to me when I installed it in the case.
It’s probably just a little bit of code that’s missing, but finding it is hard.
If you want we can make one last try:
- but this will take you a little time (30-40 min) and
- you need another SD card 16GB or bigger
Since I don’t know if your Umbrel Node is already connected to others, I would use another SD card.
What am I going to do?
- a new installation of Rasberry Pi OS 64bit (Bullsey ) with all updates
- and only the most necessary software installation for the fan to start.
I would create a step by step guide with description if you want.
What do you think?
Yes, I’m willing to try that. I have another SD card with Rpi 64bit right now, because I want to buy another Pi. So I could shut down the Umbrel and swap cards.
- I shut down my Umbrel from the web browser
- There were still lights on (not flashing), so I thought maybe it was still running.
- I pressed the front button on the case for about 3 seconds, and the fan started running!
- The Pi was powered off, however, and soon the case became cool
- I pressed the button one time quickly. The fan turned off.
- Press button again, nothing
- Long-press the button (3 sec) and the fan comes back on.
- Pi is still powered off. there doesn’t seem to be a way to turn it on from the case.
- I power-cycled it. Now lights are flashing and the Pi is powered.
- Short button press does nothing
- Long press and the fan starts running!!!
- Turned off umbrel from web interface
- Unplugged it.
- Replace SD card
- Plug it in
- Go through setup
- Run install-raspian-64bit.sh, reboot
- There is no /dev/ttyUSB*
- Run deskpi-config, select #3 for 75% fan. Nothing happens
- There is a text file /dev/ttyUSB0 with the contents “pwm_075”, Same as before.
- Also, the USB ports on the front do not work, the ports on the back do
Ok kenwdelong,
I will attach to this thread a tutorial as txt file.
The first chapter contains the following points:
- preparation
- OS upgrade
- install python
- change python script
- install/configuration DeskPi file
Follow the instructions and the order exactly in this txt file.
If the fan runs stable according to temp specifications,
I will create the 2nd chapter with these points and attach it here
- SSD preparation/patition/formatting
- install umbrel (only one line command)
let me know if you have questions or need anything
DeskPi-fan_install_ken .txt (10.8 KB)
It was all going well until I try to start the deskpi service. Even with the proper lines in /boot/config.txt, the serial ports are not created when the pi boots up. Thanks for your help! You went to a lot of trouble to make that write-up.
results.txt (3.6 KB)
Hello,
as I see in your txt file, some points went wrong.
If you check the status of deskpi.service it should look like this.
under Main PiD it should say, python3.
● deskpi.service - DeskPi Fan Control Service
Loaded: loaded (/lib/system/system/deskpi.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-05-02 21:02:43 CEST; 15min ago
Main PID: 5095 (python3)
Tasks: 1 (limit: 3933)
CPU: 200ms
CGroup: /system.slice/deskpi.service
└─5095 python3 /usr/bin/pwmFanControl-v0.py
and in your text file under Step 11.7 it also says
Process: 639 ExecStart=/usr/bin/pwmFanControl64-v0.py & (code=exited, status=203/EXEC)
This is not the correct filename “pwmFanControl64-v0.py”.
It should be called “pwmControlFan-v0.py”.
Unfortunately, I can’t tell you exactly at which point you made errors.
But it is obvious in your text file that
- python is not used (maybe error during installation (sudo or not?))
- the rights are not correct for /home/umbrel/deskpi/drivers/python/
this is what it should look like
umbrel@umbrel-b:~ $ ls -l /home/umbrel/deskpi/drivers/python/
total 12
–rw-r–r-- 1 umbrel umbrel 3972 Apr 30 12:47 pwmControlFan-v0.py
–rw-r–r-- 1 umbrel umbrel 927 Apr 30 12:16 pwmControlFan.py
–rw-r–r-- 1 umbrel umbrel 522 Apr 30 12:16 safecutoffpower.py - and others …
Please, make sure, that you write the commands individually and exactly what is written there.
The status query of the deskpi.service you should make only after the very last reboot, so that no confusion arises.
Ok, thank you. I am now using my spare SD card for a different purpose. Once I get a new one I will try again!
Thanks again for all your help. (Currently, the fan runs 100% all the time, which is great, my CPU is < 40 degrees!)
Hello Syturio,
please have a look at the instruction file “DeskPi-fan_install_ken .txt”.
Unfortunately, you can’t simply implement the instructions 1 to 1, since you already have umbrel installed, but it should still work.
The important points are:
-
- check or set timezone and time of day
-
- i am watching in a new putty window the temperature with
-
- which Debian version is currently used?
- 9.1 Install "Module Python Serial
- 10.0 Install “DeskPi-fan” For 64 bit Raspberry Pi OS (aarm64)
- 10.1 configuration
- 11.0 Destination directory
- 11.1. create new python file “pwmControlFan-v0.py”.
- 11.2. change file content and save
- 11.3. insert into important directory (required)
- 11.4. change directory and set rights
- 11.5. copy “deskpi.service” file
- 11.6. change “deskpi.service” file content and save it
and don’t forget the reboot.
feedback please
After some time has passed and now really everyone has noticed that there was a problem with the USB udev, I have finished writing the complete installation instructions, including installation of umbrel with a command line.
I think that one or the other may need it.
I apologize for my poor english.
Stay healthy, sea ya
DeskPi-fan_install_ken .txt (16.1 KB)