You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 08:40

Join Date: Feb 2008
Posts: 63
blackpaw
Offline
Regular Contributor
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
Reply With Quote

#2 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 08:58

Join Date: Jul 2008
Posts: 103
ck.umraliya's Avatar
ck.umraliya
Offline
Forum Nokia Champion
hi
are you using it on shell or in a script?
Also mention your device.
Regards
Reply With Quote

#3 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 09:04

Join Date: Feb 2008
Posts: 63
blackpaw
Offline
Regular Contributor
Direct from the shell
Reply With Quote

#4 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 10:26

Join Date: Jul 2008
Posts: 103
ck.umraliya's Avatar
ck.umraliya
Offline
Forum Nokia Champion
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?
Reply With Quote

#5 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 13:11

Join Date: Sep 2008
Posts: 1
TomStern
Offline
Registered User
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 13:18.
Reply With Quote

#6 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 15:11

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
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 ?
Reply With Quote

#7 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-25, 23:22

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
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
Twinapex Research
http://www.twinapex.com
Reply With Quote

#8 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-26, 04:11

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
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


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#9 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-26, 04:21

Join Date: Feb 2008
Posts: 63
blackpaw
Offline
Regular Contributor
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
Quote:
Which command gives you a KErrPermissionDenied?
Code:
positioning.modules()

Quote:
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
Reply With Quote

#10 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-26, 04:26

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
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


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#11 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-26, 05:48

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
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
Reply With Quote

#12 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2008-09-26, 06:10

Join Date: Feb 2008
Posts: 63
blackpaw
Offline
Regular Contributor
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
Reply With Quote

#13 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2009-07-24, 00:27

Join Date: Oct 2008
Posts: 43
carlosl
Offline
Registered User
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...
Reply With Quote

#14 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2009-07-24, 04:58

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
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


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#15 Old Re: Signed PythonShell getting KErrPermissionDenied for positioning.modules() - 2009-07-24, 17:07

Join Date: Oct 2008
Posts: 43
carlosl
Offline
Registered User
Quote:
hope my replies were helpful.

Enjoy Pythoning
Gaba88

Of course, Gaba. Always helpful.


Quote:
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.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
[Announce] Open Signed Online automation tool y.a.k Python 22 2008-10-16 20:01
Symbian Signed for ISV SymbWorks Installation, Certification and Security 5 2008-08-26 19:42
请关注 Symbian Signed 的新改变 wotrust Symbian 5 2007-11-18 06:56
Radically restructure Symbian Signed KevinD News, Announcements and Job Listings 4 2007-10-22 21:56
Blanket net access permission for signed midlets on 6600 / 6630 dfun Mobile Java Networking & Messaging & Security 0 2006-04-21 10:47

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia