You Are Here:

Community: Developer Discussion Boards

#1 Old Selecting a BlueTooth device automatically. - 2002-11-19, 13:51

Join Date: Mar 2003
Posts: 10
movetek
Offline
Registered User
hi, group
I'm trying connect the Nokia 7650 to a bluetooth device programatically,
without the interact of the user.
This is the code for searching bluetooth devices:
********************************
_LIT8(emtac,"EMTAC BTGPS"
TInt fin=0;
TRequestStatus status;
TInquirySockAddr addr;
TProtocolDesc pInfo;
RHostResolver hr;

User::LeaveIfError(iSocketServer.Connect());
//_LIT(KL2Cap, "BTLinkManager"


User::LeaveIfError(iSocketServer.FindProtocol(_L("BTLinkManager&quot,pInfo));
// 2. Create and initialise an RHostResolver


User::LeaveIfError(hr.Open(iSocketServer,pInfo.iAddrFamily,pInfo.iProtocol))
;

// 3. Set up a discovery query and start it
addr.SetIAC(KGIAC);
addr.SetAction(KHostResName|KHostResInquiry);

hr.GetByAddress(addr, iServiceSearcher->iName, status);

User::WaitForRequest(status);
while (iServiceSearcher->iName.Compare(emtac)==0 && fin
!=KErrHostResNoMoreResults)
{
fin = hr.Next(iServiceSearcher->iName);
}

after that i don't Know what I must do.
I think that i must find the bluetooth service but I don't know How.
Please any Help???
Thx in advance ;-)
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

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