You Are Here:

Community: Developer Discussion Boards

#1 Old Error: BluetoothStateException:Busy - 2006-04-05, 17:34

Join Date: Apr 2006
Posts: 4
mobile_tekki
Offline
Registered User
Hi All,

I am developing a basic Bluetooth server client interaction app. I have debugged the server and there is no problem with the it. But the client fails during the serviceSearch. Below is the code for the client.

public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {
try {
devices.addElement( btDevice );
} catch (Exception e) {
System.out.println("Device Discovered Error: " + e);
}
}

public void inquiryCompleted(int discType) {
System.out.println("InquiryCompleted");
for(int i=0; i < devices.size(); i++)
{
RemoteDevice remoteDevice = (RemoteDevice)devices.elementAt(i);
try
{
int searchID = discoveryAgent.searchServices(null,new UUID[]{ uuid },remoteDevice,this);

}catch (Exception e)
{
System.out.println(name + "Device Discovered Error: " + e );

}
}
}

The catch statement is giving me
BluetoothStateException:Busy
for every device that has been added to the list.

Does anyone have an idea on why this is happening? I first thot its something to do with the device search not being completed. But i have put this code in inquiryCompleted where deviceSearch has been completed. Why does the serviceSearch give me busy indication?

I am using a Nokia 6681 and a 6630 for testing the app.

Any insights into this problem will be greatly appreciated.
Thanks
Reply With Quote

#2 Old Re: Error: BluetoothStateException:Busy - 2006-04-07, 11:18

Join Date: Apr 2006
Posts: 4
mobile_tekki
Offline
Registered User
I seem to have cracked the problem.
I had to induce some delay between the deviceSearch and serviceSearch.
I did this by putting a timer after inquiryCompleted.

Hope the resolution comes in handy when someone else comes across the same problem.
Chow for now
Reply With Quote

#3 Old Unhappy Re: Error: BluetoothStateException:Busy - 2006-04-21, 11:16

Join Date: Mar 2003
Posts: 16
benjamin_lee
Offline
Registered User
Dear Tekki, I have run into the same problem while developing a BT game on S60. Keep getting BluetoothStateException:Busy when searching services on discovered devices.

Have been trying with 6681, 6630, 6600 and 3230 and have set Timer to delay service search for 5 seconds as suggested on your post. But still the same error! Could you provide more details on your solution? Actual solution code will be much appreciated.
Last edited by benjamin_lee : 2006-04-30 at 10:13.
Reply With Quote

#4 Old Re: Error: BluetoothStateException:Busy - 2007-08-27, 11:56

Join Date: Aug 2007
Posts: 1
ferblaca
Offline
Registered User
I have the same problem !!!

how solve it???

thankss
Reply With Quote

#5 Old 2007-08-27, 12:41

Join Date: Mar 2003
Posts: 2,617
traud
Offline
Super Contributor
http://discussion.forum.nokia.com/fo...splay.php?f=56
http://discussion.forum.nokia.com/fo...d.php?t=109289
String max = javax.bluetooth.LocalDevice.getProperty("bluetooth.sd.trans.max");
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