Go Down

Topic: SIM900 ICOMSAT 1.1 does not send sms (Read 11787 times) previous topic - next topic

ltiago90

The SIM900 is coupled to the arduino uno r3, I'm not using any wires.
The code:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
char flag=0;
void setup()
{
delay(30000);
mySerial.begin(19200);
Serial.begin(19200);
}
void loop()
{
    if(flag==0)
    {
      mySerial.print("AT+CMGF=1\r");
      delay(1000);
      mySerial.print("AT+CMGS=\"+5519993210000\"\r");
      delay(1000);
      flag=1;
    }
   
    if(flag==1)
      {
        mySerial.print("Hello SIM900 and Arduino!\r");
        delay(1000);
        mySerial.write(0x1A);
        delay(1000);
        flag=2;
      }
      if(flag==2)
        {
          Serial.println("OK!");
          delay(5000);
          flag=3;
        }
}

Appears OK message! but nothing is sent.

ameurbilel


krikho1994

Check this code,it can help you, I sent some SMS by it.

Code: [Select]
#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
 
void setup()
{
  SIM900.begin(19200);
  SIM900power(); 
  delay(20000);  // give time to log on to network.
}
 
void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
  digitalWrite(9, HIGH);
  delay(1000);
  digitalWrite(9, LOW);
  delay(5000);
}
 
void sendSMS()
{
  SIM900.print("AT+CMGF=1\r");                         // AT command to send SMS message
  delay(100);
  SIM900.println("AT + CMGS = \"+21267315xxxx\"");     // recipient's mobile number, in international format
  delay(100);
  SIM900.println("Hello ^^");        // message to send
  delay(100);
  SIM900.println((char)26);                       // End AT command with a ^Z, ASCII code 26
  delay(100);
  SIM900.println();
  delay(5000);                                     // give module time to send SMS
  SIM900power();                                   // turn off module
}
 
void loop()
{
  sendSMS();
  do {} while (1);
}

merci

I have problem, I used the example in library send sms, and in the serial monitor just appear Send sms messages, I waiting, and there is nothing happen,,
I am new in arduino user, please help....
thanks before

merci

#4
Apr 04, 2015, 01:50 pm Last Edit: Apr 04, 2015, 01:52 pm by merci
I use the icomsat 1.1 as the shield,, I hve just bought it two days ago,, what is the shield you use?
also,, I hve tried the other gsm example in library, like receive, make call, check modem, gsprs,, and problem is same
Help please...

dannable

The examples provided with the IDE are for the official Arduino GSM/GPRS shield, which uses the Quectel M10 chip, not the SIM900.

This section of the forum is for dealing with issues with the official shield.

Now we have got that out of the way, how have you got the I/O jumpers set on your IComsat?
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

merci

#6
Apr 04, 2015, 05:34 pm Last Edit: Apr 04, 2015, 05:44 pm by merci
The I/O, I just plug on the arduino uno
I have tried using the other tutorial which for sim900,, but itssame 
I am new i  arduino user, so I learning about that,,

dannable

#7
Apr 04, 2015, 06:01 pm Last Edit: Apr 04, 2015, 06:03 pm by dannable
Set the jumpers are per the (hopefully) attached photo. I've used yellow so they stand out.

Then use
Code: [Select]
SoftwareSerial SIM900(6, 7);
in the code krikho1994 posted above.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

merci

so I change the SoftwareSerial SIM900(7, 8); in  krikho1994 code with SoftwareSerial SIM900(6, 7);

merci

its works!!!
thank you so much you all especially for dannable,

merci

to dannable: why its must be pin 6 7??

dannable

#11
Apr 05, 2015, 09:29 pm Last Edit: Apr 05, 2015, 09:31 pm by dannable
They are the ones you selected with the jumpers. You can select any pair from D0 to D7, just change the software to reflect this. Unless you have good reason to, never use D0 & D1 because the hardware serial uses these pins, meaning Serial Monitor won't work.

On that shield D8 is reset and D9 is power.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

merci


frealy

Hai
 I'm also using icomsat 1.1 with arduino uno and follow this thread. After i read this article then i try, but it still cannot send sms by this code? why is it happen? can you help me dannable? i'm using krikho1994s code anyway.

dannable

So you have set the jumpers as per the photo, and changed the code to reflect this?

If so, have you tried a simple serial relay program just to test communications?
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Go Up