This code can only read one line per connection. You need to start a new thread per connection and have it handle all the I/O, in a loop of its own.
I'm also wondering whether the GPRS client is sending line terminators. You might be better off just reading and writing bytes:
while ((count = in.read(buffer)) > 0)
{
out.write(buffer, 0, count);
}
operating directly on input and output streams, with any buffer size > 1, say 1024 for a start. count
is an int.
I don't see why you should need to capitalize anything either. If the server doesn't understand what the GPRS modem actually sends, someone needs to fix it so it does.