Then I followed the “Help! Something doesn’t work!” steps. (But everytime I use “sudo update_extlinux.sh” this is getting reverted?)
I’ve edited the /boot/config.txt with this “dtoverlay=rk3568-uart2-m0” but that didn’t help.
The /boot/uEnv.txt is nowhere to be found and creating one didn’t help either.
mraa-uart and mraa-gpio list also don’t show any pins
So now I don’t know what to do next I searched for hours and tried many things but they all didn’t change a thing.
Would appreciate if someone could help me here.
My goal is to use UART2_TX and _RX.
line was generated. Should be after the devicetreedir line. update_extlinux.sh probably cannot parse your /boot/config.txt, probably there are errors in it. Post it please.
dtoverlay= MUST be in the first column (i.e. no space in front), No space between “dtoverlay” and “=”
#
# dt overlay line: started with "dtoverlay=". One dt overlay one line.
#
dtoverlay=rk3568-uart2-m0
#dtoverlay=rk3568-fiq-debugger-uart2m0
dtoverlay=rk3568-disable-npu
So you have UART2. To double check that, you could remove the overlay again, the ttyS2 line should be gone. That said, I have no clue why it does not work with mraa. But I wouldn’t be surprised if the mraa lib is just to old. I did not use the Ubuntu images.
Try this: mraa-uart list journalctl | grep mraa
On my machine I got
libmraa version v2.2.0 initialised by user 'xxx' with EUID xxxx libmraa initialised for platform 'Radxa ROCK 5B' of type 36
If your board is detected, might be something with the permissions to access /dev/ttyS2.
dir /dev/ttyS2 92 0 crw-rw---- 1 root dialout 4, 66 Jun 26 01:36 /dev/ttyS2
groups $USER xxx: ... dialout ...
If not, try to build a recent version from source, this is rather simple.
libmraa initialised for platform 'Unknown platform' of type 98
libmraa version v2.1.0 initialised by user 'xxx' with EUID 1000
Unknown Platform, currently not supported by MRAA
groups $USER:
xxx: rock sudo audio video
no dialout here is this a problem?
dir /dev/ttyS2
/dev/ttyS2
ls -l /dev/ttyS2:
crw-rw---- 1 root dialout 4, 66 Jun 26 09:54 /dev/ttyS2
Btw do you know how I can change the baudrate to 115200?
Thank you allready for the help, I’m not so used to working with linux