All you have to do is open two terminals. In the first terminal you cat
everything from the device, e.g.
cat /dev/ttyS0
in the other terminal, you can send arbitrary hex characters and text to the terminal e.g. as follows:
echo -e "\x7E\x03\xD0\xAF und normaler Text" > /dev/ttyS0
The echo -e
command enables the interpretation of backslash escapes.
OnOne has to make sure of course that (i) the serial settings (speed, word length, flow ctrl, etc) are correct and (ii) the serial device (on the other end) is not unblockingblocking.