Trouble with Serial Input

To get an idea of what is happening, and therefore how to fix it, try printing (Serial.println) rx_str at strategic points in your code..