Arduino & Sony Ericsson: Gsm Shield Hack2




Introduction: Arduino & Sony Ericsson: Gsm Shield Hack2

Hi! A while back i wrote an instructable on how to use an old sony ericsson with arduino to read an incomming sms and perform an action depending on the content of the message (link). Or as simply shown in the video in the instructable: let the arduino turn the light on by sending an sms to an old phone! In this instructable i'll explain how to send an sms using arduino with an old sony ericsson.

Note: I consider this instructable to be an expension of my first instructable on this subject so in won't go through the setup (step 2 to 5 of my previous instrubtable). I strongly recommend reading it first if you're interested (it feels useless to just repeat the setup and al the other stuff over here).

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Setup a Connection!

just read my previous instructable from step 2 to 5. If you're interested in reading an incomming sms using an old sony ericsson phone i suggest reading the full instructable.

Step 2: Simply Use an Online PDU Encoder!

Just like in my previous instructable we'll be using:

The encoder allows you to make a PDU coded string with the phone number of the person you want to send a message to and the message itself. Once we have that PDU coded string we just simply send it to the sony ericsson using the arduino. This way you can by example let the sony ericsson send you a message to you when the arduino detects something; rising water, temperature, movement,.. You name it! Just follow these steps to create a correct PDU coded string:

  1. Fill in 0 in the SMSC area (we don't need this)
  2. Fill in the number of the cellphone you want the arduino to send a message to (don't forget country node)
  3. .Set the Alphabet Size on 7 if it isn't already
  4. Lets start with filling in Hello world
  5. Press convert
  6. Copy the AT+CMGW=XX (XX can be any number)
  7. Copy the PDU coded string
  8. Fill the data in the right place in the program (see next step)

Step 3: The Program!

It's even hardly a program, it's just a few lines of codes, it's really easy!

insert in the setup of the program:


Serial.println("AT+CMGF=0"); //sets the phone in PDU mode

delay(3000); //processing time

insert anywhere in the program: (not in the loop!!! you'll keep sending texts!)

Serial.println("AT+CMGW=24"); //copy from previous step

delay(3000); //processing time

Serial.print("0011000B912321436587F90000AA0BC8329BFD065DDF723619"); //copy from previous step

delay(3000); //processing time

Serial.write(26); // I don't know why this has to be here

delay(3000); //processing time

AND DONE! You now have send a sms to someone using arduino!

You can insert these lines of code in your program wherever you want to send an sms. I suggest not using the loop for obvious reasons. Note: unlike my previous instructable you'll be able to use the SoftwareSerial! But be aware that by using the Software serial you'll only be able to send a message but not read an incomming one due the small buffersize.

Step 4: You're Done!

Yep it's that simple..

If you do have some problems i recommend going over step 2 to 5 of my previous instructable, if you succeed in the test dial of step 5 you have successfully established a working connection between the arduino and sony ericcson. Make sure you put the needed lines of code (see step 2) into the setup of your program. If you have a working connection but still have problems it can only be a software error (as far as i know).

Good luck, feel free to contact me if you have a problem.

Support me by voting!

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020

    8 Discussions


    3 years ago

    Consider using Library to your arduino


    4 years ago

    Hi michvw,

    I follow all the steps using SE T290i. Why does the message (SMS) just stay in folder "unsent" in my HP? do you know what is possible cause of this?

    Thanks for your help.


    Reply 4 years ago

    Use AT+CMGS instead of AT+CMGW

    AT+CMGS sends the message to the recipient whiles
    AT+CMGW stores the message.


    5 years ago on Introduction


    i cant turn on or off the led / using sms from +21650016075 to +21621509433

    can you uplode me the cod because i cant use the PDU mode please help


    5 years ago

    Great work!
    Where did you carry out your inital research?

    I may be incorrect but you mention:
    Serial.println("AT+CMGS=24"); //copy from previous step

    Shouldnt this be:


    Reply 5 years ago on Introduction

    I corrected it, thanks!

    Unfortunately PDU info is spreaded across the internet, i learned from manny different sources, there was one 300+ page pdf file i found full of PDU instructions that i found verry interesting. I however don't have the link anymore.. I'm sorry..