How to install PoE HAT's software on Armbian

We provide software support to help you control PoE fan, and a one-click installation script and manual installation steps are provided on PoE HAT.

If you use Rasbian on Raspberry Pi or an officially supported system on ROCK Pi 4, you can use the one-click installation script. We are adding more system support to the installation script.

Here are the detailed steps to manually install the software on Armbian of ROCK Pi 4.

1. Enable hardware resources

We provide a dtbo file, please follow these steps to install it in Armbian to enable PWM and ADC.

sudo mkdir -p /boot/overlay-user
curl -sL https://rock.sh/rockpi-poe-dtbo -o rockpi-poe.dtbo
sudo mv rockpi-poe.dtbo /boot/overlay-user/rockpi-poe.dtbo

Then edit /boot/armbianEnv.txt and add rockpi-poe to user_overlays.

2. Install GPIO control library

Please install libmraa-rockpi4 from testing repo of Radxa APT.

3. Download package and install

wget https://cos.setq.me/rockpi/deb/rockpi-poe-0.13.deb
sudo dpkg -i rockpi-poe-0.13.deb

4. Enable service

sudo systemctl enable rockpi-poe.service

1 Like

Hi
The download is dead
have anyone downloadet the deb and can share a link.

Regards

Sorry the link is broken, please use the address below

https://cos.setq.me/rockpi/deb/rockpi-poe-0.13.deb

Hi
thx for the fixed link :smiley: @setq

This link is broken too🤷🏻‍♀️

The link is not broken, only hotlink protection is enabled. Using curl or wget access is fine.

Yes, the link works. :ok_hand: But it may be worth fixing the link on the wiki.
https://wiki.radxa.com/PoE_HAT

My bad. Thank you for reminding me.

Sorry to bother you guys again, but the fan still doesn’t work for latest armbian buster with 5.4.32:
I could get the dependencies done and installed/upgraded python. I had no errors during the install following the info here. Matter of fact, I get a nice
[ OK ] Started Rockpi PoE-FAN. I double checked overlay-user folder and the armbianENV.txt entry (user_overlays=rockpi-poe). libmraa (not libmraa-rockpi) was nicely installed and I checked using:
python3 -c “exec(‘import mraa\nprint(mraa.getVersion())’)”
v2.0.0-57-gf374a26

What else am I missing?
When I boot into official debian9, the fan starts during startup and slows down later, with armbian it stays silent…

/e: Works smoothly now, boots fast, reinstalled libmraa (for whatever reason, I basically followed all steps again and checked after each; reinstalling libmraa was the point oO)

Any chance this will be supported on Armbian and Debian bullseye ( with kernel 5.16 ), please?

" curl -sL https://rock.sh/get-rockpi-poe | sudo -E bash - ", shows in the end

<snip snip>
E: Unable to locate package libmraa
E: Unable to locate package rockpi4-dtbo
Setting up rockpi-poe (0.11) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rockpi-poe.service → /lib/systemd/system/rockpi-poe.service.
--------------------
The PWM will take effect after reboot.

Suppose there is some rework needed

If you are using Armbian or Debian, you currently need to install it manually. @dolphs

OK clear, thanks it is running now:

root@rockpi-4a:~# uname -a
Linux rockpi-4a 5.16.16-rockchip64 #trunk.0012 SMP PREEMPT Sat Mar 19 16:34:14 UTC 2022
aarch64 GNU/Linux

