Perhaps in setup() you get both ends (PC and Arduino) coordinated, like modems handshaking only less complicated?
Definitely try a simpler test and proof, without extra steps --- make Arduino to receive and echo what you send from Serial Monitor or another terminal program back to the Monitor/terminal. Be sure of what is happening, flash the led on pin 13 maybe to tell the code has reached a certain point. Once you have that sureness/understanding you will be better able to plan your PC code.
A very good move is to stop using C++ String objects on Arduino. Switch to C strings which are more direct and memory efficient. Arduino has 2048 bytes of RAM for everything including the stack. A C string is a char (signed 8-bit) array with a NULL byte to signal the end of the string. Yes, you have to keep from writing past the end of the array yourself which is not so hard.
Arduino uses these libraries:
http://www.nongnu.org/avr-libc/user-manual/modules.html
This is string.h with the C string and memory manipulation functions:
http://www.nongnu.org/avr-libc/user-manual/group__avr__string.html