5

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.

Bence Kaulics
  • 6,353
  • 12
  • 33
  • 60
gpuguy
  • 1,618
  • 8
  • 31
  • 54
  • 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 06:50
  • For reference: [here](http://www.etsi.org/deliver/etsi_gts/07/0705/05.05.00_60/gsmts_0705v050500p.pdf) is the official GSM 07.05 documentation, which defines the `+CSCB` command. –  Jun 20 '13 at 07:03
  • 1
    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 07: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. –  Jun 20 '13 at 07:39
  • Just had a look and the following might be useful http://stackoverflow.com/questions/82184/public-cell-id-databases – PeterJ Jun 20 '13 at 07:43

3 Answers3

7

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.

  • What exactly is "Cell Broadcast SMS Messages" ? – gpuguy Jun 20 '13 at 07:00
  • @gpuguy it's a technique to send broadcast messages to multiple users in a network at once, see also [here](http://en.wikipedia.org/wiki/Cell_Broadcast). –  Jun 20 '13 at 07:01
  • The post referred to by the link in the last sentence has been removed. – rudolfbyker Feb 08 '19 at 22:00
  • @rudolfbyker thanks, I have updated it with a link to the Wayback Machine. –  Feb 09 '19 at 15:06
1

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.

credits: link

Hazem
  • 1,084
  • 4
  • 13
  • 15
bandejiya
  • 133
  • 5
-1

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