AT Commands

Hi

My project is to control a Telit GE863-GPS (GSM/GPS module) with the Arduino. I've learned that to do this, you use AT Commands.

When you send an AT-command to the module, it will respond with "OK" or something like that

I want to create a method for sending AT commands - something like this:

char SendCmd(char command)
{
Serial.println(command);

char response = Serial.read();

return response;
}

But how do I make sure to read the complete response from the Telit module?

Well, first you need to make sure you're able to send strings not just individual characters.

And then make sure you can receive strings - by looping.

If you have a look around the board (search?) you'll find a few thousand threads of people asking how they can read multiple characters from the serial port into a single datatype (e.g. array).