Thank you for visiting → Compete For Nothing.com ← If you find anything useful leave me a comment and share. Interested in Rapberry Pi, Arduino, C#, Unity3D, Game Creation, VB.NET, learning and most important of all Sharing!.
Close Notification
Open Notification

Arduino MEGA 2560 R3 using ITead Studio Icomsat v1.1

Arduino MEGA 2560 R3 using ITead Studio Icomsat v1.1
GARD Pro Not Registered

Download the project files and guide below.

GARD Pro Not Registered

Icomsat v1.1 arduino mega 2560 library, Instructions and sketch

GARD Pro Not Registered

Thankyou Tiago Nobre for the info on how to get this working.

GARD Pro Not Registered

USED MATERIAL
1 – Arduino MEGA 2560 R3
1 – ITead Studio IcomSat V1.1
1 – Power Supply 12Vdc 1,5A
1 – Shunt pin Tx-Shild to Rx1-19 of Arduino
1 – Shunt pin Rx-Shild to Tx1-18 of Arduino

I used the Arduino IDE V1.0.1 and library annex where they changed the serial port and the PWR and RESET pin.

#include <SoftwareSerial.h> 
#include <GSM_Shield.h>

//**************************************************************************
char number[]="+39123456789";  //Destination number 
char text[]="hello world";  //SMS to send
byte type_sms=SMS_UNREAD;      //Type of SMS
byte del_sms=0;                //0: No deleting sms - 1: Deleting SMS
//**************************************************************************

GSM gsm;
char sms_rx[122]; //Received text SMS
//int inByte=0;    //Number of byte received on serial port
char number_incoming[20];
int call;
int error;


void setup() 
{
  Serial.begin(9600);
  Serial.println("system startup"); 
  gsm.TurnOn(9600);          //module power on
  gsm.InitParam(PARAM_SET_1);//configure the module  
  gsm.Echo(0);               //enable AT echo 

}


void loop()
{ 
  char inSerial[5];   
  int i=0;
  delay(2000);
  
    Check_Call(); //Check if there is an incoming call
    Check_SMS();  //Check if there is SMS 
    //Check data serial com 
    
    if (Serial.available() > 0) 
    {             
       while (Serial.available() > 0) {
         inSerial[i]=(Serial.read()); //read data  
         i++;      
       }
       inSerial[i]='\0';
      Check_Protocol(inSerial);
    }
       
}  

void Check_Protocol(String inStr)
{   
       Serial.print("Command: ");
       Serial.println(inStr);
       
  Serial.println("Check_Protocol");
  
    switch (inStr[0])
      {
       case 'a' :  //Answer        
           if (gsm.CallStatus()==CALL_INCOM_VOICE){
             gsm.PickUp();
             Serial.println("Answer");
           }
           else
           {
             Serial.println("No incoming call");
           }
         break;
       
    
       case 'c': // C  //Call
         
           Serial.print("Calling ");
           Serial.println(number);         
           gsm.Call(number);
        
         break;
          
       case 'h': //H //HangUp if there is an incoming call
         if (gsm.CallStatus()!=CALL_NONE)         
         {
           Serial.println("Hang");
           gsm.HangUp();              
         }
         else
         {
           Serial.println("No incoming call");
         }    
         break;
         
         
       case 's': //S //Send SMS
         Serial.print("Send SMS to ");
         Serial.println(number);
         error=gsm.SendSMS(number,text);  
         if (error==0)  //Check status
         {
             Serial.println("SMS ERROR \n");
         }
         else
         {
             Serial.println("SMS OK \n");             
         }
         break;
         }
   
    delay(1500);
    
    return;
 }
 
 
 void Check_Call()  //Check status call if this is available
 {     
     call=gsm.CallStatus();
     switch (call)
     {    
       case CALL_NONE:
         Serial.println("no call");
         break;
       case CALL_INCOM_VOICE:
         gsm.CallStatusWithAuth(number_incoming,0,0);        
         Serial.print("incoming voice call from ");     
         Serial.println(number_incoming);
         break;
       case CALL_ACTIVE_VOICE:
         Serial.println("active voice call");    
         break;
       case CALL_NO_RESPONSE:
         Serial.println("no response");
         break;
     }
     return;
 }
 
 
 void Check_SMS()  //Check if there is an sms 'type_sms'
 {
     char pos_sms_rx;  //Received SMS position     
     pos_sms_rx=gsm.IsSMSPresent(type_sms);
     if (pos_sms_rx!=0)
     {
       //Read text/number/position of sms
       gsm.GetSMS(pos_sms_rx,number_incoming,sms_rx,120);
       Serial.print("Received SMS from ");
       Serial.print(number_incoming);
       Serial.print("(sim position: ");
       Serial.print(word(pos_sms_rx));
       Serial.println(")");
       Serial.println(sms_rx);
       if (del_sms==1)  //If 'del_sms' is 1, i delete sms 
       {
         error=gsm.DeleteSMS(pos_sms_rx);
         if (error==1)Serial.println("SMS deleted");      
         else Serial.println("SMS not deleted");
       }
     }
     return;
 }

