Buenas, el caso es que cuando reseteo la placa celular (modulo SM5100B-D) manualmente,presionando el boton, el mensaje llega rapido y funciona de maravillas,existe algun comando para resetearlo o inicializarlo con algun comando. Estoy enviando mensajes uno detras de otro.
Estoy usando Arduino Mega 2560
tengo este codigo
void setup() {
Serial.begin(9600);
Serial1.begin(9600); //GSM
delay(20000); // give the GSM module time to initialise, locate network etc.
}
void loop() {//GSM
//If a character comes in from the cellular module...
while(Serial1.available()){
if(Serial1.available() >0){
incoming_char=Serial1.read(); //Get the character from the cellular serial port.
Serial.print(incoming_char); //Print the incoming character to the terminal.
}//If a character is coming from the terminal to the Arduino...
if(Serial.available() >0){
incoming_char=Serial.read(); //Get the character coming from the terminal
Serial1.print(incoming_char); //Send the character to the cellular module.
}
}
readSerialString();
Serial1.println("AT+CMGF=1"); // set SMS mode to text
Serial1.print("AT+CMGS=");
Serial1.print(34,BYTE); // ASCII equivalent of "
Serial1.print(serInString);
Serial1.println(34,BYTE); // ASCII equivalent of "
delay(500); // give the module some thinking time
Serial1.print(txtmsg);
Serial1.println(26,BYTE); // ASCII equivalent of Ctrl-Z
delay(15000); // the SMS module needs time to return to OK status
}
Gracias por su colaboracion