You Are Here:

Community: Developer Discussion Boards

#1 Old Bluetooth connections in SDK 3rd FP2 version1.1 - 2008-11-07, 09:17

Join Date: Dec 2006
Posts: 40
landerluu
Offline
Registered User
Hello dear all,

I am developing the project using Bluetooth connections in sdk 3FP2.
because The Bluetooth Engine API provides high-level access to Bluetooth settings and device management. There is a compatibility break in the Bluetooth Engine API between S60 3rd Edition, Feature Pack 1 and Feature Pack 2.
so when I install the old version(3.0\3.1) Bluetooth Engine to new version(3FP2). it can not establish the connections. when set the RSocket::Accept() functions to setActive(), but can not call the RunL() to implement the state change:
following is the code:
//////////////////////////////////////////////
CBTENGINE::ConnectL()
{
if (iState != EDisconnected)
{
TRACE("iState is not EDisconnected");
User::Leave(KErrInUse);
}

User::LeaveIfError(iSocketServer.Connect());
User::LeaveIfError(iListeningSocket.Open(iSocketServer, KServerTransportName));

// Get a channel to listen on - same as the socket's port number
User::LeaveIfError(iListeningSocket.GetOpt(KRFCOMMGetAvailableServerChannel, KSolBtRFCOMM, iChannel));

TBTSockAddr listeningAddress;
listeningAddress.SetPort(iChannel);

User::LeaveIfError(iListeningSocket.Bind(listeningAddress));
User::LeaveIfError(iListeningSocket.Listen(KListeningQueSize));

/////////
iAcceptedSocket.Close(); // close old connection - if any
User::LeaveIfError(iAcceptedSocket.Open(iSocketServer)); // Open abstract socket

iState = EConnecting;

// set the listening socket to accept new connections on
// the accepted socket.


iListeningSocket.Accept(iAcceptedSocket, iStatus);
SetActive();
}
/////////////////////////////////////////////
CBTENGINE::RunL()
{
case EConnecting:
{
// do not accept any more connections
iAdvertiser->StopAdvertisingL();
iState = EConnected;
break;
}
}


when the code run to the iListeningSocket.Accept(iAcceptedSocket, iStatus);
SetActive();
to wait for the connect. but there are no response when phones connect each other.
so the RunL() function can not work.

any one can help me??
Reply With Quote

#2 Old Re: Bluetooth connections in SDK 3rd FP2 version1.1 - 2008-11-07, 12:59

Join Date: Sep 2007
Posts: 52
Location: BeiJing
Send a message via MSN to haykey Send a message via Skype™ to haykey
haykey
Offline
Regular Contributor
JiaDong,I am also waiting for this answer.
any answer?
Reply With Quote

#3 Old Re: Bluetooth connections in SDK 3rd FP2 version1.1 - 2008-11-10, 05:49

Join Date: Dec 2006
Posts: 40
landerluu
Offline
Registered User
perfect , I can not solve this problem.
Reply With Quote

#4 Old Re: Bluetooth connections in SDK 3rd FP2 version1.1 - 2008-11-11, 12:54

Join Date: Mar 2008
Posts: 577
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
This is known that there is a break between 3.1 & 3.2
See this Link


-Mahbub
Reply With Quote

#5 Old Re: Bluetooth connections in SDK 3rd FP2 version1.1 - 2008-11-12, 02:21

Join Date: Sep 2007
Posts: 52
Location: BeiJing
Send a message via MSN to haykey Send a message via Skype™ to haykey
haykey
Offline
Regular Contributor
Quote:
Originally Posted by mahbub_s60 View Post
This is known that there is a break between 3.1 & 3.2
See this Link
mahbub,I am facing the same problem as landerlu.I read the document about the break from 3.2.I found this sentence."For applications using Bluetooth Engine API, this change causes both binary and source compatibility breaks between those platform versions. "
But we don't use Bluetooth Engine API in our application,so in the platform of 3.2,application can be built successfully
Reply With Quote

#6 Old Re: Bluetooth connections in SDK 3rd FP2 version1.1 - 2008-11-14, 13:14

Join Date: Mar 2008
Posts: 577
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
Hi,
You can try this example, this should work platform independent way here is the link


-Mahbub
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
Getting frustrated with NCF 1.2 and 3rd edition SDK jzxu Symbian Networking & Messaging 0 2006-12-10 01:15
Advice Required : How do I compile the same app with the 2nd Ed and 3rd Ed SDK? marquk Carbide.c++ IDE and plug-ins 1 2006-11-14 12:09
Http connection problem in 6310i teahola Mobile Java General 1 2002-10-03 19:46
Connecting 6210 via Bluetooth to PC Connectivity SDK Stone_Rose PC Suite API and PC Connectivity SDK 0 2002-08-06 09:50
Bluetooth samples published in the Series 60 SDK v0.9! seppo_fn Bluetooth Technology 2 2002-07-09 10:00

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