Issue to achieve connection with internet in SIM900A

Hello all,

As I am working on one of the project where we use gsm module which is SIM900A and pushes sensor data into the server through GET POST method. but the this is we are not able to achieve connection with the internet through SIM900A module. Can anybody please help me to solve this to complete the entire project. As the only remain part of the project is this only.

Arduino code for the same is posted below.

#include <SoftwareSerial.h>
#include <String.h>

String pid=“20170101”;
String timestamp=“2017-05-05 11:10:20”;
SoftwareSerial mySerial(6,5);//rx, tx

void setup()
{
mySerial.begin(115200); // the GPRS baud rate
Serial.begin(115200); // the GPRS baud rate

Serial.println(“start”); //to check that program starts or not
delay(500);

mySerial.println(“AT+CSQ”);
delay(500);
ShowSerialData();

mySerial.println(“AT+CGATT?”);
delay(500);
ShowSerialData();

mySerial.println(“AT+CGATT=1”);
delay(500);
ShowSerialData();

mySerial.println(“AT+SAPBR=3,1,“CONTYPE”,“GPRS””);//setting the SAPBR, the connection type is using gprs
delay(2000);
ShowSerialData();

mySerial.println(“AT+SAPBR=3,1,“APN”,“www””);//setting the APN, the second need you fill in your local apn server
delay(2000);
ShowSerialData();

mySerial.println(“AT+SAPBR=2,1”);//setting the SAPBR, for detail you can refer to the AT command mamual
delay(1000);
ShowSerialData();

mySerial.println(“AT+HTTPINIT”);
delay(1000);
ShowSerialData();

mySerial.println(“AT+SAPBR=1,1”);//setting the SAPBR, for detail you can refer to the AT command mamual
delay(1000);
ShowSerialData();
}

void loop()
{
String web = “AT+HTTPPARA=“URL”,“http://iepmcs.tk/add3.php?ts=” + timestamp +”&pid=" + pid + “&dt=1&at=0&nt=0"”; //timestamp is from rtc ds1307 (code for that is not attach here).

mySerial.println(web);
delay(2500);
ShowSerialData();

mySerial.println(“AT+HTTPPARA=“CID”,1”);
delay(500);
ShowSerialData();

mySerial.println(“AT+HTTPACTION=0”);
delay(500);
ShowSerialData();

delay(5000); //wait for 5 second
}

void ShowSerialData()
{
while(mySerial.available()!=0)
Serial.write(mySerial.read());
}

bhavikbhansali:
Can anybody please help me to solve this to complete the entire project.

I don't see a project. Maybe I am blind?

ieee488:
I don't see a project. Maybe I am blind?

No, you are not blind. But the thing is I just put the code here as I don't have any photo or other material to post it here

I don't have any photo or other material to post it here

You must have SOME serial output.

bhavikbhansali:
No, you are not blind. But the thing is I just put the code here as I don’t have any photo or other material to post it here

It is extremely lazy to just post code and say “here, fix this for me”.