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.

  • \$\begingroup\$ 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. \$\endgroup\$ – gpuguy Jun 20 '13 at 6:50
  • \$\begingroup\$ For reference: here is the official GSM 07.05 documentation, which defines the +CSCB command. \$\endgroup\$ – user17592 Jun 20 '13 at 7:03
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – PeterJ Jun 20 '13 at 7:26
  • \$\begingroup\$ @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. \$\endgroup\$ – user17592 Jun 20 '13 at 7:39
  • \$\begingroup\$ Just had a look and the following might be useful stackoverflow.com/questions/82184/public-cell-id-databases \$\endgroup\$ – PeterJ Jun 20 '13 at 7:43

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

enter image description here

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.

| improve this answer | |
  • \$\begingroup\$ What exactly is "Cell Broadcast SMS Messages" ? \$\endgroup\$ – gpuguy Jun 20 '13 at 7:00
  • \$\begingroup\$ @gpuguy it's a technique to send broadcast messages to multiple users in a network at once, see also here. \$\endgroup\$ – user17592 Jun 20 '13 at 7:01
  • \$\begingroup\$ The post referred to by the link in the last sentence has been removed. \$\endgroup\$ – rudolfbyker Feb 8 '19 at 22:00
  • \$\begingroup\$ @rudolfbyker thanks, I have updated it with a link to the Wayback Machine. \$\endgroup\$ – user17592 Feb 9 '19 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+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.

credits: link

| improve this answer | |

In SIM800 series you can use the commands AT+CIPGSMLOC or AT+CLBS. Both are location commands.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.