Dogecoin
Donate Dogecoins: DGkJRWQCyBUeXbenYz18LRN9X67aora9nz Whats This?

49 Comments

  1. Francisco · October 27, 2012 Reply

    I Warren!

    Can you send me the libraries that Tiago has used?

    Thanks!

    • warren · October 27, 2012 Reply

      Francisco you can download the library via the link under the image.

      • Rafael · January 6, 2013 Reply

        I will start to work on such a project in the cimong weeks. An Arduino will be connected to an LCD display that displays the translation from morse input. Way to input morse will be non standard. Project is to be used as a communication tool for a person with severe physical disabilities.

      • Thaslim · February 17, 2013 Reply

        hi warren,
        I am trying to send sms using arduino mega, icomsat v1.1.
        I am using IDE 1.0.3. power-12V, 1.0 A
        but in the serial monitor i cannot see anything other than this..

        system startup
        no response
        Received SMS from (sim position: 65534)

        no response
        Received SMS from (sim position: 65534)

        no response
        Received SMS from (sim position: 65534)

        no response
        Received SMS from (sim position: 65534)
        please help me regarding this..

        • warren · February 17, 2013 Reply

          I think you have not set the pins either on the board using the jumpers or in the library GSM_Shield.h

          another problem some people have is 12v power supply is too high and they have more luck using a 9v

  2. steph · November 1, 2012 Reply

    #include is no longer necessary

    • warren · November 1, 2012 Reply

      Hi Steph, What do you mean? Do you mean SoftwareSerial should be NewSoftSerial?

      • Steph · November 1, 2012 Reply

        No,
        It’s only a remark. I have a similar project using Icomsat and Arduino Mega (s (sismic detector: when an earthquake is detetected, a sms is sent with long/lat information and earthquake data).
        As the library given here has been modified to use Serial1 port, it is no longer necessary to use SoftwareSerial in your example, I think.

    • Everardo · January 5, 2013 Reply

      Hi allI’m working on an art piece at the meonmt which will decode morse but the difference is that the morse will be sent by human operated morse key so will obviously have to account for slightly variable timings. I have made some code in processing the idea being that i will use analog in from arduino and send that by serial to processing. I’m happy to post the code if anyone is interested? at the meonmt it jsut works with a key press.

  3. Steph · November 1, 2012 Reply

    jouin.eu/phpBB/viewtopic.php?f=15&t=24
    It’s in french
    I’m writting the code about sms (the code for detector and for gps is done).
    I see that I need an external 12V power supply for Icomsat shield…

  4. steph · November 4, 2012 Reply

    Instead of sms, is it possible to send e-mail via Icomsat?

    Thanks

    • warren · November 4, 2012 Reply

      Well I have not tried it yet but I will in a few weeks, but I found this..
      arduino.cc/forum/index.php?topic=86963.0;wap2

      If you get it going let me know, but I will give it a go soon as I can.

  5. Theo · December 20, 2012 Reply

    Hi Warren,

    First I’ld like to say a big THANKS !!!
    because a lot of people try to make working this board and you Did an incredible TUTO !!!
    So thank you :)

    I’m pretty new in the world on arduino,
    I’ve a ADK 2560 and an Icomsat 1.1 I’ve downloaded your Zip, and C/P your example,
    everything fine, but I don’t know why my COM monitor says :

    system startup
    no call
    no call
    no call
    […]

    Anyway, It seems my SIM900 can’t go on the network because i’ve :
    PWR Led :always RED Solid
    Status Led : always GREEN Solid (after launch)
    NET Led : blinking GREEN every 1 sec

    So I guess I’m not on the network ?? right ?

    Thank you for helping.

    All the Best.

    • Warren · December 20, 2012 Reply

      Hi Theo,
      I am very happy you found it useful. I found this in the specifications PDF.

      NETWORK LED STATUS:
      64ms On / 800ms Off = SIM900 not registered the network

      So it looks like your not registered on the network.

      • Theo · December 21, 2012 Reply

        Hi Warren,

        Thanks for you message, I read that also …. :(
        You just plug in and that’s it ? It’s working…
        so maybe I’ve a problem with my SIM ….
        I’ll double Check, but it’s strange you know because I can send and received phone call and SMS from my mobile…
        Anyway if someone have an advice, I’ld appreciate !
        Thanks

      • Patryk · January 5, 2013 Reply

        Hi There. Really nice project you have there. I was inseertted in implementing morse code in arduino, however I did i the other way around user flashes the flashligh or other source of light near the photo diode, and arduino board translates it into letters, works pretty well :) Btw. How did you configure your IDE to have serial monitor directly below the code in the same window (it’s pretty annoying to open serial monitor every time from the menu, and the Keyboard shotcuts always puts empy line in the code ).

        • warren · January 6, 2013 Reply

          Hi Patryk I would love to see how you implemented morse code, have you got an example? maybe you could share your project.
          :)
          Warren.

  6. Arduino MEGA 2560 R3 using ITead Studio Icomsat v1.1 ... | Arduino, vb.net, Unity3D, FPV | Scoop.it · January 6, 2013 Reply

    […] Icomsat_v1.1_arduino_mega_2560_library, Instructions and sketch. Thankyou Tiago Nobre for the info on how to get this working. USED MATERIAL 1 – Arduino MEGA 2560 R3 1 – ITead Studio IcomSat V1.1 1 – Power …  […]

  7. Michael · January 6, 2013 Reply

    Please post the Visual Basic source code for this project please.

  8. Grant · January 25, 2013 Reply

    Can you tell me what version of firmware the SIM900 is using. Use the AT+CGMR command. I need to know as it will indicate what HTTPPARA parameters it will support. Thanks

  9. Thaslim · February 9, 2013 Reply

    hello everyone,
    i am a newbiee to arduino…. a am getting these errors when i compiled the above code…please help me..

    sketch_feb09a:7: error: ‘SMS_UNREAD’ was not declared in this scope
    sketch_feb09a:11: error: ‘GSM’ does not name a type
    sketch_feb09a.ino: In function ‘void setup()’:
    sketch_feb09a:23: error: ‘gsm’ was not declared in this scope
    sketch_feb09a:24: error: ‘PARAM_SET_1’ was not declared in this scope
    sketch_feb09a.ino: In function ‘void Check_Protocol(String)’:
    sketch_feb09a:62: error: ‘gsm’ was not declared in this scope
    sketch_feb09a:62: error: ‘CALL_INCOM_VOICE’ was not declared in this scope
    sketch_feb09a:77: error: ‘gsm’ was not declared in this scope
    sketch_feb09a:82: error: ‘CALL_NONE’ was not declared in this scope
    sketch_feb09a.ino: In function ‘void Check_Call()’:
    sketch_feb09a:117: error: ‘gsm’ was not declared in this scope
    sketch_feb09a:120: error: ‘CALL_NONE’ was not declared in this scope
    sketch_feb09a:123: error: ‘CALL_INCOM_VOICE’ was not declared in this scope
    sketch_feb09a:128: error: ‘CALL_ACTIVE_VOICE’ was not declared in this scope
    sketch_feb09a:131: error: ‘CALL_NO_RESPONSE’ was not declared in this scope
    sketch_feb09a.ino: In function ‘void Check_SMS()’:
    sketch_feb09a:142: error: ‘gsm’ was not declared in this scope

  10. Kelidel · February 14, 2013 Reply

    Hi Warren,

    Exactly which libraries should we have, which arduino are you compiling with.

    Thank you.

    Regards

    • warren · February 16, 2013 Reply

      up the top there is a download file, which contains the library, sketch and instructions. I always use the latest version of Arduino IDE.

  11. Alessandro · March 7, 2013 Reply

    Hi Warren,

    I’m using all the materials of Example (Arduino Mega2560 R3, Icomsat 1.1), I have successfully installed the librerya, I upload the “GSM_Shield_Test.pde” example ……. but it does not work :-( ((
    on serial visualize the “no call”.
    It seems that the commands sent via Serial1 not received …… I connected the two wires correctly as instructed.
    I have also tried to Arduino with 12V and 9V.
    I used Arduino IDE 1.0.1 and IDE 1.0.3……but not work…..do not execute commands (send on Serial1).

    HELP me!!!

  12. Miguel · July 11, 2013 Reply

    Hi everyone,

    I have installed the libraries supplied by Tiago as well as the hardware configuration and I am able to send SMS to any network. Unfortunately, I am not able to receive any SMS at all.

    Does anyone have a clue about this problem?

    • J.Carlos · March 25, 2015 Reply

      I have the same problem, I can not read the sms received, just tell me the position in the SIM

      Received SMS from (sim position: X )

  13. ntinda · August 25, 2013 Reply

    Hi. Am also doing a project like yours and but when I try to send a text am getting,
    system startup
    no response
    Received SMS from (sim position: 65534) . How did you manage to make your hardware send texts? Can you email me the library you used. Thnkx

  14. Florian Eggl · January 14, 2014 Reply

    Hi!
    I would like to use my IComsat V1.1 via UART and my PC! Communicating just with AT commands. So a setup without the Arduino! Tell me please if this will not work. I have my own FT232 for converting the TX and RX Signal. Can you please tell me once more which power supply I will need on which pin on the IComsat V1.1 board for powering on!! Also the voltage level for commuinicating via UART. Is it 5V or 3V? If it is 3V, is also 3,3V allowed?? On which pin should the TX and RX wire be connected for this configuration?
    Thank you very much
    BR, Florian

  15. Mauricio · February 28, 2014 Reply

    Hello Warren,

    I am new with arduino, I am trying to send a SMS with my arduino MEGA 2560 and with my sim900 but I can not. I am getting frustrated. I download your library and the sketch from your page but I am getting this error: ‘SMS_UNREAD’ was not declared in this scope. I am not using the power supply you mention, I am just using the power from the USB of my PC. Can you please help me with this.

    Thanks.

  16. Lucero · July 26, 2014 Reply

    Hi warren
    Great Job, but i have a question, the jumpers are conected in the same position?

  17. Josue · November 15, 2014 Reply

    Hello everybody!
    I already tried to connect the Sim 900 shield with the MEGA, but I really haven’t an idea, I try with a lot of libraries but I still can’t get that Works, help me please!!
    ┬┐Can somebody send me a file with the library complete?
    Thanks

  18. Jahanzaib · December 11, 2014 Reply

    Hi. The library is giving errors, some files are missing. I am really worried, please help me.

  19. fluckmic · February 12, 2015 Reply

    I have a Arduino Mega 2560 connected to a IcomSat V1.1 with a 12V power supply as suggested in this tutorial. I’m able to connect with the network and send sms from the board.

    I’m also able to receive calls and sms, but i cannot display the nummer or the text received in the sms. Is it possible that my SIM does not allow writing to the SIM?

    Thanks.

    Mike

  20. Arnas · February 13, 2015 Reply

    Thanks for the explanation, it is very helpful. I also changes gsm.TurnOn (4800) from the 9600 to the 4800

  21. Stefan · March 10, 2015 Reply

    Hello,

    thanks man! That works great. But it is also possible to make a HTTP Request with this libery? Maybe you can tell me how I can to this.

    Best greetings,

    Stefan

  22. Stefanmahr · March 10, 2015 Reply

    Hello,

    is it also posible to make a HTTP-Request with this libary? Maybe you can help me.

    Best greetings,

    Stefan

  23. BIGUA · May 4, 2015 Reply

    HI warren
    thank you soo much you realy saved my life it works perfictly

Leave a Reply to Steph Cancel reply