Write and read to Serial port at the same time

if you work with arduino i not think your emulation with virtual ports is needed.

you make a arduino code what ECHO the received string.

-a- and that you can test in the arduino IDE Monitor: type some text, press enter and arduino should send it back. after that test
-b- try same from processing with a
https://processing.org/reference/libraries/serial/serialEvent_.html