Go Down

Topic: TEXTING WITH PS/2 KEYBOARD +DUMILINOVE+ GSM SHEILD (Read 3557 times) previous topic - next topic


I would like to have keypresses on a ps2 keyboard connected to an Arduino Dumilinove sent as text messages to a preset number when I press the enter key on keyboard. the maximum number of characters will not exceed 100. I would like to use this gsm sheild from sparkfun.
I have  connected keyboard to arduino and the ascii charecters are being output  trough the tx pin at 9600 baud. I can see what is being typed on the display.
I would be greatful if some one could point me in the right direction as to how to make the gsm shield send text messages?  


Well, you could start by reading this http://www.sparkfun.com/Code/Cellular_Shield_Passthrough.zip which is linked to from the SparkFun page, and does exactly what you want.

Did you look at the documentation available or just ask here first?



There is a sample sketch available on the sparkfun site you linked. Near the bottom of that sketch, it says:
To send a txt message:
AT command - AT+CMGF=1
This command sets the text message mode to 'text.'
AT command = AT+CMGS="xxxyyyzzzz"(carriage return)'Text to send'(CTRL+Z)
This command is slightly confusing to describe. The phone number, in the format (xxx)yyy-zzzz goes inside double quotations. Press 'enter' after closing the quotations.
Next enter the text to be send. End the AT command by sending CTRL+Z. This character can't be sent from Arduino's terminal. Use an alternate terminal program like Hyperterminal,
Tera Term, Bray Terminal or X-CTU.

Seems pretty simple to me. You have the text to send, the phone number to send it to, and the command to send the text message. Is there something more you need?


And you've cross posted here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281611273/5#5 so things are gonna get ugly...


so things are gonna get ugly...

Yeah I noticed that too.

Mowcius gets out his flamethrower  ;D


not Ctrl+Z

Well, it would appear that you are the one with the reading comprehension problem. You send a phone number the Arduino, from the PC. The Arduino stores it.

You send some text to the Arduino to form the body of the message. The Arduino stores it.

Under the right circumstances, the Arduino uses the stored phone number, the stored message, a carriage return AND a control Z to construct the AT command that makes the SMS module sit up and pay attention.

Now, where are you sending the phone number to the Arduino from? Where are you sending the text of the message from? What circumstances would trigger the Arduino to formulate a command to the SMS chip?

Why are you screaming?



Lets start over. You said you wanted to send a text message using the Arduino, GSM shield, and PS/2 keyboard.

I guess the keyboard answers the question of where the data is coming from.

The thing that triggers the Arduino to send the command to the GSM and the thing that triggers the GSM to send the text message do not have to be the same event.

The Arduino will need to collect the phone number in a String object. How will the Arduino know when the phone number entry is complete? Carriage return?

The Arduino will need to collect the message in a String object. How will the Arduino know that the message is complete? Carriage return?

When the phone number entry is complete, and the message entry is complete, the Arduino needs to construct a command to send to the SMS module.That command string needs to include the phone number, a carriage return, the message, and a control Z.

The control Z is required because messages can have carriage returns in them, so carriage return is not a good end of message marker.

If you want to limit yourself to messages without carriage returns, so that you can use the carriage return as an end of message marker, that's fine with me. The command sent to the SMS module still needs to end with a control Z. The Arduino has no problem generating the control Z.


I would if I had a ps/2 keyboard, a GSM shield, a spare sim card for the shield, and the answers to the questions I asked.

PM me if you are serious. Half the money up front so I can get the stuff I don't have. The other half at the end.


Jan 14, 2011, 10:46 pm Last Edit: Jan 14, 2011, 10:59 pm by zoomkat Reason: 1
why don't you take up the offer, it seems to me it will be the easiest $200.00 you could make.

How about $2k? No? Then if you do it yourself that would be the easiest $2k you could make!  :)
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.


The arduino will know that the message is complete when it sees the ascii code for "enter" in the string.

Can you post the string you are going to send to the arduino? I think "enter" is actually two ascii codes combined.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.


I beleive it is 13.

Probably closer to 13 and 10 (carrage return and line feed).
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Go Up