07-22-2009 06:45 PM
I have written a small application that communicates with a bluetooth device (Serial Port Profile) that acts as the master (i.e. it sends data whenever it is ready). This device communicates fine with my PC. Below is a snippet of my code which runs on a background thread:
String url = "btspp://localhost:10;name=Access;authenticate=tru
_server = (StreamConnectionNotifier) Connector.open(url, Connector.READ_WRITE, false);
String msg = e.toString();
//Waiting for connection and receiving data:
StreamConnection connection = null;
connection = _server.acceptAndOpen();
This code worked for 2 days fine. Then something happened. What I believe happened is this: The application was being debugged through the serial port connection in order to have the bluetooth working. I realized where a bug was and went to change it. Stopped the debugger and recompiled the code (resigned etc.). I then went to the Application Loader and uninstalled the application. What I forgot to do was actually exit the application on the device. So because a backround thread was running this caused a complete reboot of the device. At this point, I believe that it left the serial port connected or marked somehow as now no matter what I do (even to the drastic extent of re-installing my device OS), the bluetooth device cannot connect. What I need to know is if there is anyway I can examine the records in the Bluetooth Serial Port Database to see if there is actually a connection still out there. If there is such a way, can I remove it.
I have tried changing the port number from 10 to something else (8) with no luck. Once before I made this work with port 1 but that no longer responds either.
I have also tried creating UUID's and using those (either long form, x1101 or something like 10) and nothing works. The device fails to communicate with the Blackberry. Also, I have disabled Desktop Connectivity in the Bluetooth options.
My OS: 188.8.131.52
My Device 8110/Rogers