how can I control gprs module ?

Hi all !

I have a gprs module working fine but I don´t know how to control it.

I explain :
I m interesting in when the module is calling me... if I hang up the call... I want it does something...(turn on a led ... or something like that ...)...

how can do it?

thanks a lot

Hey there!

I'm just having a similar problem. I'm not able to read AT response commands from an arduino program. It seems that the module is working properly, since it makes calls and sends sms, but I'm not able to read answers to comands like "AT+CPAS" (the answer to this command is "+CPAS: 3" in usb mode using hyperterminal if the phone is ringing) in Arduino mode. I'm using the following code in order to hang up an incomming call:

void switchModule(){
  digitalWrite(onModulePin,HIGH);
  delay(2000);
  digitalWrite(onModulePin,LOW);
}

void setup(){

  pinMode(led, OUTPUT);
  pinMode(onModulePin, OUTPUT);

  Serial.begin(115200);              // the GPRS baud rate
    
  switchModule();                    // swith the module ON

  delay(20000);                      
  Serial.println("ATQ[0]");
  delay(2000);
  Serial.println("AT+IPR=115200");
  delay(2000);
  
}


void loop()
{
  while (true)
  {
    Serial.println("AT+CPAS");
    delay(2000);
    if (serialReadLine(LINE_LENGTH, newLine))
    {
      if (strcmp(newLine,"+CPAS: 3")==0)
      {
        Serial.println("ATH");              // disconnect the call
      }
      delay(1000);
    }
  }
  Serial.println("AT*PSCPOF");        // switch the module off
}

The serialReadLine is based in the lineAvaiable from Luke Orland appearing in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257731439

Bests!
JA.