Getting Network Location using SIM900 GSM modules

How it works : 

The way the network location feature works is that the GSM device gets the location of the network tower it is connected to. The server in the network towers is programmed to a hard coded location coordinate values which can be retrieved by the GSM module through a GPRS connection.

On a side note, 

The SIM900/SIM800 modules just retrieve the tower location.But some advanced modules manufactured by Telit are having a feature where in they can triangulate their position with respect to three connected towers. The more number of towers are visible better is the locating accuracy. But we have to sign an NDA to get access to these AT commands to access the triangulated network location. This feature is also called AGPS.

In this post we will only be discussing the cell location feature of SIM900 module.

To get started we need to establish a network connection to retrieve the location, So lets set up a GPRS connection.

Text in RED is typed by me and text in GREEN is the response from SIM900 module.

Setting up GPRS connection

Set the connection type to GPRS




Set the APN to to “www” since i am using a Vodafone SIM card, It might be different for you, and depends on the network




Enable the GPRS




Query if the connection is setup properly, if we get back a IP address then we can proceed


+SAPBR: 1,1,”″



The command AT+CIPGSMLOC is used to retrieve the network date, time and location, 

Lets check the network date and time


+CIPGSMLOC: 0,2017/07/16,18:07:13


So that’s how the device responds with the network date and time

Now, Lets check the network location


+CIPGSMLOC: 0,78.151830,15.958542,2017/07/16,18:07:47


This is how we get the network location as Longitude and Latitude.

When we plot the points on map we get the approximate location of where our device is situated.

But this location is no way near the GPS location accuracy. The accuracy using network location can vary from few hundred meters to a kilometer depending on the distance between device and network tower.
This is to be noted that this command is only helpful in retrieving location of the device for emergency purpose when GPS signal is not available like in indoor locations or caves or tunnels. This can also be a low cost alternative compared to using the additional standalone GPS module.

For live demo watch this video, 


Also see :


2 thoughts on “Getting Network Location using SIM900 GSM modules”

  1. Hi,
    do you also know how to get gsm location with at+clbs?
    At+cgsmloc doesnt work anymore.
    With at+clbs i always get a 4 as response wich means dns error. I use the sim808

Leave a Comment