I'm using an embedded system with yocto (hardknott) with 2 RS232 port :
/dev/ttymxc0
/dev/ttymxc1
both used as console with a login prompt. Now I would switch one of that (e.g /dev/ttymxc0) and use it as normal serial, the reason to do that is permit the serial comunication between two device
How can do that via C code or via shell command?
I tryed with
systemctl stop serial-getty@ttymxc0.service
and
systemctl stop serial-getty@ttymxc0.service
systemctl disable serial-getty@ttyS0.service
but I'm not able to change the port behaviour