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
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 =)
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...
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.
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.)
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.
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.
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.
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?
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):