I use arduino Nano and Sim900 module. I want, when a message is received, Arduino to reply back "thanks"
to the sender.
My message receive function code is:
void recieveSms(){
Serial.print("\r");
delay(1000);
Serial.print("AT+CMGF=1\r");
delay(1000);
Serial.print("AT+CSCS=\"GSM\"\r");
delay(1000);
Serial.print("AT+CNMI=2,1\r");// set new message remind
delay(1000);
Serial.print("AT+CMGR=2\r"); // read message at position 2
delay(1000);
Serial.print("AT+CMGD=2\r"); // delete SMS at position 2
delay(1000);
}
that works, but how I can retrieve sender number from the message?