RS232 to GSM modem?

Hi,

I have a GSM modem that I would like to use with the Arduino. The modem has an RS232 25 way D type connection and i usually connect it to my PC with a 9 pin Rs232 adapter. Communication is over hyperterminal using AT commands.

The plan is to have the Arduino issue these AT commands to the modem to send SMS messages and receive SMS Messages. The modem is not very good at buffering SMS so i was thinking of using the Arduino to store the incoming SMS messages as an intermediary buffer between PC and modem.

But anyway, what do I need to communicate over RS232 to the modem from an Arduino?

Thanks in advance!

Here's the modem datasheet:

http://www.gismomodem.co.uk/datasheet/datasheet.html

If it really is RS232 then you need a level-shifter chip, the oft quoted one is the MAX232 but there are many others that do the same job.


Rob

For the most part, the command set for GSM DCEs is standards based, so you will find useful libraries and examples of code that you can adapt or even just use as-is to talk to your modem. One library is here:
http://labs.arduino.cc/GPRS/Index

Except for the MEGA type, Arduinos have only one hardware serial line. So if you have to talk to the PC on one and the modem on another, you will have to either use software bit-banging serial on one side or the other, or move to a MEGA.

Arduinos have very little RAM, so using one for something that requires queuing of data is maybe not a good fit. Just 10 SMS messages could use most of the memory on an UNO. Again, a MEGA type would be a better fit.

Weller:
The plan is to have the Arduino issue these AT commands to the modem to send SMS messages and receive SMS Messages.

Wouldn't it be simpler just to connect the modem into the PC and write a PC application (or grab some freeware) to do whatever sending/receiving you have in mind? I guess you would have to write something on the PC anyway to drive the Arduino. So, why not put the whole solution there?

Fair point, and yes I already have a PC application that communicates directly to the modem and issues commands and buffers and processes incoming SMS messages. The problem is that if the PC goes down the messages are burned out as the modem has minimal buffer capability. Anyway this is a secondary purpose, i was really only trying to interface the arduino to the modem to create a standalone project, not pc connected. Also i have an SD data logger shield with RTC I plan on using to store messages.

Would something like this be what I need?

http://www.ebay.co.uk/itm/Mini-MAX3232-RS232-Shield-Module-Arduino-Compatible-/270941700769#ht_3299wt_1163

How easy is this to set up do you think?

That unit looks a little on the expensive side; I paid $7 for two shipped, but it should do the job (what I bought looks just like this one: http://www.ebay.co.uk/itm/RS232-To-TTL-Converter-Module-Built-in-MAX232CPE-Transfer-Chip-With-4PCS-Cables-/110769034040?pt=UK_Computing_Other_Computing_Networking&hash=item19ca595338). Using it is pretty simple--connect your modem to the DB9 connecter, Vcc and GND to +5V and ground, RX to the RX pin on your Arduino, and TX to the TX pin on your Arduino.

If you want to use SoftwareSerial instead, connect RX and TX to whatever pins you want to use.