SMS ARDUINO USING MODEM GPRS

Hello I'm new in using arduino. I bought the following form: https://www.circuitsathome.com/mcu/inte ... gprs-modem I have the Arduino UNO and I don´t know what code I need in order to receive sms. All I want for now is to be able to receive a text message, such as OK and store that data in a variable. I have seen so many examples but I still haven´t found what I´m looking for. please help Thanks

What examples have you found using that modem?

None, I mean, using the same modem I couldn't find anything but I try with something similar. Because I believe that AT commands are the same for GPRS modem.(I´m not so sure about it, as I said before I´m new using Arduino) If you know some example I will appreciate if you share with me. Thanks

By the way this is the one that I have:https://www.circuitsathome.com/mcu/interfacing-arduino-to-usb-gprs-modem I think the link I posted before is different

You linked to a page that showed how to connect the GPRS modem and send it AT commands and see the responses.

Haver you got the modem connected and powered up and responding to AT commands?

I know the page show AT commands but I still don´t know the exacle code for receive sms and save the message into a variable.

Like I said I´m new using arduino so It´s have been very difficult and no, the modem is connected right but I don´t how to use AT commands just to receive a message like 'ok' and save 'ok' into a char variable.. the other things I need to do are easily programming

Arizona: I know the page show AT commands but I still don´t know the exacle code for receive sms and save the message into a variable.

Yeah, I know. I'm just tackling the problem one step at a time. First problem is to get the modem powered up and working, and understand how to send it AT commands and get responses back from it.

Have you got that working? Never mind what AT commands you need in order to receive SMS messages - can you send it any old AT command and read back the corresponding response?

If that's working then the next step will be to send the specific AT commands to access received SMS messages, but I don't know whether you're up to that point yet.

What do I need to do to power up the modem:https://www.circuitsathome.com/mcu/interfacing-arduino-to-usb-gprs-modem/comment-page-2#comment-13658 ? thanks

Do you have the USB Host shield, as shown on the the linked page?

Yes I have USB host shield rev2.0 07 Dec 2010

So what is the problem? The page says you can use the normal USB cable to the Arduino to power it all. There are links to the libraries required. There is a sample sketch linked too. Have you run that successfully? The page shows the commands you need to use to read text messages, so you need to take the sample sketch, and remove the part the gets commands from the serial port, and send the required commands directly within the sketch.

I really don´t understand what I need to do in order to receive a message and save it into a variable. I´m new using electronic devices so maybe is for that, I don´t know. But I really aprecciate if you post the code that I need because like I said I´m lost Thanks

But I really aprecciate if you post the code that I need because like I said I´m lost

You've already GOT the code you need. What YOU need to do is understand what that code is doing. Then, you can make changes to remove the stuff you don't need.

We don't really care when your homework is due. We aren't doing it for you!

I don´t want anyone to do nothing for me. I´m asking for help because I don´t know how to uses arduino. And like I said before and I said it again I can´t find anything similar in:https://www.circuitsathome.com/mcu/interfacing-arduino-to-usb-gprs-modem/comment-page-2#comment-13664
Thanks I guess

I´m asking for help because I don´t know how to uses arduino

The Arduino IDE comes with a set of worked programming examples - have you tried any of them?

Arizona: What do I need to do to power up the modem

You need to have the necessary hardware and connect it up appropriately. You've already posted a link to an article which shows you what is involved. Have you got the Arduino and modem hardware connected up properly yet? The article shows you how to write a sketch to send AT commands to the modem and get back AT responses. Have you tried doing that?

I have: Arduino nº1 USB Host Shield 2.0 for Arduino GPRS modem I connected all like this picture https://www.circuitsathome.com/wp/wp-content/uploads/2011/10/dx_gprs_modem_title.jpg shows. I have windows 7 so I installed putty in order to send AT commands to the modem and get back AT responses. AT commands for sms are used in this example http://www.arduino.cc/es_old/Tutoriales/SMS I also download the USB2B library which I found https://github.com/felis/USB_Host_Shield_2.0 because I believe without it I couldn´t make USB Host shield work. Despite the fact I did all this stuff and more I still don´t know how I make my modem works (I think the modem doesn´t do anything) I also don´t know what exacle code I need for receive a sms and save into a variable. I believe I have to use AT+CMGR (for read a message) I don´t know if I have to configure CMC etc.. So I´m still asking for help because I have nothing. THANKS

Arizona: I have windows 7 so I installed putty in order to send AT commands to the modem and get back AT responses. AT commands for sms are used in this example http://www.arduino.cc/es_old/Tutoriales/SMS

Have you connected to the modem using PuTTY and sent the AT commands to send and receive messages? You should be able to do that straight away without involving the Arduino at all, and I'm sure you'd find it gratifying to show that the modem does in fact work.

Writing a sketch to get the Arduino to do the same thing is not difficult. You need to send AT commands to the modem and read back the responses. The AT commands you send will be the same ones used with PuTTY. You have linked us to an example that shows exactly how to send AT commands and receive the responses. If you can't follow the example then either you have some learning to do, or you need to re-evaluate whether you're ready to tackle this project yet.

Can you explain why you chose this route? A GPRS shield would have been so much easier to use, without the significantly increased complexity of the USB host shield.

I would also suggest that you park this project for a while, and work through some of the tutorial pages, to get familiar with C programming, and the Arduino itself.