PENTA SATA HAT INSTALL FAILS on ROCK3a :-((

Thank you so much for your hints up to now …dominik
But still no good! :frowning: apart from the …1’s It installed the other stuff
but
sudo apt install libmraa
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libmraa : Depends: libjson-c3 but it is not installable
E: Unable to correct problems, you have held broken packages.
rock@rock-3a:~$ sudo apt install libjson-c4
Reading package lists… Done
Building dependency tree
Reading state information… Done
libjson-c4 is already the newest version (0.13.1+dfsg-7ubuntu0.3).
libjson-c4 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rock@rock-3a:~$ sudo apt install libjson-c3
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libjson-c3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘libjson-c3’ has no installation candidate

Found this:


Plus After aplying that fix
plus an
apt update
libmraa finally has installed! :slight_smile:

Still … Unable to locate package radxarock3modela-rk-u-boot-latest plus all subseqent errors from above :frowning:

Instead of radxarock4modela-rk-u-boot-latest for rock3a this one is suitable: rockpis-rk-u-boot-latest
yet I don’t know if it’s really required for that hat, updating bootloader can make your board not bootable :confused:
after installation of libmraa what is output from penta sata hat service?

This is the result after install of rockpis-rk-u-boot-latest: I dId not dare to apply change to the boot sector. Should I give that a Try? :roll_eyes:
And how do I revert it that fails. Do a Backup with dd before?

So PENTA SATA HAT still is not active :frowning:

11:14 Failed to start Rockpi SATA Hat. systemd
11:14 rockpi-penta.service: Failed with result ‘exit-code’. systemd
11:14 rockpi-penta.service: Start request repeated too quickly. systemd
11:14 Stopped Rockpi SATA Hat. systemd
11:14 rockpi-penta.service: Scheduled restart job, restart counter is at 5. systemd
11:14 rockpi-penta.service: Failed with result ‘exit-code’. systemd
11:14 rockpi-penta.service: Main process exited, code=exited, status=1/FAILURE systemd
11:14 ValueError: Error initialising PWM on pin python3
11:14 this = _mraa.new_Pwm(pin, owner, chipid) python3
11:14 File “/usr/local/lib/python3.8/dist-packages/mraa.py”, line 579, in init python3

What helped to get libmraa installed, was your hint that was deleted unfortunately :frowning:

I burned today Your image and checked what is wrong about libmraa, seems that it depends on older libjson-c3, on focal there is libjson-c4 istead. To get rid of that You need to find repo with all needed dependencies, according to this link: https://wiki.radxa.com/Rockpi4/dev/libmraa all You need to do is to add testing repo with key for focal. uncomment that in sources.list.d/apt-radxa-com.list

I deleted that reply because I noticed You already got mraa package.
@stephen just regenerated all images with debos: https://github.com/radxa/debos-radxa/releases
I would start yet again trying focal image and see if it’s any better. Also check debian and armbian - they may have right packages out of box. I’ll have that hat in 2-3 weeks and will be able to see it in action (and full setup ;))

Now there is another error, there is no /boot/hw_intfc.conf file in system
It fails at:
Traceback (most recent call last):
File "/usr/bin/rockpi-penta/misc.py", line 192, in <module>
open_pwm_i2c()
File "/usr/bin/rockpi-penta/misc.py", line 181, in open_pwm_i2c
replace('/boot/hw_intfc.conf', 'intfc:pwm0=off', 'intfc:pwm0=on')
File "/usr/bin/rockpi-penta/misc.py", line 171, in replace
with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/boot/hw_intfc.conf'
But there is another errors, which you can notice
Here is complete paste

The only thing which I did after flashing OS was apt update & upgrade

This is file for rockpi 4, but not for 3a, as mentioned here

@setq will follow up on this issue.

Fine Then, Will you inform about here
Current situation: Patch still ist faulty

sudo curl -sL https://rock.sh/get-rockpi-penta 1 | sudo -E bash -

*** Penta SATA Hat Install for ROCK Pi 4

*** Tested distributions:
*** Armbian 20.05.4 focal
*** Armbian 20.05.3 buster
*** Debian 9 Desktop (radxa official image)
*** Ubuntu Server 18.04 (radxa official image)

*** Please report problems to setq@radxa.com and we will try to fix.

Package(s) radxarock3modela-rk-u-boot-latest rockpi4-dtbo gcc python3-dev python3-setuptools python3-pip python3-pil is required.

Would you like to apt-get install the packages? [Y/n] Y
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Hit:3 http://ppa.launchpad.net/mraa/mraa/ubuntu focal InRelease
Hit:4 http://apt.radxa.com/focal-testing focal InRelease
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1022 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [841 kB]
Fetched 2199 kB in 3s (635 kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package radxarock3modela-rk-u-boot-latest
Traceback (most recent call last):
File “setup.py”, line 3, in
from setuptools import setup, find_packages
ModuleNotFoundError: No module named ‘setuptools’
(Reading database … 67250 files and directories currently installed.)
Preparing to unpack /tmp/tmp.Bqr21QA3sB …
Removed /etc/systemd/system/multi-user.target.wants/rockpi-penta.service.
Unpacking rockpi-penta (0.10) over (0.10) …
Setting up rockpi-penta (0.10) …
Created symlink /etc/systemd/system/multi-user.target.wants/rockpi-penta.service → /lib/systemd/system/rockpi-penta.service.
Traceback (most recent call last):
File “/usr/bin/rockpi-penta/misc.py”, line 192, in
** open_pwm_i2c()**
File “/usr/bin/rockpi-penta/misc.py”, line 181, in open_pwm_i2c
** replace(’/boot/hw_intfc.conf’, ‘intfc:pwm0=off’, ‘intfc:pwm0=on’)**
File “/usr/bin/rockpi-penta/misc.py”, line 171, in replace
** with open(filename, ‘r’) as f:**
FileNotFoundError: [Errno 2] No such file or directory: '/boot/hw_intfc.conf’

please note it Says for ROCK PI 4 but my Board is Rock-3a

1 Like

Hi! got rock-3a and Penta HAT
Have the same problem, want to follow this topic and bring some logs aswell:

“Package(s) radxarock3modela-rk-u-boot-latest rockpi4-dtbo gcc python3-dev python3-pil is required.”

“E: Unable to locate package radxarock3modela-rk-u-boot-latest”

Install:

Would you like to apt-get install the packages?

E: Unable to locate package radxarock3modela-rk-u-boot-latest

unable to execute ‘aarch64-linux-gnu-gcc’: No such file or directory
error: Setup script exited with error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1
(Reading database … 60240 files and directories currently installed.)
Preparing to unpack /tmp/tmp.K6hnKpGGE3 …
Removed /etc/systemd/system/multi-user.target.wants/rockpi-penta.service.
Unpacking rockpi-penta (0.10) over (0.10) …
Setting up rockpi-penta (0.10) …
Created symlink /etc/systemd/system/multi-user.target.wants/rockpi-penta.service → /lib/systemd/system/rockpi-penta.service.
Traceback (most recent call last):
** File “/usr/bin/rockpi-penta/misc.py”, line 192, in **
** open_pwm_i2c()**
** File “/usr/bin/rockpi-penta/misc.py”, line 181, in open_pwm_i2c**
** replace(’/boot/hw_intfc.conf’, ‘intfc:pwm0=off’, ‘intfc:pwm0=on’)**
** File “/usr/bin/rockpi-penta/misc.py”, line 171, in replace**
** with open(filename, ‘r’) as f:**
FileNotFoundError: [Errno 2] No such file or directory: '/boot/hw_intfc.conf’

After reboot:

systemctl status rockpi-penta.service

● rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-01-07 23:42:06 UTC; 11min ago
Process: 462 ExecStart=/usr/bin/python3 /usr/bin/rockpi-penta/main.py on (code=exited, status=1/FAILURE)
Main PID: 462 (code=exited, status=1/FAILURE)

Update:
since such file or directory: '/boot/hw_intfc.conf’ i made this file with touch /boot/hw_intfc.conf

yes, that made

 systemctl status rockpi-penta.service

● rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor >
Active: active (running) since Mon 2022-01-10 14:33:05 UTC; 49min ago
Main PID: 335 (python3)
Tasks: 2 (limit: 8600)
Memory: 14.4M
CGroup: /system.slice/rockpi-penta.service
├─335 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
└─414 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on

but top hat (fan and oled) - still not working
all drives are showing (i have 3 2.5" hdd + emmc)
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
-sda1 8:1 0 465.8G 0 part sdb 8:16 0 465.8G 0 disk -sdb1 8:17 0 465.8G 0 part
sdc 8:32 0 149.1G 0 disk
-sdc1 8:33 0 149G 0 part mmcblk0 179:0 0 57.6G 0 disk |-mmcblk0p1 179:1 0 512M 0 part -mmcblk0p2 179:2 0 56.3G 0 part /
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk

i noticed, that if connect top hat (fan+oled) via included wire it will spin sometimes, but not when i connect it completely

i dont have similar cable to check if there is problem with cable.

rock@rock-3a:~$ sudo i2cdetect -y 1
[sudo] password for rock:
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
rock@rock-3a:~$ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Didnt make it for me:((

karl@rock-3a:~$ systemctl status rockpi-penta.service
● rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-01-10 19:03:23 UTC; 1min 44s ago
Process: 9871 ExecStart=/usr/bin/python3 /usr/bin/rockpi-penta/main.py on (code=exited, status=1/FAILURE)
Main PID: 9871 (code=exited, status=1/FAILURE)
karl@rock-3a:~$ systemctl start rockpi-penta.service
karl@rock-3a:~$ systemctl status rockpi-penta.service
● rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-01-10 19:06:49 UTC; 7s ago
Process: 9912 ExecStart=/usr/bin/python3 /usr/bin/rockpi-penta/main.py on (code=exited, status=1/FAILURE)
Main PID: 9912 (code=exited, status=1/FAILURE)

I’m sorry I’ve been busy with other things lately. I’m working on it. It should be finished tomorrow.

thx, hope so :-}

Regarding the above, have a look at https://launchpad.net/~mraa/+archive/ubuntu/mraa/+packages where you can actually see details about the available packages – this’ll tell you that you want to install libmraa2 and libupm2 when using said third-party repository. As a rule of thumb, however, you don’t need to specify non-dev library packages in the first place when installing the main packages (here: mra, upm) as the former should be listed as dependencies (apt is supposed to take care of these, dpkg won’t).

Did that already and both .deb’s installed fluelessly but still the PENTA SATA HAT will not install and activate on the rock3a.
So Im Waiting for setq’s respond by tomorrow I hope…

I spent some time thinking about refactoring it. It does work. I’ll upload a temporary version and then refactor it.

3 Likes

Good to know :slight_smile:
But where can the refactoring be found?

Please have a try

curl -sL https://rock.sh/get-rockpi-penta | sudo -E bash -

Refactoring hasn’t started yet, and the code can be found on Github.