Namespaces
Variants
Actions
(Difference between revisions)

Archived:How to get info on cell location in PySymbian

Jump to: navigation, search
m (Hamishwillee - Adding missing translation link)
m (Hamishwillee - Delete duplicate translation link)
Line 1: Line 1:
[[Category:Location]][[Category:PySymbian]][[Category:S60]][[Category:How To]][[Category:Code Snippet]]
+
[[Category:Location]][[Category:PySymbian]][[Category:How To]][[Category:Code Snippet]][[Category:Symbian]]
 
+
 
+
 
{{ArticleMetaData <!-- v1.1 -->
 
{{ArticleMetaData <!-- v1.1 -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
Line 13: Line 11:
 
|capabilities= <!-- Capabilities required (e.g. Location, NetworkServices. -->
 
|capabilities= <!-- Capabilities required (e.g. Location, NetworkServices. -->
 
|keywords= location
 
|keywords= location
|id= <!-- Article Id (Knowledge base articles only) -->
 
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|translated-by= <!-- [[User:XXXX]] -->
 
|translated-by= <!-- [[User:XXXX]] -->
Line 26: Line 23:
 
}}
 
}}
  
==Overview==
+
{{Abstract|This code snippet shows how to retrieve information such as MCC, MNC, LAC and Cell ID in [[Python]].}}
 
+
This code snippet shows how to retrieve information such as MCC, MNC, LAC and Cell ID in [[Python]].
+
  
 
==Preconditions==
 
==Preconditions==
Line 62: Line 57:
 
* Location Area Code - defines an area covered by a group of radio cells
 
* Location Area Code - defines an area covered by a group of radio cells
 
* [http://en.wikipedia.org/wiki/Cell_of_origin_(telecommunications) Cell ID] - defines a single transmitter. In many cases, especially in heavily populated areas, there are 3 cells on a single base-station, each covering 120 degrees.
 
* [http://en.wikipedia.org/wiki/Cell_of_origin_(telecommunications) Cell ID] - defines a single transmitter. In many cases, especially in heavily populated areas, there are 3 cells on a single base-station, each covering 120 degrees.
 +
 
<!-- Translation --> [[pt:Como recuperar Informações de Célula em PySymbian]]
 
<!-- Translation --> [[pt:Como recuperar Informações de Célula em PySymbian]]
<!-- Translation --> [[pt:Como obter informações sobre a localização do celular, em PySymbian]]
 

Revision as of 10:54, 18 September 2012

Article Metadata

Tested with
Devices(s): Nokia N95, Nokia E90

Compatibility
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd Edition

Article
Keywords: location
Created: cyke64 (15 Mar 2007)
Last edited: hamishwillee (18 Sep 2012)

This code snippet shows how to retrieve information such as MCC, MNC, LAC and Cell ID in Python.

Contents

Preconditions

Note: The location module requires capabilities ReadDeviceData, ReadUserData and Location starting with S60 3rd Edition.

Source code

import location
 
 
mcc, mnc, lac, cellid = location.gsm_location()
 
print "Mobile Country Code:", mcc
print "Mobile Network Code:", mnc
print "Location Area Code:", lac
print "Cell ID:", cellid

Postconditions

The information is displayed.

Observations

Starting with S60 3rd Edition the Script Shell must be signed with the Location, ReadDeviceData and ReadUserData capabilities to be able to run the code.

Additional information

More information about the items described above:

  • Mobile Country Code - defines the country where you are
  • Mobile Network Code - defines the network within the country
  • Location Area Code - defines an area covered by a group of radio cells
  • Cell ID - defines a single transmitter. In many cases, especially in heavily populated areas, there are 3 cells on a single base-station, each covering 120 degrees.
235 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved