I've recently purchased a cell shield, the Sagem hi-lo model metioned here http://www.libelium.com/squidbee/index.php?title=New_GPRS_module_for_Arduino_(Hilo_-_Sagem). While I'm able to use the example code on this page for making a call and sending an SMS, I cannot find any program to read a received SMS. Any sample libraries I've downloaded don't seem to work with this model.
The aim of my code is to receive an SMS to turn on the cell shield, which will return an SMS with a command, then receive another SMS, read it, and turn on an LED.
Any help would be very appreciated.
The aim of my code is to receive an SMS to turn on the cell shield
If the shield isn't on, is there any reasonable expectation that it will receive a text message?
I am also using a RTC along with this program so I can have the GSM Shield turning on every 10 or 20 mins to check the texts. That shouldn’t be a problem. My problem is getting the GSM Shield to read a text.
To turn on the unit I am using this code
gsm.TurnOn(9600); //module power on
gsm.InitParam(PARAM_SET_1);//configure the module
gsm.Echo(0); //enable AT echo
And in the void loop I have
Check_SMS(); //Check if there is SMS
void Check_SMS() //Check if there is an sms 'type_sms'
char pos_sms_rx; //Received SMS position
//Read text/number/position of sms
Serial.print("Received SMS from ");
Serial.print("(sim position: ");
if (del_sms==1) //If 'del_sms' is 1, i delete sms
if (error==1)Serial.println("SMS deleted");
else Serial.println("SMS not deleted");
This is all taken from an example library. But after sending a text i get this on the serial prompt.
Recieved text from (sim position 65534
. The GSM Shiels knows there is a text there but it isn’t reading or printing it.