Use another serial port

Hello everyone,

I have a problem using another serial port.

As I mentioned in another topic on the forum, I was trying to use the UART2 port to communicate with a flight controller.

Enable serial port UART2

I managed to do this thanks to your help, but now I want to communicate with an arduino using another GPIO serial port such as UART4. I managed to activate the serial port by modifying the /boot/config.txt file and adding the line dtoverlay=rk3588-uart4-m2. I then updated the system using sudo update_extlinux.sh. The serial port is clearly visible when I run ls /dev/tty*.

The problem I’m having is that when I run my rosserial.py node to receive data from the arduino, it doesn’t send me anything.
However, this command works well with the ttyACM0 but not with the other serial ports. Furthermore, the ttyS2 port works well with my flight controller.
Are there any parameters I need to modify on the serial ports to be able to use this communication, and if so, which ones?

I’m using a Rock 5b with the ubuntu 20.04 image (https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz) and I’m trying to get it to communicate with a MEGA arduino. I’m connected to PIN 19 and 23 on the rock and to pin 0 and 1 on the arduino. Between the two is a 3.3V 5V logic level regulator.

Thank you in advance for your help!

Trivial question: How you connect the TX/RX pairs? I.e.

Rock                    Arduino
Pin23(UART4_TX_M2) <--> D0 (RX0)
Pin19(UART4_RX_M2) <--> D1 (TX0)

or

Rock                    Arduino
Pin19(UART4_RX_M2) <--> D0 (RX0)
Pin23(UART4_TX_M2) <--> D1 (TX0)

The TX/RX pairs are connected like this
Rock Arduino
Pin23(UART4_TX_M2) <–> D0 (RX0)
Pin19(UART4_RX_M2) <–> D1 (TX0)