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).

If you like my instructables feel free to vote for me (i'm getting into RC and could really use a gopro for my tricopter).

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!

Arduino & sony ericsson: gsm shield hack2

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:

  • Fill in 0 in the SMSC area (we don't need this)
  • Fill in the number of the cellphone you want the arduino to send a message to (don't forget country node)
  • .Set the Alphabet Size on 7 if it isn't already
  • Lets start with filling in Hello world
  • Press convert
  • Copy the AT+CMGW=XX (XX can be any number)
  • Copy the PDU coded string
  • 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!


    Tag cloud

    make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel