×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    112

    KErrL2CAPAccessRequestDenied Error when Connct to Bluetooth

    I want to connect to a buletooth device, after searching devices and services,i use socket to connet,The service's type is KSerialPortUUID.
    User::LeaveIfError( iSocket.Open( iSocketServer, KStrRFCOMM ) );
    TBTSockAddr address;
    iCurrDevData->iDeviceServicePort = iServiceSearcher->Port();
    address.SetBTAddr( iCurrDevData->iDeviceAddr);
    address.SetPort( iCurrDevData->iDeviceServicePort );
    iSocket.Connect( address, iStatus );
    iStatus allways return KErrL2CAPAccessRequestDenied -6311.How can I resolved problem?

    SDK 3.0 MR

  2. #2
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    112

    Re: KErrL2CAPAccessRequestDenied Error when Connct to Bluetooth

    This problem will not apeared if I have paired before using system bluetooth.
    When I connet to other device which need password ,is there any security policy I should setting?

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

    Re: KErrL2CAPAccessRequestDenied Error when Connct to Bluetooth

    Default security settings may be too high (check TBTSockAddr::BT/SetSecurity).

  4. #4
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    112

    Re: KErrL2CAPAccessRequestDenied Error when Connct to Bluetooth

    Quote Originally Posted by wizard_hu_ View Post
    Default security settings may be too high (check TBTSockAddr::BT/SetSecurity).
    I set secuity to the TBTSockAddr:
    TBTSockAddr address;
    address.SetBTAddr( iCurrDevData->iDeviceAddr);
    address.SetPort( iCurrDevData->iDeviceServicePort );
    TBTServiceSecurity oandxSecurity;
    TUid settingsUID;
    settingsUID.iUid = 0x1101;
    oandxSecurity.SetUid(settingsUID);
    oandxSecurity.SetAuthentication(EFalse); // don't require key (PIN) exchange
    oandxSecurity.SetAuthorisation(EFalse); // require local user to confirm accept
    oandxSecurity.SetEncryption(EFalse);
    oandxSecurity.SetDenied(EFalse);
    address.SetSecurity(oandxSecurity);
    // iBtSocket.set
    TInt ss = iBtSocket->Connect(address);
    But it still appear the KErrL2CAPAccessRequestDenied.The red words mean it is a serialport service.Are there any parameter is wrong? When I connect to a mobile phone it can work,but it is the only one can be connected.

  5. #5
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    112

    Re: KErrL2CAPAccessRequestDenied Error when Connct to Bluetooth

    By the way, If it has been paired using sysmtem buletooth application, It can connect to our device(not phone)using my program,otherwise there will be KErrL2CAPAccessRequestDenied.

Similar Threads

  1. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Bluetooth Technology
    Replies: 9
    Last Post: 2009-07-17, 02:33
  2. Replies: 35
    Last Post: 2009-04-11, 14:36
  3. Bluesoleil Software
    By kencooper in forum Bluetooth Technology
    Replies: 9
    Last Post: 2008-08-29, 19:46
  4. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-07-25, 00:12
  5. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50

Posting Permissions

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