You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old gsm_location() - 2005-01-09, 22:02

Join Date: Jan 2005
Posts: 9
maht0x0r
Offline
Registered User
I was excited to see gsm_location in the API

what use the 4 magic numbers ?

mcc, mnc, lac, cellid

how do I map the numbers to real geography


here's an app to display them :

http://www.proweb.co.uk/~matt/gsm_location.py
Reply With Quote

#2 Old 2005-01-09, 23:36

Join Date: Jan 2005
Posts: 7
Location: Wellington, NZ
flash5standingby
Offline
Registered User
from : http://www.mobileshop.org/howitworks/engmode.htm

MCC Mobile Country Code, 234 for UK
MNC Mobile Network Code. MCC+MNC are sometimes combined to give the Network Code
LAC Location Area Code
CellID or CID Base Station Identity

A list of MMCs would be very useful.
Reply With Quote

#3 Old i mean, what use the numbers ? - 2005-01-09, 23:45

Join Date: Jan 2005
Posts: 9
maht0x0r
Offline
Registered User
I know what they mean but they re arbitrary

anyone know of a resource mapping the four figures into a geographical location?

mcc: 234
mnc: 10
lac: 2072
cellid: 12312

isn't going to help me do much on it's own

The latitude and longitude of the mast would do

Probably a pipe dream but they are going to have to open the info up if they want us to do anything. Perhaps it's worth some letters to Ofcom about uncompetitive behaviour =)
Reply With Quote

#4 Old 2005-01-10, 10:17

Join Date: Mar 2003
Posts: 68
nanderso
Offline
Regular Contributor
JFGI

http://www.yeldar.co.uk/MCC-MNC.htm

http://www.cisco.com/univercd/cc/td/...wr/mwrfmcc.htm

http://www.gsmworld.com/roaming/gsminfo/index.shtml
Reply With Quote

#5 Old 2005-01-12, 00:23

Join Date: Jan 2005
Posts: 7
jeclarim
Offline
Registered User
What use?
Well, I guess you can do plenty of interesting things with that even if you don't have a full location database.
For example, it would be easy to write a script which would act differently if you are at home or at the office...
Reply With Quote

#6 Old yeah, I'm working on something - 2005-01-12, 01:26

Join Date: Jan 2005
Posts: 9
maht0x0r
Offline
Registered User
I'm started taking note of the CellID for the places that I regularly visit so that I can do something appropriate.

I thought about having a webpage so that people could estimate where I was likely to be, i.e. not at home

not sure if it is such a great idea to have my whereabouts on the web but who knows =)

I'm thinking of having an in-phone server that beeps when I change Cells and lets me enter some associative text if I haven't done so already for that cell.

We'll see.
Reply With Quote

#7 Old 2005-01-24, 18:37

Join Date: Jul 2004
Posts: 76
eriksmartt
Offline
Regular Contributor
Using a Bluetooth GPS unit, it should be possible to geographicaly map cellid's to real locations -- and the database of location lookup's would be a nice web service for those lacking GPS units. Obviously the size of a cell can vary drastically depending on location, but in a dense urban environment, the positioning can be fairly good.

Once more native API's are available from Python, it should be easy to do things like changing your Profile based on location. It would also be nice if location metadata could be inserted into pictures (which would be easy if the Camera API's were available, but could probably be done with a separate tagging app.)
Reply With Quote

#8 Old 2005-02-02, 09:42

Join Date: Jun 2004
Posts: 20
timsohn
Offline
Registered User
Check out Placelab: http://www.placelab.org

There are utilities for stumbling with a bluetooth GPS device, and for loading cellid->coordinate data onto the phone. The coordinate is the estimated center of a cell based on stumbling data.

If you just want to see the data, this is the link:
http://www.placelab.org/data/do-retr...e=new&type=gsm
Reply With Quote

#9 Old 2005-02-08, 23:19

Join Date: Feb 2005
Posts: 8
koolwaaij
Offline
Registered User
Covering a different part of the globe, you may also check out http://www.lab.telin.nl/~koolwaaij/showcase/gsmcells/ It also provides some statistics on cell range etc
Reply With Quote

