×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 34

Thread: gsm_location()

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    9

    gsm_location()

    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

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Wellington, NZ
    Posts
    7
    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.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    9

    i mean, what use the numbers ?

    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 =)

  4. #4

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7
    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...

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    9

    yeah, I'm working on something

    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.

  7. #7
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    76
    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.)

  8. #8
    Registered User
    Join Date
    Jun 2004
    Posts
    20
    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

  9. #9
    Registered User
    Join Date
    Feb 2005
    Posts
    8
    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

  10. #10
    Registered User
    Join Date
    Apr 2005
    Location
    Robin Hood County
    Posts
    22
    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.

  11. #11
    Registered User
    Join Date
    Mar 2003
    Posts
    3
    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

  12. #12
    Registered User
    Join Date
    Apr 2005
    Location
    Robin Hood County
    Posts
    22
    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.

  13. #13
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643
    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?

  14. #14
    Registered User
    Join Date
    Apr 2005
    Location
    Robin Hood County
    Posts
    22
    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.

  15. #15
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Finland
    Posts
    209
    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.

Posting Permissions

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