simple serial reading ascii with ethernet but still wrong reading

I tohugth that the serial.write() would write to the device and then release the serial port.
In the same way, I used to think that Serial.available() is function that continuosly performs a polling on the rx channel only if there is any valid data.
I was thinking of perform a check for the serial port, a change in the statement like this.

while (Serial.available() < 1);
while (Serial.available() > 0) {
if(i<30){
data=(char)Serial.read();
i++;
data='\0';
}
[\quote]

Anyway, I didn't try to perform a simple read without the shield code. But how can I see the read result, if my serial is wired to the other device?

I'll try right now.

EDIT:
I didn't notice the other question.
The device is TI launchpad - with a 2553 onboard.