root@rockpi-4a:~# systemctl status rockpi-poe.service
● rockpi-poe.service - Rockpi PoE-FAN
Loaded: loaded (/lib/systemd/system/rockpi-poe.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-03-22 11:19:06 UTC; 58s ago
Main PID: 659 (python3)
Tasks: 1 (limit: 4464)
Memory: 11.6M
CPU: 187ms
CGroup: /system.slice/rockpi-poe.service
└─659 /usr/bin/python3 /usr/bin/rockpi-poe.py start

Mar 22 11:19:06 rockpi-4a systemd[1]: Started Rockpi PoE-FAN.
Mar 22 11:19:08 rockpi-4a libmraa[659]: libmraa version v2.2.0-11-gd7ae171 initialised by user ‘root’ with EUID 0
Mar 22 11:19:08 rockpi-4a libmraa[659]: gpio: platform doesn’t support chardev, falling back to sysfs
Mar 22 11:19:08 rockpi-4a libmraa[659]: libmraa initialised for platform ‘ROCK Pi 4’ of type 20

A quick how to has been posted here @armbian

Is there any updated installation guide or information on getting the PoE running on a ROCK PI 4b?
We have several ROCK PIs running the original rockpi-4b-debian-buster-xfce4-arm64-20220506-0320-gpt.img. Until now the procedure from @setq and from @dolphs did not solve the issue.
$ sudo systemctl status rockpi-poe.service gives following message:

● rockpi-poe.service - Rockpi PoE-FAN
Loaded: loaded (/lib/systemd/system/rockpi-poe.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2022-07-19 03:32:45 UTC; 8h ago
Process: 496 ExecStart=/usr/bin/python3 /usr/bin/rockpi-poe.py start (code=exited, status=0/SUCCESS)
Process: 549 ExecStop=/usr/bin/python3 /usr/bin/rockpi-poe.py stop (code=exited, status=0/SUCCESS)

Main PID: 496 (code=exited, status=0/SUCCESS)
Jul 19 03:32:45 rockpi-4b systemd[1]: Started Rockpi PoE-FAN.
Jul 19 03:32:45 rockpi-4b /rockpi-poe.py[496]: Maybe need reboot.
Jul 19 03:32:45 rockpi-4b python3[496]: 'NoneType' object has no attribute 'write'
Jul 19 03:32:45 rockpi-4b python3[496]: using python3 rockpi-poe.py start|stop|enable
Jul 19 03:32:45 rockpi-4b /rockpi-poe.py[549]: Maybe need reboot.
Jul 19 03:32:45 rockpi-4b python3[549]: 'NoneType' object has no attribute 'write'
Jul 19 03:32:45 rockpi-4b python3[549]: using python3 rockpi-poe.py start|stop|enable
Jul 19 03:32:45 rockpi-4b systemd[1]: rockpi-poe.service: Succeeded.

Any advice or help is much appreciated!
Thanks.

This worked for me on RockPi4 Plus (OP1 based) with "“Armbian 22.05.4 Bullseye”. I booted from this sd card image - Armbian_22.05.4_Rockpi-4b_bullseye_current_5.15.48.img.xz.
configured nvme boot via armbian-config.
booted from nvme
sudo apt update
sudo apt upgrade -y

now running kernel 5.15.52-rockchip64

Installed the rockpi-poe as detailed above.

To get libmraa installed, I did the following:

git clone https://github.com/eclipse/mraa

follow instructions on https://github.com/eclipse/mraa/blob/master/docs/building.md
get dependencies:
sudo apt install cmake
sudo apt install libjson-c5
sudo apt install python3-dev
sudo apt install swig

mkdir build
cd build
cmake …
make

sudo make install

update ldconfig:

$ sudo ldconfig
$ sudo ldconfig -p | grep mraa
libmraa.so.2 (libc6,AArch64) => /usr/local/lib/libmraa.so.2
libmraa.so (libc6,AArch64) => /usr/local/lib/libmraa.so

$ python3 -c “exec(‘import mraa\nprint(mraa.getVersion())’)”
v2.2.0-26-g8b1c549

Aug 16 08:19:52 rockpi-4b libmraa[6543]: libmraa version v2.2.0-26-g8b1c549 initialised by user ‘rock’ with EUID 1000
Aug 16 08:19:52 rockpi-4b libmraa[6543]: gpio: support for chardev interface is activated
Aug 16 08:19:52 rockpi-4b libmraa[6543]: libmraa initialised for platform ‘ROCK Pi 4’ of type 20

Hope this is useful. I have some tweaks to the rockpi-poe package, but have yet to turn it into a .deb package, etc. Mostly cosmetic.