# Trying to find location in GSM network

I am using a GSM modem by Simcom SIM 800E. I'm interfacing it over the serial link.

I am passing command AT+CSCB to get the location. But I am not getting it. I just get the response OK.

Can someone tell me the correct way to use this command?

The modem works fine while sending and receiving SMS.

• I am not having any code as such, I am just giving these commands in terminal. ALso The modem works fine while sending and receiving SMS. – gpuguy Jun 20 '13 at 6:50
• For reference: here is the official GSM 07.05 documentation, which defines the +CSCB command. – Keelan Jun 20 '13 at 7:03
• Camil's answer is correct, try AT+CENG=2 and see what you get. That'll give you some cell information but I think it'll still be up to you to find the relation between a cell and its location. I believe places like Google do it by just driving around and recording, but maybe your local phone providers would be able to provide the data. – PeterJ Jun 20 '13 at 7:26
• @PeterJ true, although Google uses wifi networks I believe. If the location doesn't have to be that accurate, a map of mobile networks would be sufficient. – Keelan Jun 20 '13 at 7:39
• Just had a look and the following might be useful stackoverflow.com/questions/82184/public-cell-id-databases – PeterJ Jun 20 '13 at 7:43

AT+CSCB is to "Select Cell Broadcast SMS Messages" - not to get a location: (datasheet, p. 70)

What you can try is explained here. First send the Test Command, AT+CSCB=?. You should get a response with a list of supported modes. Then you can try the Read Command, AT+CSCB? and you should get the current mode and so. At last you can try a Write Command, AT+CSCB=<mode> with <mode> one of the modes listed in the response to the Test Command. You can verify this change with the Read Command AT+CSCB?.

When you do want a location, try what PeterJ says in the comments on the question: send a AT+CENG=2. This sets the engineering mode (whatever that may be) and replies with all kinds of network information. Refer to the datasheet for an exact list, but it would include:

< mcc > : mobile country code
< mnc > : mobile network code
< bsic > : base station identification code
< lac > : location area code

With the bsic, you can use this to find your location. Other return variables may be useful as well.

• What exactly is "Cell Broadcast SMS Messages" ? – gpuguy Jun 20 '13 at 7:00
• @gpuguy it's a technique to send broadcast messages to multiple users in a network at once, see also here. – Keelan Jun 20 '13 at 7:01
• The post referred to by the link in the last sentence has been removed. – rudolfbyker Feb 8 at 22:00
• @rudolfbyker thanks, I have updated it with a link to the Wayback Machine. – Keelan Feb 9 at 15:06

open up any terminal window, And send the following AT commands. Here I am using Putty.

AT+CGATT =1 // to attach GPRS.

AT+SAPBR =3,1,”CONTYPE”,”GPRS” //activate bearer profile.

AT+SAPBR =3,1,”APN”,”RCMNET”

AT+SAPBR=1,1

AT+SAPBR=2,1

AT+CIPGSMLOC=1,1 //to get gsm location, time and date.

AT+CIPGSMLOC=2,1 //to get gsm time and date

AT+SAPBR =0,1 //to deactivate bearer profile.


If everything works fine, then your terminal will look as follows: Here is the screenshot of terminal

So if everything goes well, you will get the longitude and latitude of your cell tower in degrees.