View Full Version : gsm_location()
maht0x0r
2005-01-09, 22:02
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
flash5standingby
2005-01-09, 23:36
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.
maht0x0r
2005-01-09, 23:45
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 =)
nanderso
2005-01-10, 10:17
JFGI
http://www.yeldar.co.uk/MCC-MNC.htm
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123tcr/123tmwr/mwrfmcc.htm
http://www.gsmworld.com/roaming/gsminfo/index.shtml
jeclarim
2005-01-12, 00:23
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...
maht0x0r
2005-01-12, 01:26
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.
eriksmartt
2005-01-24, 18:37
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.)
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-retrieve.php?style=new&type=gsm
koolwaaij
2005-02-08, 23:19
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
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.
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
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.
jplauril
2005-04-07, 13:41
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?
here you go:
http://www.mrl.nott.ac.uk/~lxo/s60-python/findbug1.py.txt
this code runs out of memory after 2642 calls to gsm_location() on my Nokia 6600.
hope this helps.
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/context/pubs/pervasive04.pdf
This is part of a project called "Context", see http://www.cs.helsinki.fi/group/context/ for more information.
Would it be possible to get a list of the other cells towers the phone also have contact with ? and theirs cellid's,signal level and TA (Timing Advance) values.. if we got those values and we know the positions of the cells towers we could calculate almost exactly where the phone is.
@harp73: what you request is posibble on some windows mobile smartphones from htc (using a memory-hack where you read from an absolute adress which might change between phones) but i don't think nokia will ever support it officially. people from the placelab.org project presented a paper about how they did exactly what you said to build an indoor positioning system in a shopping mall in the u.s.
i think it would be good to know the current channel for the current cell id. does anyone know how to get it? i could imagine it is possible.
(Old thread, but worth of refreshing.)
I was excited to see gsm_location in the API
how do I map the numbers [mcc, mnc, lac, cellid] to real geography
You can create a simple pys60 application and use bluetooth gps to map cells, like we have been doing here in Helsinki, Finland a while: http://plok.in/gsm/?mcc=244 [1]
Does anybody know other active gsm-cell mapping projects? It would be useful to share data and ideas.
[1] Unfortunately there are no explaining texts, but here is a brief intro:
On the left is a list of objects (MCC, MNC, LAC, CELL) and on the map should be several red spots (red spot is the average location of object). Choose one until you are on cell-level and you should see something like this:
http://plok.in/gsm/?mcc=244&mnc=5&lac=9000
Now each red spot indicates one gsm cell. Click cellid (open the link to a new tab/window) and you will see all points where the phone (which collected data) went in or out to/from selected cell.
Some day we are probably/hopefully using this data to cell-based positioning.
Digitale
2006-06-05, 16:52
See http://symbiatch.jutut.fi/article/916 (Finnish)
I'm planning to use that data in my own project which will also use Google Maps.
What I'm going to do is to draw cell coverage area polygons.
Also there will be option to add sites (for exmaple Unibase xxxx) their locations, photos and addresses and assign cells to sites.
Design challenges
-There is Polygon function, but it is unofficial.
-I want service to be as optimized as possible in terms of code size and bandwidth usage, so I'm going to use AJAX to receive cell shapes + related info based on map location and also buffer them in memory. Now we don’t need to pre-select anything.
I've been mapping GSM cells in the UK by logging the ones I pass through on my phone, logging my position on a standalone GPS unit, and correlating the 2 later. I've found a problem in that gsm_location returns the last result if you are out of range, so sometimes a cell will seem to cover more area than it really does. It also doesn't update it's result if I am in a call. Does anyone know how to solve this? I've put my results so far in a google earth KML file at http://www.arjam.net/cells.kml
CellID's refer to which basestation your mobile is connected to, or has the strongest signal from. Operators generally keep a list of the tables so you can map from CellID to Lat Long. So it might be worth it to send an email to your local operator whether this is possible (but I doubt it).
Hope this helps.
I've been mapping GSM cells in the UK by logging the ones I pass through on my phone - - I've put my results so far in a google earth KML file at http://www.arjam.net/cells.kml
My first (very ugly) try with polygons in Google Maps:
http://plok.in/gsm/testpolygons.html
Above is a static file, cell-polygons (116 in all) are calculated (with "convex hull" algorithm) from collected GSM-cell coordinates (which are saved into a database).
I'll try next Google Earth and its KML-format, it should draw shapes much more faster.
crschmidt
2006-06-19, 06:51
I've recently given a presentation covering some of the topics which the people in this thread have mentioned. You can see more info at http://discussion.forum.nokia.com/forum/showthread.php?p=215911
Please, if you're collecting this data, think about submitting it to gsmloc.org.
exosyphen
2006-07-11, 00:31
For those interested :
http://www.gsm-tracker.com
ricorico94
2006-09-08, 19:18
Hi,
I'm a rookie so please don't blame me if this question is too stupid, as I have made a lot of search already..
I have installed raccoon and python on my E70 (S60 3rd ed), and this works apparently well.
However, among the concepts, the GSM location does not show any cellID, only showing "none".
I tried to understand and investigate (and I saw it does use the gsm_location command), and I found on various forums that cellID may not be communicated by network to end-user though some applications can apparently find some workarounds.
So, is the fact that I see "None" is the reflect that this application does not include a workaround and thus is unable to get the cellID (meaning that I'll never be able to get this cellID with an application run in Python), or that something is not setup properly on my handset.
(note that I forced my cell phone to use GSM instead of UMTS mode to check if result was the same.. and same result..)
Thanks a lot for your clarifications..
Rico
iemorgan
2006-10-13, 21:16
I too am not understanding the gsm_location method. All I ever get back on my E61 is "None". The docs are very confusing. They state:
"'location.gsm_location()' returns 'None' instead of tuple if the location information is not relevant."
My question is: When is the location information ever irrelevant? When the GSM radio is disabled? I can retrieve the cell id's with another (UIQ) phone, but anywhere I go, the gsm_location call in PyS60 always gives me "None". Help?
One thought: Is this just a vocabulary mix-up? Did they mean to say "not available" instead of "not relevant"? That of course brings up another question.. why is the data not available?
I too am not understanding the gsm_location method. All I ever get back on my E61 is "None". The docs are very confusing. They state:
"'location.gsm_location()' returns 'None' instead of tuple if the location information is not relevant."
My question is: When is the location information ever irrelevant? When the GSM radio is disabled? I can retrieve the cell id's with another (UIQ) phone, but anywhere I go, the gsm_location call in PyS60 always gives me "None". Help?
One thought: Is this just a vocabulary mix-up? Did they mean to say "not available" instead of "not relevant"? That of course brings up another question.. why is the data not available?
This issue is related to the limited capabilities available in the 3rd edition of Series 60 for self-signed applications. In another words, you cannot get the location information in 3rd edition without having a developer certificate. Read more from this post (http://discussion.forum.nokia.com/forum/showpost.php?p=221413&postcount=8).
- Teemu
johanvdb
2006-10-16, 14:07
I too have problems getting some usefull info out of gsm_location. If I understand correctly I need to get myself a developer certificate and rebuild/sign the python interpreter with the right capabilities. Is this correct? And does somebody has a tutorial about this?
First I was thinking that somehow my GSM provider would withold cell-info because they don't want a grass-roots location system ;-)
regards,
Johan
paninizuercher
2006-10-27, 08:33
I too would be interested in such a tutorial. I could not find a webpage, however I'ma newbie in mobile Python programming. Any news on this one?
Thanks
Also, there is this new project: OpenCellId (http://www.opencellid.org)which is an open source databse of CellId. For now, it works only for j2me phones which allows access to CellID (SonyEricsson for instance), but I would be happy to find somebody who would like to participate especially on Symbian devices...
@Tomsoft: Interesting initiative! Your website is still very incomplete/buggy at the moment. But having seen what you did on the Amiga when I was still a boy, I am sure you can turn it into something awesome!
I have got some data and software that I could potentially contribute. We staged a game called Love City for which we conducted cell ID surveys on 4 GSM networks in 3 UK cities: Love City Nottingham Survey Results (http://makinglovecity.blogspot.com/2006/03/nottingham-survey-results.html)
Couple of questions:
- the software is open source, but what about the data? will it be free or stay with 8motions?
- how are you going to protect your database against acid attacks?
- did you seek legal advise (because this kind of information could be regarded as a massive intellectual property)
- have you seen navizon (http://www.navizon.com/)?
Best regards,
Leif
Tanks lxo for the feedback.
About the site being buggy, can you tell me where exactly? I think that yesterday there was an error in the API documentation, as there was a pluralize error ( mesures/add instead of mesure/add ) this is now corrected.
The database is open also , and you can already browse it (ok, only 50 cells in one day for now). But the idea is to be open source about the database too, and more bulk download functions will be available (not sure exactly how, but probably a zip file/mcc/mnc)
It would be nice if you can contribute....Again, data are open sources and freely accessible by everybody. That's the major difference with other projects like this. Let me know how we can do integrate your data (what is the forma, do you need a specific web service,...)
The database protection is one of the issue. Some techniques will be used (not put in place yet) to monitor "strange behavior", like:
- mesures too far/totally out of range with others mesure
- end user behavior
But nothing perfect, as every "user generated content".
Regarding IP: these are publicely collected data. Why this should be consedered as IP violation? But the point should be checked a little bit further...
nice project! we started adding cells for Toulouse, France
I saw some of them! Feel free to ask for improvment, I'll try to do it asap...
nice project! we started adding cells for Toulouse, France