#10 Old 2005-04-06, 18:56

Join Date: Apr 2005
Posts: 21
Location: Robin Hood County
lxo's Avatar
lxo
Offline
Registered User
gsm_location() produces KerrNoMemory after about 2600 calls on my Nokia 6600. Can anybody acknowledge this strange behaviour from his own experience?

>> have a look at this notes:

cellid.py runs out of memory after about 7 hours and 26 minutes (7,4 hours) when trying to get the cellid.
the mainloop sleeps 10 seconds between each call to location.gsm_location()
so there is 6 calls per minute, 360 calls per hour,
so the script leaks after about 360 * 7,4 = 2664 calls to location.gsm_location()

the following message was left on the console.

Traceback (most recent call last).
File "C:\System\Apps\Python\default.py", line 55, in <lambda>
lambda: menu_action (query_and_exec)),
File "C:\System\Apps\Python\default.py", line 46, in menu_action
f()
File "C:\System\Apps\Python\default.py", line 32, in query_and_exec
execfile(os.path.join(this_dir, script_list[index]), globals())
File "C:\System\Apps\Python\cellid.py", line 49, in ?
g_mcc, g_mnc, g_lac, g_cellid = location.gsm_location();
SymbianError: KerrNoMemory



it points to a symbian out of memory error.
running the script in this session of python immediately produces the error again.
restarting python "solves" the problem.
Reply With Quote

#11 Old 2005-04-06, 21:41

Join Date: Mar 2003
Posts: 3
ejager
Offline
Registered User
I experience the same kind of problem on a Nokia3650 after approx 390 calls to gsm_location().

For me, starting a new thread before reaching this limit provided a (temporarily) workaround.

Greetz
EJ
Reply With Quote

#12 Old 2005-04-07, 12:33

Join Date: Apr 2005
Posts: 21
Location: Robin Hood County
lxo's Avatar
lxo
Offline
Registered User
great that i am not the only one who had problems with the location module!

i solved the problem in a similar way: i am using e32.start_server() to kick off a background process that just writes the location data to a text-file in ram-disk and quits afterwards. the main-application is put to sleep for a second and then reads the data from ram-disk.

i don't quite like this way of having to bloat this quite simple application with a seperate process (and a wobbly critical section between the two processes). luckily it works quite well for my purpose of long-time data-collection.

nevertheless i think it would be really good if the memory leak in gsm_location() could be fixed for the next release of python.
also, os.spawn*() would be a cool feature.
Reply With Quote

#13 Old 2005-04-07, 13:41

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Quote:
Originally posted by lxo

nevertheless i think it would be really good if the memory leak in gsm_location() could be fixed for the next release of python.
Could you post a minimal test case that demonstrates that leak?
Reply With Quote

#14 Old 2005-04-07, 14:16

Join Date: Apr 2005
Posts: 21
Location: Robin Hood County
lxo's Avatar
lxo
Offline
Registered User
here you go:
http://www.mrl.nott.ac.uk/~lxo/s60-p...indbug1.py.txt

this code runs out of memory after 2642 calls to gsm_location() on my Nokia 6600.

hope this helps.
Reply With Quote

#15 Old 2005-06-23, 13:12

Join Date: Sep 2003
Posts: 209
Location: Finland
otsov
Offline
Regular Contributor
Quote:
Originally posted by lxo
gsm_location() produces KerrNoMemory after about 2600 calls on my Nokia 6600. Can anybody acknowledge this strange behaviour from his own experience?

...

it points to a symbian out of memory error.
running the script in this session of python immediately produces the error again.
restarting python "solves" the problem.
This should be corrected from release 1.1.2 onwards (inclusive). Thank you for noticing and reporting this one!

BTW. If you are interested of predicting location based on e.g. GSM-network cell information have a look at (pdf):

http://www.cs.helsinki.fi/group/cont...ervasive04.pdf

This is part of a project called "Context", see http://www.cs.helsinki.fi/group/context/ for more information.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia