SIM900 GSM module location traceout

I WANT TO PRINT THE LOCATION AS WELL AS LATITUDE AND LONGITUDE IN MY “ABC.PHP” SERVER. BUT I CANNOT ABLE TO DO IT … IAM ONLY USING ARDUINO AND SIM900… USING THIS CODE/ KINDLY HELP ME PLEASE!!! HERE IS MY CODE
mydata.begin(4800);
Serial.begin(9600);
// reset EC5
// mydata.println(“AT+RST”);
mydata.println(“AT+CGATT?”);
delay(200);
ShowSerialmydata();
mydata.println(“AT+SAPBR=3,1,“Contype”,“GPRS”” ); //connect to GPRS
delay(1000);

ShowSerialmydata();
mydata.println("AT+SAPBR=3,1,\"APN\",\"www\"");//setting the APN, the second need you fill in your local apn server
delay(5000);

ShowSerialmydata();
mydata.println();
mydata.println("AT+SAPBR=1,1");
delay(10000);
ShowSerialmydata();
mydata.println("AT+SAPBR=2,1");
delay(2000);
ShowSerialmydata();
mydata.println("AT+CLBS=2,1");
delay(5000);
ShowSerialmydata();
 mydata.println("AT+CLBS=2,1");
delay(5000);
ShowSerialmydata();
 mydata.println("AT+CLBS=1,1");
delay(5000);
ShowSerialmydata();
mydata.println("AT+SAPBR=0,1");
delay(2000);
ShowSerialmydata();

}
initially I WANT TO PRINT THE THE LOCATION BUT IT DOESNOT WORK…
Serial Monitor O/P-
⸮TQQ⸮
AT+SAPBR=3,1,“Contype”,“GPRS”

OK
AT+SAPBR=3,1,“APN”,“www”

OK

AT+SAPBR=1,1

OK
⸮A I⸮2,1
AT+CIPGSMLOC=2,1

ERROR
AT+CIPGSMLOC=2,1
AT+CIPGSMLOC=1,1

ERROR
AT+SAPBR=0,1

OK

Are you able to post hardcoded lat longs to the server first?

Sorry///Hardcoded latitude longitude means???

Means send dummy values to server and test if you are able to receive data.

yes… I have already done this. In fact I am able to sent sensor values to thinkspeak.

I guess you are getting IP address response back for AT+SAPBR=2,1. I see some junk characters above in the log.
If you are getting IP address and not able to send, it might be that data balance is not there on the SIM card.
But here you are getting the error for the command itself. May be the device firmware doesn’t support this command. Can you try updating to a different firmware to make sure.

ok… Sure… Sometimes it gives me IP and sometimes not…

what’s the firmware version you’re using ?
if it doesn’t include (_EAT) AT+CLBS won’t work
then you will get an error and maybe all next commands won’t work .
don’t use AT+CLBS cause it doesn’t work
even AT+CIPGSMLOC doesn’t give your location it gives the location of nearest network antenna from your service provider

also put extra delay in the start cause sometimes you need sometimes before the sim900 has power
so if you send any AT command before it’s ready for it , it will just fail .

use the firmware version that has _BT_EAT in the end
cause AT+CLBS is EAT command not in normal firmware version

and better use GPS or GNSS for location , if you want to use sim location then better get newer version with 4G and AGPS

1 Like

Then which firmware we should use for SIM900A module to get the location with AT+CIPGSMLOC=2,1 command??