You Are Here:

Community: Developer Discussion Boards

#1 Old Filtering of BT devices during discovery - 2004-11-13, 15:04

Join Date: Feb 2004
Posts: 2
JasonRees
Offline
Registered User
Is there ANY way of filtering devices by major/minor device class during Bluetooth discovery on a Series 60 phone?I have tied the simpler Rnotifier method:-
…..
if (!iIsDeviceSelectorConnected)
{
User::LeaveIfError(iDeviceSelector.Connect());
iIsDeviceSelectorConnected = ETrue;
}

// Request a device selection
TBTDeviceSelectionParamsPckg selectionFilter;
selectionFilter().SetUUID(ServiceClass());
selectionFilter().SetDeviceClass(TBTDeviceClass(KMajorServiceClass….,KMajorDeviceClass...,KMinorDeviceClass….));

iDeviceSelector.StartNotifierAndGetResponse(
aObserverRequestStatus,
KDeviceSelectionNotifierUid,
selectionFilter,
iResponse);
…..

No filtering of devices takes place (as mentioned in other postings in this forum).
Following Seppo's advice I then changed to an RHostResolver based approach using my own Active Object and UI:-

….
// initialize host resolver
User::LeaveIfError(iResolver.Open(*iSocketServ, pdesc.iAddrFamily, pdesc.iProtocol));

// start device discovery by invoking remote address lookup
iAddr.SetIAC(KGIAC);
iAddr.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
iAddr.SetMajorClassOfDevice(EMajorDevicePhone); //DOESNT WORK!

iResolver.GetByAddress(iAddr, iEntry, iStatus);
SetActive(); // using local request status
….

The RunL code contains:-
// new device data entry
TDeviceData *devData = new (ELeave) TDeviceData();
devData->iDeviceName = iEntry().iName;
devData->iDeviceAddr = static_cast<TBTSockAddr>(iEntry().iAddr).BTAddr();
devData->iDeviceServicePort = 0;

// add device data entry
iDeviceList.Append(devData);

….

// get next discovered device
iResolver.Next(iEntry, iStatus);
SetActive();

Unfortunately, this method dosen't provide any filtering either! (all devices are shown)

Does ANYBODY know how this can be done on a Series 60 phone? If Nokia are aware that this is not possible, I would like to know, if any of you have a good solution to this , I would also be very grateful.
Many Thanks

Jason
Reply With Quote

#2 Old Re: Filtering of BT devices during discovery - 2006-01-16, 12:32

Join Date: Jan 2005
Posts: 63
amitsingh18's Avatar
amitsingh18
Offline
Regular Contributor
Quote:
Originally Posted by JasonRees
Is there ANY way of filtering devices by major/minor device class during Bluetooth discovery on a Series 60 phone?I have tied the simpler Rnotifier method:-
�..
if (!iIsDeviceSelectorConnected)
{
User::LeaveIfError(iDeviceSelector.Connect());
iIsDeviceSelectorConnected = ETrue;
}

// Request a device selection
TBTDeviceSelectionParamsPckg selectionFilter;
selectionFilter().SetUUID(ServiceClass());
selectionFilter().SetDeviceClass(TBTDeviceClass(KMajorServiceClass�.,KMajorDeviceClass...,KMinorDeviceClass�.));

iDeviceSelector.StartNotifierAndGetResponse(
aObserverRequestStatus,
KDeviceSelectionNotifierUid,
selectionFilter,
iResponse);
�..

No filtering of devices takes place (as mentioned in other postings in this forum).
Following Seppo's advice I then changed to an RHostResolver based approach using my own Active Object and UI:-

�.
// initialize host resolver
User::LeaveIfError(iResolver.Open(*iSocketServ, pdesc.iAddrFamily, pdesc.iProtocol));

// start device discovery by invoking remote address lookup
iAddr.SetIAC(KGIAC);
iAddr.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
iAddr.SetMajorClassOfDevice(EMajorDevicePhone); //DOESNT WORK!

iResolver.GetByAddress(iAddr, iEntry, iStatus);
SetActive(); // using local request status
�.

The RunL code contains:-
// new device data entry
TDeviceData *devData = new (ELeave) TDeviceData();
devData->iDeviceName = iEntry().iName;
devData->iDeviceAddr = static_cast<TBTSockAddr>(iEntry().iAddr).BTAddr();
devData->iDeviceServicePort = 0;

// add device data entry
iDeviceList.Append(devData);

�.

// get next discovered device
iResolver.Next(iEntry, iStatus);
SetActive();

Unfortunately, this method dosen't provide any filtering either! (all devices are shown)

Does ANYBODY know how this can be done on a Series 60 phone? If Nokia are aware that this is not possible, I would like to know, if any of you have a good solution to this , I would also be very grateful.
Many Thanks

Jason

Did you find any solution for the same for device filtering...if yes, then do let me know please...

Thanks Alot

Regards
Amit
Reply With Quote

#3 Old Re: Filtering of BT devices during discovery - 2006-04-07, 11:48

Join Date: Feb 2006
Posts: 37
leomil
Offline
Registered User
Hi,
I have exactly the same problem! I found many posts on the forum but no clear answer whether it is a problem of the sdk or that we are unable to use it correctly. I tried both RNotifier and RHostResolver to filter the devices, but no way, all the devices are shown in all kind of combinations of Major and Minor Classes and Services!

I hope somebody can help all of us that have this problem!
Thank you!
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