×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    gsm_location() None Issue

    Hey,

    I've seen the issue of gsm_location() return None before in the forum. I used it frequently before on my n90 a year ago but now on n95 it is not working anymore. Is there a certain python & shell combination I need to install? I just want to run a very simple .py file and try things out. Do I really need to go through a certification process when I am just trying things out for a proof of concept?

    Appreciate it,
    Stan Wiechers

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: gsm_location() None Issue

    Quote Originally Posted by whoisstan View Post
    Hey,

    I've seen the issue of gsm_location() return None before in the forum. I used it frequently before on my n90 a year ago but now on n95 it is not working anymore. Is there a certain python & shell combination I need to install? I just want to run a very simple .py file and try things out. Do I really need to go through a certification process when I am just trying things out for a proof of concept?

    Appreciate it,
    Stan Wiechers
    Hello whoisstan and welcome to the Dibo

    Just to try and run a .py file on you device you donot need to go through any kind of certification process.
    Are you using the latest verision(1.4.0) of pys60 on your device (N95)?
    Just try the following code and paste the output in this thread...
    Code:
    import location
    
    
    mcc, mnc, lac, cellid = location.gsm_location()
    print cellid
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: gsm_location() None Issue

    Quote Originally Posted by croozeus View Post
    Just to try and run a .py file on you device you donot need to go through any kind of certification process.
    croozeus, you're wrong again.
    Quote Originally Posted by croozeus View Post
    Are you using the latest verision(1.4.0) of pys60 on your device (N95)?
    N95 is 3rd edition device and Pys60 script shell must be signed with devcert properly to get location.gsm_location() return something more than None.

  4. #4
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: gsm_location() None Issue

    Oops..Sorry
    So there you go whoisstan.
    Your Pys60 script shell must be signed with devcert before u can exploit the location.gsm_location() properly....
    Thank you for correcting me aaaaapo.
    Pankaj Nathani
    www.croozeus.com

  5. #5
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    I am not releasing anything to greater public, just doing some work for myself and I have sign my prototypes all the time? That doesn't make any sense to me at all. I understand the need for signing when publishing software, but please not for development. Is there a way to accomplish that without signing? Can I use an old release of python? Any help is appreciated!

  6. #6
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: gsm_location() None Issue

    Quote Originally Posted by whoisstan View Post
    I am not releasing anything to greater public, just doing some work for myself and I have sign my prototypes all the time? That doesn't make any sense to me at all. I understand the need for signing when publishing software, but please not for development. Is there a way to accomplish that without signing? Can I use an old release of python? Any help is appreciated!
    On 3rd platform you MUST at least have the python shell or your application signed with your own dev cert to use gsm_location() function !
    gsm_location need caps Location and self-signed cert has not this capability !
    This doesn't depend on Python but 3rd platform (security and data cage )!
    So old release of Python will not resolve your problem
    With 2nd platform and Python there's no problem at all !


    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    do i understand right that i can sign the python shell i am using? How can I do that? I develop on OS X. I found that here:

    http://www.martin.st/symbian/

    Once I installed everything, can I just create my own key like described here or do I need an official key?

    "On 3rd edition, all sis files must be signed before they can be installed. If you haven't already got a key and certificate pair, generate them:

    makekeys -cert -expdays 3650 -password mykey.key mycert.cer

    This will prompt for information to enter into the certificate, and create a certificate valid for 10 years. (To create a certificate without a password, just leave out -password. The makekeys tool included in this package has a similar but not identical syntax compared to the makekeys tool in the real SDKs.) Then sign the sis file using this certificate:

    signsis helloworldbasic.sis helloworldbasic.sisx mycert.cer mykey.key"

  8. #8
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: gsm_location() None Issue

    Quote Originally Posted by whoisstan View Post
    do i understand right that i can sign the python shell i am using? How can I do that? I develop on OS X.
    On OsX you can use ensymble as I do.

    Signing the PythonScriptShell:

    Code:
    /opt/local/bin/python ./bin/ensymble_python2.4-0.23.py signsis \
    --execaps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadUserData+SurroundingsDD+SWEvent+UserEnvironment+WriteUserData+ReadDeviceData+TrustedUI+WriteDeviceData \
    --cert=your-cert.cer \
    --privkey=your-cert.key \
    --passphrase=XXXXXXXXXX \
    PythonScriptShell_1_4_0_3rdEd_unsigned_freedevcert.SIS \
    PythonScriptShell_1_4_0_3rdEd_signed-for-your-phone.sis
    See this post to find out how to make a signed SIS-package:
    http://discussion.forum.nokia.com/fo...85&postcount=2

    Quote Originally Posted by whoisstan View Post
    Once I installed everything, can I just create my own key like described here or do I need an official key?
    Obtain your own devcert with cyke64's "Sign yourself An 3rd app" tutorial:
    http://cyke64.googlepages.com/signyour3rdapp%21

  9. #9
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    thanks for the help. I did exactly as described. Got my own certificate for development, signed an unsigned shell and uploaded it. When installing it warned me that the application is for development only and so on. When I run the shell and either type in the statements to get the location or run a script that does the same I get 'None' again. No difference whatsoever.

    Those are the capabilites of my cert:
    LocalServices
    Location
    NetworkServices
    PowerMgmt
    ProtServ
    ReadDeviceData
    ReadUserData
    SurroundingsDD
    SwEvent
    TrustedUI
    UserEnvironment
    WriteDeviceData
    WriteUserData

    And the IMEI given is correct as well.

    Does anybody know what the problem is? I use a N95.

    Thank you,
    Stan

  10. #10
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    Is there a way that I can see what the permissions associated with the certificate are? I really would like to get that to work, shouldn't be so difficult, i literally just print the gsm_location.

    import location
    print location.gsm_location()

    I also did try to py2with certificate, didn't work either, here is the code, when i add the gsm_location call the app quits.

    Appreciate any help

    import appuifw
    import e32
    import location

    def exit_key_handler():
    app_lock.signal()

    round = appuifw.Text()
    round.set(u'hello')

    mcc, mnc, lac, cellid = location.gsm_location()

    appuifw.app.screen='normal' #(a full screen)

    app_lock = e32.Ao_lock()

    appuifw.app.body = round

    appuifw.app.exit_key_handler = exit_key_handler
    app_lock.wait()

  11. #11
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: gsm_location() None Issue

    hello Stan ,

    Try the extended gsm location of Berger !

    I hope that this time it works !

    Code:
    import elocation
    
    print elocation.gsm_location() // Hey ! I've already seen this function somewhere    
    ;)
    
    print elocation.extended_gsm_location() // NEW
    Cyke64
    Last edited by cyke64; 2007-10-12 at 19:48.
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  12. #12
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    Thank you will try that asap. Since i am still so new to python and symbian, how do I include that in my app?

    Can I just sign the elocation and deploy it as a library and simply include it my signed app or use it in the signed shell?

    Or do i have bundle them with my app or the shell?

    Thanks so much so far, feel like it is finally getting somewhere.

    Appreciate all your help to a newbie,
    Stan Wiechers

  13. #13
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: gsm_location() None Issue

    Quote Originally Posted by whoisstan View Post
    Thank you will try that asap. Since i am still so new to python and symbian, how do I include that in my app?

    Can I just sign the elocation and deploy it as a library and simply include it my signed app or use it in the signed shell?

    Or do i have bundle them with my app or the shell?

    Thanks so much so far, feel like it is finally getting somewhere.

    Appreciate all your help to a newbie,
    Stan Wiechers
    Hello Stan

    You have to sign the elocation module as you have signed the shell before with your dev cert. You install the signed module and after you can use elocation functions in your signed app or in the signed shell.

    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  14. #14
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    Hey!

    So i deployed the signed elocation and the shell on my n95 and when i run

    >>> import elocation
    >>> elocation.extended_gsm_location()

    i get

    {}

    can somebody verify that on a N95 please? maybe i am doing something wrong. would be great to get that to work!

    best,
    stan

  15. #15
    Registered User
    Join Date
    Oct 2007
    Posts
    20

    Re: gsm_location() None Issue

    here are my statements to sign. are they correct?

    python ~/bin/ensymble.py signsis --execaps=LocalServices+NetworkServices+ReadUserData+UserEnvironment+WriteUserData --cert=stan.cer --privkey=stan.key --passphrase=xxxxx elocation-PyS60_1_4_0_3rdEd_unsigned.SIS elocation-PyS60_1_4_0_3rdEd_signed.SIS

    python ~/bin/ensymble.py signsis --execaps=LocalServices+NetworkServices+ReadUserData+UserEnvironment+WriteUserData --cert=stan.cer --privkey=stan.key --passphrase=xxxx PythonScriptShell_1_4_0_3rdEd_unsigned_freedevcert.SIS PythonScriptShell_1_4_0_3rdEd_signed_freedevcert.SIS

Similar Threads

  1. issue with at+cusd over bluetooth link
    By hbanks in forum General Messaging
    Replies: 2
    Last Post: 2007-09-25, 21:21
  2. RTSP video streaming issue on 6280
    By olivier_irac in forum General Development Questions
    Replies: 0
    Last Post: 2006-12-04, 15:11
  3. Image Scaling/Sizing issue on the N70
    By sameet in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-07-24, 12:03
  4. Security code issue for 6230
    By kababoom in forum General Development Questions
    Replies: 1
    Last Post: 2004-08-19, 05:39

Posting Permissions

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