| Reply | « Previous Thread | Next Thread » |
|
Join Date: Oct 2005
Posts: 1,149
Location: Hyderabad,India
Offline
Super Contributor
|
|
hi all,
Im working on an BT application.The thing is that i need to send a notification to the other mobile phone user asking him to open my application and connect to mine. Hence forth i used OBEX to connect and send a message which goes to his inbox. now,as the obex servers are not able to send messages to the client i need to transfer the connection to RFCOMM and proceed with the chat! I have done all these part.But the problem is with the swtiching between OBEX and RFCOMM. Even thogh i disconnect (closing the server and the client) im not able to connect immediately.i get the message like "Maximum amount of bluetooth connections in use.Cant establish a new one" Why is that so? Can any of you please suggest me how to recover from this problem.I need to switch the connecting protcols by staying with in the application.If i exit from the application and try again it works fine.. PLEASE HELP ME OUT!!! Regards Priju |
| Priju Jacob Paul |
| View Public Profile |
| Find all posts by Priju Jacob Paul |
|
Hi,I dont know whose OBEX stack you are using on PC. I am assuming you are using XP SP2 bluecove and de.aventena. I use these because they are free so I will talk about these as I have source code for these.
Typically they are run in a seperate Thread. This thread is not accessible once started therefore after a Thread m.start(); we need an m.join() to get back. When you opened the session with btgeop:// and recieved a SessionNotifer back as a result from the acceptAndOpen, did you know that is really a btspp:// connection that goes out and has to be replied with btspp://. Because of this I have cast my returned SessionNotifier as a StreamNotifier. ---------------------------------------------------------------- String url = "btgoep://localhost:" + uuid + ";name=BTTP;authenticate=false;master=false;encrypt=false"; try{ // obtain connection and stream to this service btServerNotifier = (StreamConnectionNotifier) Connector.open( url ); } catch ( Exception e) { e.printStackTrace(); } while (mServerState )} --------------------------------------------------------------------- This means I can open the connection and hang on to it and I can open and close channel. I do however lose the benifit of the File transfer functions onGet and onPut. Have you checked the channels with try { op.close} catch (IOexception) { System.out.put("the channel was closed");} To see if its really closed?. my process code calls a new Thread and needs to .join before I can close and leave the code. Sorry if this is vague but there is so much variance is systems today. In Java everyone has there own setup. Good Luck Jim |
| jimgilmour1 |
| View Public Profile |
| Find all posts by jimgilmour1 |
|
Reading the specification I see CLDC 1.0 supports
Quote:
using public static String propertyValue = LocalDevice localDevice.getProperty("bluetooth.connected.devices.max"); //The maximum number of connected devices supported. //This number may be greater than 7 if the implementation handles parked connections. //The string will be in Base 10 digits. public static String propertyValue = LocalDevice localDevice.getProperty("bluetooth.sd.trans.max"); //Maximum number of concurrent service discovery transactions. The string will be in Base 10 digits. Well I just hope its java you are working in. Good Luck Jim |
| jimgilmour1 |
| View Public Profile |
| Find all posts by jimgilmour1 |
|
Join Date: Oct 2005
Posts: 1,149
Location: Hyderabad,India
Offline
Super Contributor
|
|
Hi Jim,
im sorry for not keeping you updated.anyway thanks a ton for the reply.That project is all up..and for your kind information im not onto Java.Im working in c++. GoodLuck! Regards Priju |
| Priju Jacob Paul |
| View Public Profile |
| Find all posts by Priju Jacob Paul |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| About the nokia doc: A MIDlet Example Using the Wireless Messaging API ... | SStefano | Mobile Java Tools & SDKs | 2 | 2008-04-03 20:02 |
| Nokia 6310 or 8910 : PC suite not possible today | olivieradler | Bluetooth Technology | 0 | 2005-10-13 01:12 |
| createImage on Nokia Series 40 MIDP Concept SDK Beta 0.3 | GerardMason | Mobile Java Media (Graphics & Sounds) | 2 | 2003-09-30 11:00 |
| Nokia 3310 - Smart Messaging compatibility | Nokia_Archive | Smart Messaging | 2 | 2002-05-22 14:22 |