| Reply | « Previous Thread | Next Thread » |
|
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 |
| mobile_tekki |
| View Public Profile |
| Find all posts by mobile_tekki |
|
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 |
| mobile_tekki |
| View Public Profile |
| Find all posts by mobile_tekki |
|
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.
|
| benjamin_lee |
| View Public Profile |
| Find all posts by benjamin_lee |
|
I have the same problem !!!
how solve it??? thankss |
|
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|