×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    72

    Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    I have a Python Shell signed with:
    Code:
    LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+
    ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+
    UserEnvironment+WriteDeviceData+WriteUserData
    However it still gets the KErrPermissionDenied error when trying to access any of the positioning api.

    using location.gsm_location() doesn't generate KErrPermissionDenied but it does return None.

    Any suggestions?

    Thanks - Lindsay

  2. #2
    Registered User
    Join Date
    Jul 2008
    Location
    Bhavnagar (India)
    Posts
    112

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    hi
    are you using it on shell or in a script?
    Also mention your device.
    Regards
    - Chintan Umraliya

  3. #3
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    72

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Direct from the shell

  4. #4
    Registered User
    Join Date
    Jul 2008
    Location
    Bhavnagar (India)
    Posts
    112

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Quote Originally Posted by blackpaw View Post
    Direct from the shell
    hi again
    you didn't mention device.
    I guess you are using in built gps. Have you fixed your gps first?
    - Chintan Umraliya

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    1

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Hi Blackpaw,

    location.gsm_location() returns "None" if your phone is offline or if you run it in emulator enviroment.

    Which command gives you a KErrPermissionDenied?

    Tom
    Last edited by TomStern; 2008-09-25 at 12:18.

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

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Quote Originally Posted by blackpaw View Post
    I have a Python Shell signed with:
    Code:
    LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+
    ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+
    UserEnvironment+WriteDeviceData+WriteUserData
    However it still gets the KErrPermissionDenied error when trying to access any of the positioning api.

    using location.gsm_location() doesn't generate KErrPermissionDenied but it does return None.

    Any suggestions?

    Thanks - Lindsay
    Let us know how you signed the shell ? Ensymble or Opensigned Online ?

    If Ensymble, let us know the command line, you used ?
    Pankaj Nathani
    www.croozeus.com

  7. #7
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Signing the shell itself is not enough - You need to change the capability of EXE files inside the SIS archive. Use ensymble too for this.
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Quote Originally Posted by miohtama View Post
    Signing the shell itself is not enough - You need to change the capability of EXE files inside the SIS archive. Use ensymble too for this.
    hi mikko
    just for clarification i in my N95 just signed the python shell with all capabilities and it is working fine i never used ensymble for the same purpose.

    Enjoy Pythoning
    Gaba88

  9. #9
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    72

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Thanks for all the replies everyone!

    Its a N95, I signed the shell using ensymble and a developer key. I use the following batch file to sign it:
    Code:
    python ensymble.py signsis --cert=DevCertRequest.cer --privkey=softlog.key --passphrase=  --dllcaps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+UserEnvironment+WriteDeviceData+WriteUserData %1 %1x
    Which command gives you a KErrPermissionDenied?
    Code:
    positioning.modules()

    I guess you are using in built gps. Have you fixed your gps first?
    Its the built in GPS, I'm not sure what fixing it means, however it is working on the phone - gets a satellite and a position. However that's only outside, inside where I do my testing doesn't get a signal, however I presumed just listing the modules wouldn't be an issue and I don't see why no signal would generate a KErrPermissionDenied

    Thanks - Lindsay

  10. #10
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Hi blackpaw
    Fixing means before using the positioning module have you initialized the GPS in your phone. First make the GPS on and then use the positioning module. then i feel it will work.

    Enjoy Pythoning
    Gaba88

  11. #11
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Lindsay, could you try this command when signing the Shell and see if it works?
    Code:
    python ensymble.py signsis --cert=DevCertRequest.cer --privkey=softlog.key --passphrase=  --execaps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+UserEnvironment+WriteDeviceData+WriteUserData --dllcaps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+UserEnvironment+WriteDeviceData+WriteUserData %1 %1x

  12. #12
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    72

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Quote Originally Posted by bogdan.galiceanu View Post
    Lindsay, could you try this command when signing the Shell and see if it works?
    Code:
    python ensymble.py signsis --cert=DevCertRequest.cer --privkey=softlog.key --passphrase=  --execaps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+UserEnvironment+WriteDeviceData+WriteUserData --dllcaps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadDeviceData+ReadUserData+SurroundingsDD+SwEvent+TrustedUI+UserEnvironment+WriteDeviceData+WriteUserData %1 %1x
    Doh! That was it, thanks bogdan

  13. #13
    Registered User
    Join Date
    Oct 2008
    Posts
    43

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Quote Originally Posted by miohtama View Post
    Signing the shell itself is not enough - You need to change the capability of EXE files inside the SIS archive. Use ensymble too for this.

    miohtama or anyone:


    What does that mean ? If I take file PythonScriptShell_1_4_5_3rdEd_unsigned_testrange.SIS and simply upload it for All-Capabilities to SymbianSigned online it will NOT work ???


    What else is needed ? Do I need to self-sign it locally with ensymble before uploading to SymbianSigned ???


    I'm confused and most probably lost...

  14. #14
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    Quote Originally Posted by carlosl View Post
    miohtama or anyone:
    What does that mean ?
    AFAIK miohtama means that signing the shell will it self not work and if you are making a sis of the script then you need to provide caps to that also separately. So that the binary inside the sis which is a EXE will get sufficient capabilities.

    Quote Originally Posted by carlosl View Post
    If I take file PythonScriptShell_1_4_5_3rdEd_unsigned_testrange.SIS and simply upload it for All-Capabilities to SymbianSigned online it will NOT work ???
    if you are running your application using the script inside the phone, i.e. using the Pythin Shell and interpreter then signing the shell at the symbian signed online is sufficient.

    Quote Originally Posted by carlosl View Post
    What else is needed ? Do I need to self-sign it locally with ensymble before uploading to SymbianSigned ???
    you dont need to self sign the python shell signing at symbian sign will provide all of the required capabilities. If you are making a sis using ensymble then you need to mention the capabilities in the ensymble itself and then sign it, after this it should work.

    hope my replies were helpful.

    Enjoy Pythoning
    Gaba88

  15. #15
    Registered User
    Join Date
    Oct 2008
    Posts
    43

    Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules()

    hope my replies were helpful.

    Enjoy Pythoning
    Gaba88

    Of course, Gaba. Always helpful.


    AFAIK miohtama means that signing the shell will it self not work and if you are making a sis of the script then you need to provide caps to that also separately. So that the binary inside the sis which is a EXE will get sufficient capabilities.
    Agree. Just let me summarize to check if I have all correct.

    I undestand the Python interpreter comes with all capabilities supported, so that when you run an standalone applicaton signed with all-caps it will still run properly. Also when running from the shell, the shell must have the caps enabled (self-signing the unsigned_testrange version online or using the high_capas version) for the scripts to run properly. And that would be all.

    As for making a SIS from my application and enabling the caps I undestand py2sis is all that's needed. I'm using:


    Code:
    ensymble py2sis --uid=0xE1234567 --icon=vs1.svg --appname="VsPat" --caps=LocalServices+Location+NetworkServices+PowerMgmt+ProtServ+ReadUserData+SurroundingsDD+SWEvent+UserEnvironment+WriteUserData+ReadDeviceData+TrustedUI+WriteDeviceData --shortcaption="VsPat." --caption="Application Name" --version=1.2.3 --verbose c:\MyApp
    Then I upload it to symbiansigned online and install the resulting sis.

    Hope that's correct since that's what I've been doing.

Similar Threads

  1. Replies: 22
    Last Post: 2008-10-16, 19:01
  2. Symbian Signed for ISV
    By SymbWorks in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 5
    Last Post: 2008-08-26, 18:42
  3. Radically restructure Symbian Signed
    By KevinD in forum News and Announcements
    Replies: 4
    Last Post: 2007-10-22, 20:56
  4. Blanket net access permission for signed midlets on 6600 / 6630
    By dfun in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-04-21, 09:47

Posting Permissions

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