View Single Post
  #4 (permalink)  
Old April 26th, 2008, 07:51 PM
John Henderson
Guest
 
Posts: n/a
Default Mobile Laptop on EDGE/GPRS

Henry VIII wrote:

> We are interested in knowing which cell tower we are connected
> to, just prior to initiation of the GPRS session. Connection
> will be telemetry data, no voice. The mobile laptop with GPRS
> card will be camped on a cell site but not interacting with
> it. Then our server will attempt to initiate a connection to
> it. The GPRS network will find our laptop. Our laptop needs
> to know at that time (or immediately before) which cell site
> it is connected to so it can report that in its response back
> to the server. We prefer connections to be TCP-IP rather than
> circuit-switched. Does all this sound possible?


Assuming your modem card supports the necessary commands, this
will be easy. Below is an annotated log of a session with a
Siemens S55 phone. I'll start by using "AT+CREG?" to ask about
phone registration status.

AT+CREG?
+CREG: 0,1

OK

I'm now changing the "+CREG" behaviour to report cell ID as
well, and also give me unsolicited results. By "unsolicited
results" I mean that the phone will report all changes of cell
ID automatically, when they happen, without my entering any
more commands.


AT+CREG=2
OK

I'll ask again about registration status, and this time the LAC
and cell ID will be reported as well.

AT+CREG?
+CREG: 2,1,"1030","639E"

OK

LAC (location area code) is 1030 hex (4144 decimal), and cell ID
is 639E hex (25502 decimal).


+CREG: 1,"1030","1401"

The above is an unsolicited result code, showing me that the
phone has now camped on another cell (same LAC, but cell ID is
now 5151 decimal).

I'll now ask which network I'm using. This will show my SIM's
home network, because the second argument in the "+CREG:"
result above, "1", says that the phone is currently registered
on the home network (rather than roaming).

AT+COPS?
+COPS: 0,0,"Telstra"

OK

Now I want to see the registered network in numeric format, so
I'll ask for that.

AT+COPS=0,2
OK
AT+COPS?
+COPS: 0,2,"50501"

OK

The operator part of the result consists of a 3-digit country
code "505" (MCC = Australia), and a 2-digit network code within
that country (MNC = Telstra). Note that some countries (North
America) use a 3-digit MNC as well as a 3-digit MCC).

The reason I'm showing the MCC + MNC detail is that the cell ID
is only guaranteed to be absolutely unique if it consists of
the whole MCC + MNC + LAC + ID string, eg "505 01 1030 639E"

+CREG: 1,"1030","639E"

That was another unsolicited result showing that the phone
changed cell again.

Now I'll ask the phone to scan all possible channels (takes a
while) and give me a list of all visible carriers.

AT+COPS=?
+COPS: (2,"Telstra",,"50501"),(3,"vodafone
AU",,"50503"),(3,"YES OPTUS",,"50502)

OK

> Can you refer me to a Website where this information is
> available? We'll need to write the S/W to get the cell site
> ID from the card. We'll also need to be able to do a lookup
> of the cell site ID to determine its physical location.


Any version of GSM 07.07 (or the later 2G/3G replacement, 3GPP
27.007) will give you the full syntax of the above commands.
They're widely available on the net, including free official
downloads from www.etsi.org or www.3gpp.org

John
Reply With Quote