×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    27

    Which capabilities should I choose for additional QT xml/network?

    With CAPABILITY NONE, my program run well in emulator.
    But while on device, it doesn't work.

    I use QT xml/network(QNetworkAccessManager and QNetworkReply), SMS(RSendAs).
    And I add following capabilities:
    NetworkServices ReadUserData WriteUserData Location UserEnvironment
    But when I install the program to 6110N device: required application access not granted!

    Which capabilities should I add for my program?

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Which capabilities should I choose for additional QT xml/network?

    A "Qt for S60" application is a Symbian application, it has to obey the Platform Security rules. That said, you will have to invest some time reading the relevant documentation, to learn about capabilities and data caging.

    To access the network you need NetworkServices, to access user's data (e.g. Contacts) you will need ReadUserData while if you want to modify that data you need WriteUserData. Got the idea?

    You should start by declaring capability None and only add capabilities when you know that they are indeed needed.

    Run the application in the emulator then have a look at the content of %temp%\epocwind.out, Platform Security logging info is prefixed by "*PlatSec*"

    You can filter it out by
    Code:
    c:\> find "*PlatSec*" %temp%\epocwind.out
    With the default emulator configuration what you will see there as warnings will turn into errors (KErrPermissionDenied) when the app is run on the phone.

    Now, about the installation error, depending on the capabilities set used you will have to chose corresponding signing options, not all capabilities are available to self-signed applications. See the docs and Platform Security and Symbian Signed. In your particular case Location, at least, doesn't seem to be needed and it is also one of the capabilities that a self-signed application cannot use.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    27

    Re: Which capabilities should I choose for additional QT xml/network?

    I tried the way to run in emulator, it doesn't work.
    The epocwind.out's length is 0.

    I didn't sign with self-certficate, I use a developer certficate.
    The easist way for developing by a fresh man is to use all capabilities can use while debug.
    When I use carbide.vs with Visual Studio 2005, I can separate capabilities I can't use, but I could do nothing with carbide++, so sorry.

    I just use QT QNetworkAccessManager/QNetworkReply and RSendAs, while not use QNetwork*, the NetworkServices is OK. But when I add QNetwork*, just appears "required application access not granted!" while install. At this moment, I have not add the module to access config files.
    I have no idea.
    And in my program, the evidence between using NetworkServices or not is the hint to send SMS while use RSendAs.

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Which capabilities should I choose for additional QT xml/network?

    Carbide.c++ has tools for you to analyze Platform Security related aspects of your code. See the Capability Scanner and Epocwind.out Scanner plug-ins (both documented in Carbide's help).

    To enable epocwind.out logging see emulator's preferences (Tools -> Preferences -> C++ Debug -> Enable Epocwind.out logging).

    The error message is clear, your binaries have more capabilities than the certificate used for signing them can grant. Review certificate's capabilities and those of the binaries and then take corrective actions.

    As for your idea that beginners should use all capabilities for an easier start that does not make any sense to me. Sorry.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    27

    Re: Which capabilities should I choose for additional QT xml/network?

    Thanks very much!

    But,
    emulator -> Tools -> Reference:
    Cannot start Ecmt Manager.
    I don't know what happened.

    What I said explains my mind:
    keep developer's mind in developing, not the environments.

    I'm reading "Carbide.c++ Capability Scanner Guide" now.

  6. #6
    Registered User
    Join Date
    Jan 2008
    Posts
    27

    Re: Which capabilities should I choose for additional QT xml/network?

    The problem is solved.
    Run Capability Scanner on Project MMP output nothing.
    What I do is regenerating the project file from qmake -project step.
    And use self-signed, it works well on device now.

  7. #7
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Which capabilities should I choose for additional QT xml/network?

    Read "How do I start programming for Symbian OS?" wiki article, the link is in my signature. It includes among others a tip about the ECMT problem.

    For the capabilities scanner I will make a note to myself to report a "need for improvement" to the Carbide team. In the documentation you will find info about some *GT*.XML files that should be copied (manually) from a Carbide plug-in to SDK's \epoc32\data\capability directory. Do have a look at the Epocwind.out scanner plug-in too, you will find it is more useful than the capability scanner.

    Other than that, I'm glad that the installation works for you now.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  8. #8
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Which capabilities should I choose for additional QT xml/network?

    Presumably capability scanner (it's a code scanning tool right?) is not yet updated to cope with Qt APIs and the capabilities that these use wasn't fully documented last time I checked.

    In this case, your problem was most likely that you were including Location capability for self-signing, which is not permitted on 3rd Edition FP1 phones (well, I think some later firmware builds may have changed this but I'm not certain on that). Location was only added to the self-signing set fairly recently.

    Using epocwind.out as Lucian suggested is the best way to determine which capabilities are required for Qt applications at the moment.

    Mark

Similar Threads

  1. What Capabilities are required for PyNetMony?
    By rohitc@cs.washington.edu in forum Symbian
    Replies: 0
    Last Post: 2008-02-27, 07:06
  2. S60 2nd to 3rd/ PlatformSecurity / Capabilities
    By jarkoos in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2007-04-14, 14:08
  3. Adding Capabilities through Carbide C++ 1.1
    By saadmansur in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2007-04-04, 15:12
  4. Replies: 5
    Last Post: 2006-09-01, 15:56
  5. Capabilities
    By djazia in forum Symbian
    Replies: 0
    Last Post: 2003-08-05, 12:43

Posting Permissions

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