Enabling mraa and uart in Rock 5b

Hello Team,

Recently I’ve started working on Rock 5B and I’ve installed Ubuntu image which is downloaded from official site “rock-5b-ubuntu-focal-server-arm64-20220919-0839-gpt.img.xz” .

I am trying to activate UART’s but I struck in between the development. Previously I was working on Rock 3A, there it was easy and got useful information from official site ( https://wiki.radxa.com/Device-tree-overlays ) regarding the overlays.

But in Rock 5B I can find only GPIO details, overlays were not available and don’t know how to activate the UART’s. Here there is no /boot/uEnv.txt also.

Could you please help me with this issue.

are there any tty ports in /dev/
if you dont know run:

ls /dev/tty*

@hannes-campidell Thanks for your response and I’ve attached the output of ls /dev/tty* kindly please refer

And I also i tried the command

mraa-gpio list

Its showing no pins, Please help me with this.


your serial port is /dev/ttyFIQ0 to view the output of the port please type (on the rock 5b):

sudo screen /dev/ttyFIQ0

and on the other end simply install putty and open the port of the serial adaptor and type something and it should show u on the terminal on the rock
and for the gpio problem i cant help you

If you dont mind, could you please help me to update the uart’s in rock 5 b. Which file should I edit ?
/boot/config.txt ?

do you want a linux console over uart?

yes, I am trying to enable check enabled uart’s. But still its showing no pins

this is a relativley good guide and just replacd ttyUSB0 with ttyFIQ0: https://www.rogerirwin.co.nz/linux-open-source/enabling-a-serial-port-console/

@hannes-campidell Thanks for your support, If you dont mind could you please look into below image and help me out that why it is showing unknown platform ?


try it with debian and i dont know what the issue is but maybe it works in debian


we are using Ubuntu 20.04 LTS for our application and mraa support is required to communicate with uart.

If you need mraa then it is currently not ported to ROCK 5B.
@Alvin please see if you can start working on this.

@Alvin @RadxaYuntian Greetings, Any update on this ?

1 Like

We have assigned an engineer to this task.

1 Like

Hi team,

@hannes-campidell As you said, I tried working with Debian. I am facing an same issue. GPIO pins are not detecting. Libmraa version is also latest one (1.9)
Please fine below images for your reference and kindly help with this.

Also I tried with python mraa package, even that also throwing error on gpio module.

I’ve tried some basic commands which was available on official site. Still I am not getting solution for this issue.


Please let us know with this for solution.
Thanks in advance.

did the last command work? if yes i will create a small c++ programm for gpio once i recieve my rock 5b (in about 2 weeks) you can test this with a multimeter or a led and a resistor to ground on that pin but remember if you short out the pin to ground or vcc the rock will die

@hannes-campidell I guess it’s not. I didn’t get any output for the command.

Could you please verify this overlay which I configured,

kindly correct me, if it’s wrong.

this command shouldnt output anything it should just toggle the pin
so type: sudo echo 1 > /sys/class/gpio/gpio157/value
and probe that pin with a multimeter or adjust the pin number for that one you want and probe

I tried that too, still i am not getting.

run this command

sudo echo 107 > /sys/class/gpio/export && sudo echo out > /sys/class/gpio/gpio107/direction && sudo echo 1 > /sys/class/gpio/gpio107/value

please copy this as one line

if ti asks for your password type it in if something else than a password promt pops up something went wrong

if no errors poped up turn on the multimeter and set it to dc mode and put the black probe on the black circle highlithed in the image and the red probe on the pin nearest to the micro hdmi connector (the arrow points to it on the picture)
and if the multimeter displays arround 3.3v (± .2v) then it works if not then it doesnt work

1 Like