Get the GSM location information

Description:

This example shows how to retrieve the GSM location information: Mobile Country Code, Mobile Network Code, Location Area Code, Cell ID. The location, appuifw and e32 modules are used.

import location
import appuifw
import e32

exitflag=0
appuifw.app.title = u'Location'
print u'Location Info:'
prevLoc = u''
while not exitflag:
if prevLoc <> location.gsm_location():
print location.gsm_location()
prevLoc = location.gsm_location()
e32.ao_sleep(0.1)

Download:

ex7.py

Output:

The following screenshots are the outcome. Just click on the icons to enlarge them for a better view.

Output

Department of Electronic Systems | Aalborg University | Niels Jernes Vej 12 | DK-9220 Aalborg | Denmark
Phone: (+45) 9635 8695 | Fax (+45) 9815 1583 | E-mail ies(at)ies.aau.dk
Copyright © 2006 Department of Electronic Systems

Last update:02-10-2006