×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    May 2006
    Posts
    58

    KErrPermission denied using RConnectionMonitor

    Hi,

    Quick question:-

    I ennumerated a list of connections using RConnectionMonitor, but when I tried to filter them based on UIDs I got -46. Is this a security capability problem? (I have Networkservices but is networkcontrol needed?)It works on emulator and not on device.

    <assume we have a monitor connection and ids[array] of connections>
    TConnMonClientEnumBuf clientBuf; monitor.GetPckgAttribute(ids[somenumber],0,KClientInfo,clientBuf,status);
    User::WaitForRequest(status)
    if (status.Int()!=KErrNone)
    {
    //fails with -46
    }
    Last edited by PrinceAlbertz; 2008-04-17 at 14:59.

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    Moscow, Russia
    Posts
    803

    Re: KErrPermission denied using RConnectionMonitor

    If it works on emulator then you can check epocwind.out file located in your temp folder. Search for "Capability check failed" in it.
    Regards,
    ivey

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,699

    Re: KErrPermission denied using RConnectionMonitor

    My first guesses would be the Read... capabilities, and indeed: though the help page is not that nice to look at, you can still locate the following important remarks
    Quote Originally Posted by SDK Help, 3rd MR RConnectionMonitor
    Required capabilities:
    ReadDeviceData, ReadUserData, NetworkServices
    some bad news might come
    Quote Originally Posted by same page
    NetworkControl to call
    ...
    IMPORT_C void GetPckgAttribute( const TUint aConnectionId, const TUint aSubConnectionId, const TUint aAttribute, TDes8& aValue, TRequestStatus& aStatus ) const;

    With aAttribute parameter set to KClientInfo
    It can be true or not, might or might not make sense (...control capability for read access) but it is actually there.

  4. #4
    Regular Contributor
    Join Date
    May 2006
    Posts
    58

    Re: KErrPermission denied using RConnectionMonitor

    Thanks guys. I'll have to figure out another way of figuring out what connections my app is using... (the user chooses the bearer)

  5. #5
    Regular Contributor
    Join Date
    May 2006
    Posts
    58

    Re: KErrPermission denied using RConnectionMonitor

    Hi again,

    I tried a different approach: I used the RConnection my code has, enumerated it, and tried:-

    TPckgBuf<TConnectionInfoV2> connectionInfo;
    iConnection.GetConnectionInfo(<the index>, connectionInfo);
    TConnectionType type=connectionInfo().ConnectionType();

    Again, this works on the emulator, but on device it always returns 0, I.E EConnectionGeneric, despite using GPRS, WLAN etc. Again, is this a missing capability? Perhaps I should just bite the bullet and get NetworkControl.

    I've tried a bunch of ways now, and its driving me slightly mad!

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

    Re: KErrPermission denied using RConnectionMonitor

    Have you checked the epocwind.out. If a capability is required you would likely see it reported there.

    Please note that Carbide.c++ 1.3 has a capability scanner tool and a epocwind.out viewer.

    Also, if you don't manage to figure it out the question would be: would the impact of using NetworkControl be serious enough to justify the minimum investment in getting a confirmation (maybe even alternative solution) from Forum Nokia's technical support?
    -- 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

  7. #7
    Regular Contributor
    Join Date
    May 2006
    Posts
    58

    Re: KErrPermission denied using RConnectionMonitor

    Quote Originally Posted by ltomuta View Post
    Have you checked the epocwind.out. If a capability is required you would likely see it reported there.

    Please note that Carbide.c++ 1.3 has a capability scanner tool and a epocwind.out viewer.

    Also, if you don't manage to figure it out the question would be: would the impact of using NetworkControl be serious enough to justify the minimum investment in getting a confirmation (maybe even alternative solution) from Forum Nokia's technical support?
    Thanks Itomuta. I'm trying a slightly different approach now, which seems promising, although I'm checking the WIKI etc to see exactly what the values mean and whether they can be relied on.

    http://discussion.forum.nokia.com/fo...ght=IAPService

Similar Threads

  1. Signal strength using RConnectionMonitor
    By masrivastava in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2009-03-24, 17:49
  2. FileConnection SecurityException Access Denied?
    By sbwoodside in forum Mobile Java General
    Replies: 8
    Last Post: 2008-07-23, 12:41
  3. can RConnectionMonitor monitor Gsm/gprs networks or only wlan ?
    By morost in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-01-23, 08:57
  4. RConnectionMonitor
    By mad81 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-09-13, 12:08
  5. Target port denied to untrusted applications Target prot denied to untrusted app...
    By moises_fp in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2006-08-22, 18:29

Posting Permissions

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