×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    5

    KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    Hi,

    I am trying to change the device class on a nokia 5500. I have the capability WriteDeviceData. I am calling the following function:

    TInt value = 0x414;
    TInt ret = RProperty::Set(KPropertyUidBluetoothControlCategory,
    KPropertyKeyBluetoothSetDeviceClass, value);


    This returns a value of -46, or KErrPermissionDenied.

    Apparently KErrPermissionDenied is only returned when you don't have a capability, but I even tried with all capabilities and it still return KErrPermissionDenied. Why would I be getting this value?

    Thanks,
    Andrew

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

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    http://developer.uiq.com/devlib/uiq_...ues.guide.html

    Does this explain why I cannot access the value?

    Does anyone know how I could get around this?

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,175

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    I don't think you can change HW settings on teh device, would that value actually be defined by the actual HW present in teh system.

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    Why kind of use cases do you believe requires that you can redefine what classes the bluetooth hardware supports?

    This key requires "Local Services" and "Network Control", however I suspect that it is only changable from the server and not by 3rd parties as this could cause all sorts of corruption and resets on hardware

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

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    Quote Originally Posted by Paul.Todd View Post
    Why kind of use cases do you believe requires that you can redefine what classes the bluetooth hardware supports?
    I thought that the device class is simply what is advertised to bluetooth hosts. I need to change the device class of the phone because I am trying to connect to a particular host who is hardcoded to only accept certain device classes - ie, I am being rejected due to my device class.

    Quote Originally Posted by symbianyucca View Post
    I don't think you can change HW settings on teh device, would that value actually be defined by the actual HW present in teh system.
    Sorry I didn't quite follow - are you saying that device class is defined in hardware? Since the bluetooth is implemented in symbian, would it not be a software value?

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    There is a paticlar case for this in that XP used to refuse bluetooth PAN connections unless the networking bit was set, however as I said, you can update your mmp file to include location and network control (in addition to others you already use) and get a new devcert with these capabilities (in addition to others you require) and try that.

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

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    I have tried with all capabilities -

    and yes my problem is with the XP bluetooth stack (although not the particular problem you mentioned - I am unable to tell you EXACTLY what's happening, but it's bascially the same idea) - worst case scenerio is that this would require users to install an alternate bluetooth stack but I really want to avoid that.

    Is this method the only non-deprecated way to set the device class? I was considering opening a channel to itself and setting the device class via an L2CAP command but I was wondering if anyone had any thoughts, since I've been struggling with this for a while.

  8. #8
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    What device did you test this on?

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

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    I have only tested this on a nokia 5500.

    is KErrPermissionDenied an error that only results from a capability problem?

  10. #10
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: KErrPermissionDenied from KPropertyKeyBluetoothSetDeviceClass

    Unfortunatly I don't know your level of Symbian expertise, but make sure you have BOTH local services and Network CONTROL in your MMP file and do a full rebuild. You will need a certifcate from Verisign or TrustCenter to get these in your devcert.

    Also make sure you sign the sis file with the cert, though if it installs your sis file will have these capabilties anyway.

    I do believe however that you might be unable to set this due to the stability issues this could raise in the phone, especially as that phone does not support the PAN bluetooth profile.

Similar Threads

  1. KErrPermissionDenied with getCallInfo
    By adinkesp in forum Symbian
    Replies: 9
    Last Post: 2010-04-14, 03:10
  2. Replies: 2
    Last Post: 2007-11-21, 17:17
  3. KErrPermissionDenied and Keylistener
    By gemilib in forum Symbian
    Replies: 3
    Last Post: 2007-10-29, 11:52
  4. Replies: 15
    Last Post: 2007-07-23, 09:35
  5. RComm::Open() returns KErrPermissionDenied
    By themikeman in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 0
    Last Post: 2006-10-20, 15: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
  •  
×