UART to RS232 - Slow communication? Loss of information?


First time poster here.
First, a bit of context: I’m using a La Frite. The idea is to use it as a UPS gateway, connecting to the RS232 port of most of UPSes, running NUT in a containter. That part is working, I’ve tested it with a USB to Serial converter and i have no issues. But, it does require to use a USB Hub, which i don’t like, so i am trying to use the onboard UART ports with a TTL to RS232 converter (MAX3232).

I’m having an issue with the UART GPIOs. I’ve enabled /dev/ttyAML6 with “ldto merge uarta” and found the correct pins at the 8 and 10 position. But when i try to test it, looping them, i find the port barely working. Basically, only 1 in maybe 10 keypresses go through. I’ve tried changing the port speed and disabling rts/cts with stty, but nothing really happens…

Just fyi, i’ve tried looping right on the 40 pin header as well as after the rs232 converter, and the behaviour is exactly the same, so i’m guessing that whatever is wrong is in the board or, more likely, my port setup.

can you see something wrong with what i have done? or some configuration i’m missing?


1 Like

The uarta overlay has cts and rts enabled. Do you have those wires hooked up to RS232? Without it, you won’t be able to send/receive properly. Also what baud rate? SBCs have fixed clocks feeding the UART controller so certain frequencies will not work. See uarta-clk81 which expands the available baud rates.

No, i do not have the cts / rts hooked up, the TTL adapter doesn’t have the pins for them. Thats why i tried disabling them. is that not possible?
Baudrate, mostly tried 9600 and 115200.

You can disable them by modifying the overlays in the wiring tool.

Hi, sorry, i think i don’t get it.

I’ve cloned the repo (GitHub - libre-computer-project/libretech-wiring-tool)
→ modified “uarta.dts” (i removed the line uart-has-rtscts;)
→ installed it. ./
→ ldto enable uarta


first time opening a connection:
→ screen /dev/ttyAML6 (that port is looped)
everything works absolutely perfect. no delays, no loss of data.
→ i exit screen, and open it back again.
i start having delay on the keypresses that do pass (about 30% loss)
→ exit and open back up again.
more loss, about 70%.
→ again…
with luck i can get, eventually, one character to go through.

i actually tested this on the USB to RS232 adapter and have the same issue.

if i disable the overlay and renable it it goes back to the start. (first time opening screen everything is ok, and then all goes downhill…) if i reboot the board, same thing.

i tried the unmodified libretech-wiring-tool and it behaves exactly the same.

i am guessing i didn’t really disable cts/rts?

RS232 is CTS/RTS
RS422 is CTS/RTS
RS485 is no CTS/RTS

You also need to remove the pinctrl for CTS/RTS.