Jump to content


Photo

LinkSprite SIM900 modem not working

SIM900 GSM LinkSprite

  • Please log in to reply
26 replies to this topic

#1 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 08 January 2015 - 07:32 PM

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.



#2 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 09 January 2015 - 05:31 AM

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



#3 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 09 January 2015 - 06:39 AM

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.



#4 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 09 January 2015 - 07:36 AM

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...0_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.h>
 
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<count;i++)
    { buffer[i]=NULL;}                  // clear all index of array with command NULL
}


#5 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 09 January 2015 - 10:03 AM

  


#6 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 11 January 2015 - 04:38 PM

You have given AT+CNMI? and AT+CPMS?

 

Give AT+CMPS="SM","SM',"SM" and AT+CNMI=2,1 and show me the response.



#7 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 12 January 2015 - 07:58 AM

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



#8 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 13 January 2015 - 03:36 AM

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 .



#9 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 13 January 2015 - 10:57 AM

Yes, I have used UART directly and also I have used hardware UART. It is giving OK response for 

 

AT\r\n

AT+IPR=9600\r\n

AT+CMGF=1\r\n

 

commands.



#10 jayanthd

jayanthd

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 14 January 2015 - 03:04 PM

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.



#11 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 15 January 2015 - 01:47 AM

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.



#12 thandana

thandana

    Member

  • Members
  • PipPip
  • 10 posts

Posted 16 April 2015 - 01:17 PM

Hi Chain,

 

I also recently bought 2 linksprite SIM900 devices:

 

http://store.linkspr...prs-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

Attached Files



#13 thandana

thandana

    Member

  • Members
  • PipPip
  • 10 posts

Posted 16 April 2015 - 01:22 PM

Hi,

 

Please note that I can make a CALL to the SIM inserted to the SIm900 and have powered it with a 5V 2A adapter.



#14 thandana

thandana

    Member

  • Members
  • PipPip
  • 10 posts

Posted 16 April 2015 - 01:48 PM

Hi,

 

Please note that I'm using the Hardware Serial – D0/D1 connections. 



#15 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 17 April 2015 - 01:31 AM

Did you check if your TTL2USB module is well?

 

Did you set the baud rate of serial assistant at 19200 ?



#16 thandana

thandana

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 April 2015 - 02:57 PM

Hi Chain,

 

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



#17 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 20 April 2015 - 07:03 AM

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.



#18 thandana

thandana

    Member

  • Members
  • PipPip
  • 10 posts

Posted 20 April 2015 - 02:46 PM

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.instructa...ialTTL-adapter/

 

Regards,



#19 thandana

thandana

    Member

  • Members
  • PipPip
  • 10 posts

Posted 21 April 2015 - 07:46 AM

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 :-(



#20 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 22 April 2015 - 05:26 AM

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.instructa...ialTTL-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.







Also tagged with one or more of these keywords: SIM900, GSM, LinkSprite

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users