You Are Here:

Community: Developer Discussion Boards

#1 Old pairing devices in jsr82 - 2006-09-07, 19:10

Join Date: Jul 2006
Posts: 23
tfm
Offline
Registered User
I want a sample code so that when my 2 bluetooth devices attempt to make a connection they should pair first. how can I do that ?

The code should be in jsr82.

I set the authenticate and authorize parameters to true in my URL but it doesn't bring up the pincode box on my cell phone.
Reply With Quote

#2 Old Re: pairing devices in jsr82 - 2006-09-08, 10:25

Join Date: Dec 2005
Posts: 1,159
Location: England,UK
jimgilmour1's Avatar
jimgilmour1
Offline
Forum Nokia Champion
Quote:
Originally Posted by tfm
I want a sample code so that when my 2 bluetooth devices attempt to make a connection they should pair first. how can I do that ?

The code should be in jsr82.

I set the authenticate and authorize parameters to true in my URL but it doesn't bring up the pincode box on my cell phone.
Why do you need authentication on, There is no easy way to authenticate with it switched on.

Are you trying to block out other people like WiFi does.

All the connections should be false you will not be able to connect more than one connection with authorization.

If the server is set authorization=true no one will contact it!

code look at and modify for Java
http://discussion.forum.nokia.com/fo...highlight=obex
// ----------------------------------------------------------------------------
// CListener::SetSecurityL(TInt aChannel)
//
// sets the security of given bluetooth channel. these settings will turn
// off authentication, authorisation and encryption on given channel.
// ----------------------------------------------------------------------------
void CListener::SetSecurityL(TInt aChannel)
{
// setup channel security
TRequestStatus status;
RBTMan secManager;
TBTServiceSecurity secSettings;
TBTSockAddr listeningAddress;

// Set the Port to listen to.
listeningAddress.SetPort( aChannel );


// setup security
TUid settingsUID;
settingsUID.iUid = KBT_serviceID;
secSettings.SetUid(settingsUID);
secSettings.SetAuthentication(EFalse);
secSettings.SetAuthorisation(EFalse);
secSettings.SetEncryption(EFalse);
secSettings.SetDenied(EFalse);
// register settings with security
// Attach the security settings.
listeningAddress.SetSecurity(secSettings);

and S60 snippet shows how this works
see the whole article at

http://discussion.forum.nokia.com/fo...ad.php?t=88537


IMHO there is no reason to switch these on/true as the pair key code protects against allow connections other than signed midlets with have the push profile set on your phone.

Jim
Reply With Quote

#3 Old Re: pairing devices in jsr82 - 2006-09-08, 11:27

Join Date: Jul 2006
Posts: 23
tfm
Offline
Registered User
well the thing what I want to do is that when I want recurrenlty connect get some data of a bluetooth device and then disconnect.

But everytime the master requests a connection with my slave on the Nokia 6600, the cellphone (6600) asks me "Accept connection from ..............."

I think this dialog is generated by the Symbian OS. I want that it should only show me this dialog the first time the master attempts a connection and the slave can somehow know that this device is trusted and won't ask me again & again to "Accept connection from ............".

I thought if I pair the two cell phones us then it won't ask me again & again.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Alerting on BT devices out of range or off jameelh Bluetooth Technology 8 2006-04-07 16:44
bluetooth communication without jsr82 api trakadasp General Symbian C++ 0 2006-01-30 09:21
Using PC Suite with several devices palmcrust PC Suite API and PC Connectivity SDK 1 2004-02-25 21:05
BT pairing from application ihorsma Bluetooth Technology 0 2004-02-18 12:21
BT pairing from application ihorsma Bluetooth Technology 0 2004-02-18 12:20

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia