Arduino Uno - Serial Communication Problem

It's your Arduino connected via USB to the computer? If this is true I think I have the same problem. I think Serial library work with TX and RX pins, the same pins than the USB port. I think we can use RX and TX if we are connected to the PC with the USB.

I change my code and work with pin 2 =RX and 3=TX and work with SoftwareSerial.h library. Something like:

#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3
#define ledPin 13

// set up a new serial port
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);
byte pinState = 0;

void setup()  {
  // define pin modes for tx, rx, led pins:
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
}

void loop() {
  // listen for new serial coming in:
  char someChar = mySerial.read();
  // print out the character:
  mySerial.print(someChar);
  // toggle an LED just so you see the thing's alive.  
  // this LED will go on with every OTHER character received:
  toggle(13);

}


void toggle(int pinNum) {
  // set the LED pin using the pinState variable:
  digitalWrite(pinNum, pinState); 
  // if pinState = 0, set it to 1, and vice versa:
  pinState = !pinState;
}

The only way I see to load the same program on RX,TX pins is disconnect the RX,TX cable from the Arduino board, load the program and connect the RX,TX another time and finally reset the board to execute another time the setup.