Jump to content
jayanthd

LinkSprite SIM900 modem not working

Recommended Posts

My friend recently purchased SIM900 modem from LinkSprite (SIM900 Shield). I wrote a code to receive SMS and control devices based on received SMS but it was not working. After debugging I found that the modem was giving ERROR as response for the below two commands.

 

"AT+CPMS=\"SM\",\"SM\",\"SM\"\r\n"

 

and

 

AT+CNMI=2,1\r\n

 

May I know why LinkSprite modem gives ERROR for these commands. I have tested the code with other SIM900 modems and they all respond with OK for these commands. Due to LinkSprite SIM900 giving ERROR my project is pending. Please provide a solution. Should we update the firmware of SIM900 modem ? If yes, how to do that.

Share this post


Link to post
Share on other sites

If the other SIM900 modems has the same SIM900 module as Linksprite modem? 

The LinkSprite Modem has number S2-1040S-Z095P and my other SIM900 modem has number S2-1040S-Z092Z. I also have another SIM900A modem and they all respond with OK for AT+CPMS="SM","SM","SM and AT+CNMI=2,1 commands and my project works well with the other modems but the other modems are not Shields and hence I can't stack them on Arduino. I purchased LinkSprite SIM900 because I can stack it on Arduino but it is not responding with OK for these two commands and it is giving ERROR for these two commands and hence my project is pending. If I use my other modems then my project works fine but doesn't work with LinkSprite SIM900 modem. Please provide a solution otherwise the LinkSprite modem will be of no use to me. I have to send those commands once on system startup so that the system will be ready to receive new SMS. Based on new SMS notification that is +CMTI: "SM",x response I am reading the SMS at index x and doing further tasks.

Share this post


Link to post
Share on other sites

We test the two command, both return OK. 

 

SIM900 AT command

 

Can you test the AT command use only UART communicate directly ?

 

You can use the following code to test AT command: (here is the AT command document:https://s3.amazonaws.com/linksprite/Shields/SIM900_GPRS/SIM900_ATC_V1_00.pdf )

 

 //Serial Relay - Arduino will patch a 
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART 
 
#include 
 
SoftwareSerial GPRS(7, 8);
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0;     // counter for buffer array 
void setup()
{
  GPRS.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);             // the Serial port of Arduino baud rate.
 
}
 
