Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Authorization requires authentication in Bluetooth security manager on S60 2nd Edition (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): Nokia 6630, Nokia 6680, Nokia N90
Created: User:Technical writer 1 (25 Aug 2005)
Last edited: hamishwillee (15 Jun 2012)



Using authorization mandates using authentication when the TBTServiceSecurity class is used in certain devices. If there is a need for an authorization feature, also authentication has to be set.


The Bluetooth Security Manager faced some changes in Symbian OS v8.0a. In contrast to earlier platforms, it is not possible to use authorization (user confirmation for the inbound connection) without authentication (bonding between two devices).

How to reproduce

Set TBTServiceSecurity's authentication OFF (false) and authorization ON (true). Then connect the devices. The devices get connected without any dialog for the user to accept/decline the connection request.


You have to set both authorization and authentication ON (=true) to be able to use authorization (which is actually also recommended to ensure better security).
An example of how to set authorization ON:
// Get the port and set it to the listening socket
TInt channel;
( iListeningSocket.GetOpt( RFCOMMGetAvailableServerChannel,   
 KSolBtRFCOMM, channel ));
TBTSockAddr listeningAddress;
listeningAddress.SetPort( channel );
// Define security for the application (unique service ID,
// authentication ON, encryption ON; authorization ON)
TBTServiceSecurity serviceSecurity;
serviceSecurity.SetUid ( KUidBTPointToPointApp );    
serviceSecurity.SetAuthentication ( ETrue );

serviceSecurity.SetEncryption ( ETrue );                        
serviceSecurity.SetAuthorisation ( ETrue );

serviceSecurity.SetDenied( EFalse );                         
// Attach the defined security policy to the socket
// Bind the socket
User::LeaveIfError( iListeningSocket.Bind( listeningAddress )
User::LeaveIfError( iListeningSocket.Listen( KListeningQueSize
) );

This page was last modified on 15 June 2012, at 06:53.
47 page views in the last 30 days.