SIM800L GPRS Module_Part 02 SMS Activated Devices

I hope you have watch my previous post regarding SIM 800L ATcommands. It is the basic and important part to understanding the working of SIM 800L module. Now in easy mades shall we go for more advance part that to understand the way of applying this module in to practical.

Watch before start the project

You know we can sen SMS and read SMS using this module. Once we received a massage we can read it and also we can send any word(texts). That text massage facility can be used as a special command. If we can get that command filtering other text massages, we can use those as a pass-code to activate a device or to send another command. 1st we have to filter our sms which is to be taken as commands out of other SMSs. Then assign the massage to a variable . after having red the variable you can do you activity.

Therefore, i change and made updates to sim800l Library. because sim 800l library can only get the massage details but we need only massage body. I will give you all the links at the end of this page.

Wiring part is same as my previous lesson PART 01, If you have not read that lesson, please read it. Only deference is i have added an LED to pin number 12 of Arduino Uno board.

Only for understanding I have added an LED if you want to operate AC device or any high volt device, you can add a relay instead of LED. I hope you know how to add a relay, but for beginners I have added that circuit below.

Following are the pin connection

If the wiring part is completed upload the codes

Our code is like this, If you want to On the device you have to send "#ON" without comma and also if you want to off the device you have to send an sms as "#OFF". the # mark is the identity to understand this device it as a command to active arduino code. 

If you read the code, you can make more improvements to this code.

Download the coding file and library from the link given below.

      Click on following to download Library and codes


If you have any doubt, please feel free to put a comment below.


  1. hello.. i have given shown in the video,currently i am facing problem in detecting the input message #ON , in serial monitor it is showing only 'Ready to work'.. i have waited for long time..for further process..but nothing is happening , plz help me ..actually my btech project is mainly related to this concept,so please help me, my mailId : [email protected]

    1. First check with AT commands to make sure your device is working propperly

  2. I wrote AT in serial monitor and it shows OK but when i wrote AT+CMGF=1(to turn it into text mode) it shows error. what does this mean? is my device working well or it is not working properly? tell me.. i am a beginner,i don't have much knowledge in this, please help me.

    1. your device is working well, but check whether your sim card is working and in the correct direction.

  3. hi sir,
    is there any configuration before using the module .
    i do one project by using sim800l module in my project i need the sms from the module in that sms i need the gps values (lat,long).... i write one code for the process but it is not working plz tell me the process..

  4. SIM800L module has no GPS facility. No need to do any special configuration.

  5. hi sir,
    I got these error upon compiling:

    C:\Users\xxx\Documents\Software\Arduino\arduino-1.0.6\libraries\Sim800lEM\Sim800l_EM.cpp: In member function 'int Sim800l::getCountsms()':
    C:\Users\xxx\Documents\Software\Arduino\arduino-1.0.6\libraries\Sim800lEM\Sim800l_EM.cpp:233: error: ISO C++ forbids comparison between pointer and integer
    C:\Users\xxx\Documents\Software\Arduino\arduino-1.0.6\libraries\Sim800lEM\Sim800l_EM.cpp:242: error: invalid conversion from 'const char*' to 'int'
    C:\Users\xxx\Documents\Software\Arduino\arduino-1.0.6\libraries\Sim800lEM\Sim800l_EM.cpp:245: error: invalid conversion from 'const char*' to 'int'

  6. It shows "Error compilling" Would you please help?

    C:\Users\AGB\Documents\Arduino\libraries\Sim800l_EM\Sim800l_EM.cpp: In member function 'int Sim800l::getCountsms()':
    C:\Users\AGB\Documents\Arduino\libraries\Sim800l_EM\Sim800l_EM.cpp:231: error: ISO C++ forbids comparison between pointer and integer
    C:\Users\AGB\Documents\Arduino\libraries\Sim800l_EM\Sim800l_EM.cpp:239: error: invalid conversion from 'const char*' to 'int'
    C:\Users\AGB\Documents\Arduino\libraries\Sim800l_EM\Sim800l_EM.cpp:242: error: invalid conversion from 'const char*' to 'int'

  7. Sir,I got same type of module..Led blinks every second..sim is inserted correctly..But is doesn't register to network...signal strength is full..I tried at commands ..Most of them worked..But when I tried AT+COPS? it returns to zero..By this I came to know its not registering..Plzz help me

    1. insert a sim and get a phone call to module and check whether you can hear ringing tone

  8. Hi Sir,
    I got this error 'class Sim800l' has no member named 'AT'

  9. Due to its cost effective and reliable features, a large number of entrepreneurs have already started to use short message service as an effective marketing tool padisoft company

  10. Popular reality TV shows like Australian Idol, Big Brother, Dancing with the Stars, American Idol, and others, use SMS technology to generate millions of dollars of revenue directly from the SMS votes that will be used to determine the winners.


Copyright © 2013 Easy Mades