void loop()
{
  if (GPRS.available())              // if date is comming from softwareserial port ==> data is comming from gprs shield
  {
    while(GPRS.available())          // reading data into char array 
    {
      buffer[count++]=GPRS.read();     // writing data into array
      if(count == 64)break;
  }
    Serial.write(buffer,count);            // if no data transmission ends, write buffer to hardware serial port
    clearBufferArray();              // call clearBufferArray function to clear the storaged data from the array
    count = 0;                       // set counter of while loop to zero
 
 
  }
  if (Serial.available())            // if data is available on hardwareserial port ==> data is comming from PC or notebook
    GPRS.write(Serial.read());       // write it to the GPRS shield
}
void clearBufferArray()              // function to clear buffer array
{
  for (int i=0; i    { buffer=NULL;}                  // clear all index of array with command NULL
}

Share this post


Link to post
Share on other sites

People please don't buy LinkSprite SIM900 modem. It is only good for sending SMS. It cannot be used to receive SMS. I have tried all the below AT Commands with LinkSprite SIM900 and it gives ERROR for all the commands.

 

I have given these commands

 

AT+CPMS?\r\n

AT+CNMI?\r\n

AT+CPMS=\"SM\",\"SM\",\"SM\"\r\n

AT+CNMI=2,1\r\n

Share this post


Link to post
Share on other sites

People please don't buy LinkSprite SIM900 modem. It is only good for sending SMS. It cannot be used to receive SMS. I have tried all the below AT Commands with LinkSprite SIM900 and it gives ERROR for all the commands.

 

I have given these commands

 

AT+CPMS?\r\n

AT+CNMI?\r\n

AT+CPMS=\"SM\",\"SM\",\"SM\"\r\n

AT+CNMI=2,1\r\n

Did you try to use the UART communicate directly? By this way , you can check if the module is well .

Share this post


Link to post
Share on other sites

I used a 5V 2A external power adapter and now all the commands work but I don't know why those two commands still doesn't work when USB power is used. I have another new problem. After using external power for the modem, I tried to use USB power and the modem turns OFF after 5 seconds after turning on the modem.

Share this post


Link to post
Share on other sites

I used a 5V 2A external power adapter and now all the commands work but I don't know why those two commands still doesn't work when USB power is used. I have another new problem. After using external power for the modem, I tried to use USB power and the modem turns OFF after 5 seconds after turning on the modem.

It's better to use an external power adapter. The module need a higher current when setting up.

Share this post


Link to post
Share on other sites

Hi Chain,

 

I also recently bought 2 linksprite SIM900 devices:

 

http://store.linksprite.com/sim900-gprs-gms-shield/

 

And the blue and white one. I connected the SIM900 to my PC using TTL2USB as seen in the attachment. However when I send AT commands, the SIm900 does not respond. I even tried different PC's and still not response. Can you please assist

 

Connection:

Tx of SIM900 to Rx of TTL2USB

Rx of Sim900 to Tx of TTL2USB

GND of Sim900 to GND of TTL2USB

 

On both of these SIm900's they are not responding to AT commands and I'm using UART pins of the device

 

Please can you assist.

 

Regards,

Thandanani

post-4477-0-09955200-1429190223_thumb.jpg

Share this post


Link to post
Share on other sites

Hi Chain,

 

I will test the TTL2USB today and get back to you. I have been setting the baud rate to 9600

Please set the baud rate to 19200, because the SIM900 module has a default baud rate 19200.

Share this post


Link to post
Share on other sites

Hi Chain,

 

I have tried sending AT command to SIM900 using realterm and still the SIM900 is not responding. I see that Tx LED on the TTL2USB blinks everytime I send the AT command, but Rx does not respond....

 

Any other ideas that I can try, please this is delaying my project :-(

Share this post


Link to post
Share on other sites

Hi Chain,

 

I will test baud rate 19200. Jayanth used a baud rate of 9600 and worked OK, can you explain that.

 

The TTL2USB device is working OK. I tested using this:

 

http://www.instructables.com/id/Usb-to-SerialTTL-adapter/

 

Regards,

You need firstly set baud rate at 19200, so that you can use the AT command to change the baud rate to 9600 or others.

Share this post


Link to post
Share on other sites

Hi Chain,

 

I have tried sending AT command to SIM900 using realterm and still the SIM900 is not responding. I see that Tx LED on the TTL2USB blinks everytime I send the AT command, but Rx does not respond....

 

Any other ideas that I can try, please this is delaying my project :-(

Did you press the power on button of SIM900 shield ?

Share this post


Link to post
Share on other sites

Hi Chain,

 

This SIM900 power button was pressed and the GREEN LED was ON, the network status LED was also flashing. I will try and set the baud rate to 19200 using the below command on realterm

 

AT+IPR=19200

 

I will update you on the result of this command shortly.

Share this post


Link to post
Share on other sites

Hi Chain,

 

As I mentioned before, when I send AT command to SIM900, I dont get response from it. I'm sending a simple AT command and no response on the realterm serial program. I have tested that the TTL2USB is OK.

Share this post


Link to post
Share on other sites

Hi Chain,

 

The modem is now receiving the AT commands. I just needed to switch to Xduino on the board.

 

I picked up another issue while testing the modem, it seems like I cannot receive SMS. I can send an SMS from the modem successfully however I cannot receive SMS. Can you advise on this. After sending SMS, i get this +CMTI: "SMS",3 and NO SMS is shown.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×