Radxa 4C+ - mraa not working

Is there a group associated with this resource which the user can be defined to ? Thinking like with tty permission needed for arduinos on linux. I don’t have my rock 4c+ handy right now to check but that’s what I would look to alter.

it works for my pwm pins but not for i2c pins. I did all the instructions and tests, still my i2c pins cannot detect a device. I used pca9685 and mpu6050 but none of the sensors were recognized. I also used the i2c tools and mraa-tests.

my i2c devices actually works fine with arduino

I discovered two i2c buses which are 0 and 9 in my rock 4c+, but none of the buses can detect a device

So now I am on my 4c+, I go to /dev and look at the i2c-7 file permissions.
It is owned by root, group i2c has RW access, others NONE.
So yeah, if you aren’t in the group, you will not have permission to access the i2c-* devices.
Make yourself part of the group i2c* or give yourself permission directly. I am on Deb bullseye also.

were you able to test your i2c7 pins using your available i2c device?

i already done this, actually made a udev rule. Enabled the pins in rsetup and /boot files

please enable i2c-7 overlay with rsetup, and 1. make sure that i2c7 was enabled

radxa@rock-4c-plus:~$ ls /dev/i2c-*
/dev/i2c-0  /dev/i2c-7  /dev/i2c-9

then use the fllowing command to check i2c device address

sudo i2cdetect -r -y 7

Done, but the address i am looking for is not present. There are other addresses I see on bus 0.

Hi Nasca. I found that they have not fixed the problem with Rock 4 C+, how are you find this package ?

1 Like

It’s so disappointing that they released this board with lots of problem. My project will be delayed.

Apologies for the very slow reply. I have been focused on other projects.
I started over with latest Debian Bullseye KDE (kernel 5.10.110-4)
I am able to use i2ctools on my shim using i2c-7 after changing permissions and groups and making usr/sbin part of my path.
For me using sudo just wasn’t an option due to a number of things being in python and scripts.
As it is, I am almost done turning my “raspad 3” into a “rockpad 3”.

i am little confused and hope you guys can give me some pointers on the issue of GPIO.

after downloading the file zip file from above.


I am getting dependencies issue. below is the error when i try to install the .deb


The following packages have unmet dependencies:
libmraa : Depends: libjson-c4 but it is not installable
Depends: python3.8 but it is not installable
Depends: libpython3.8 but it is not installable
E: Unable to correct problems, you have held broken packages.

thanks for your help

Good Morning,
I’ve bought 4C+ board to develop one python project and replace rpi board.
I’m new Linux user and I’ve big difficult to install libmraa library. before write here, i had lot trials but without fix this issue. Actually on 4C+ board there is official radxa Debian11 desktop OS downloaded by official web site.

Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.110-6-rockchip
OS Type: 64-bit
Processors: 6 ×
Memory: 3.8 GiB of RAM
Graphics Processor: llvmpipe

anyone can help me?.. is there any procedure which can i try?

thanks in advance.

As your kernel version is >4.8 you need to use libgpiod and not libmraa.

thanks a lot for your suggestion, i will try tonight or tomorrow.

In general libmraa works an ROCK 4C+, however mine runs on an Armbian and is compiled by myself.

1 Like

you have install armbian with desktop version? which version? can you help me to compiled libmraa?
i’m new linux user and i’ve not experience on this OS.

thanks in advance.

I fear I used self-compiled Armbian versions. The “key” for the ROCK 4C+ is to use the right .dtb version, at least some Armbian versions provide two and select the wrong one by default: Look into your /boot/dtb/rockchip directory.

if there is

rk3399-rock-4c-plus.dtb and

then the version WITHOUT -pi- is the right one. Ensure it is used in your /boot/armbianEnv.txt

Otherwise, I use 6.2.2 kernel, bookworm userland and cinnamon desktop, runs fine inside an Argon ONE.V2 case.

Compiling mraa is straightforward. Use either the “official” one (it has support for ROCK 4 variants, but I’m not too sure that it works without modification for the 4C+), or the “Radxa” one (that has definitely support for 4C+). The Radxa one is a little bit old and does not compile cleanly neither on bookworm nor on bullseye. You can use my fork, which is the official one plus Radxa changes on top

official: https://github.com/eclipse/mraa.git
Radxa: https://github.com/radxa/mraa
mine: https://github.com/xt3firm/mraa.git

In any case, check out using

git clone .

Read the provided Readme.md, for build instructions, build and install. By default it installs into /usr/local/lib andf does not overwrite any other installed.

many thanks XT3 for your suggestions!!
i’ve checked and in my directory /boot/dtb/rockchip i 've rk3399-rock-pi-4c-plus.dtb only. This file is used on my /boot/armbianEnv.txt.
This configuration is ok or not?

anyway, im trying to install mraa following your guide lines.