07-01-2012 11:20 AM
We have a Bluetooth-enabled application that has seen much stability with BlackBerry OS 4, 5 and 6. However, in recent tests with OS 7.0 and 7.1, we have run into some issues. I should note our tests have been specific to BlackBerry 9360s. I apologise in advance for the long post.
We have a simplistic Bluetooth device which initiates pairing and data transfer to our application for processing. As such we are using the BTSPP to establish a server connection to which our Bluetooth client can connect. For example:
ServerSocketConnection conn = (ServerSocketConnection) Connector.open
ServiceRecord serviceRecord = LocalDevice.getLocalDevice().getRecord(conn);
SocketConnection socket = (SocketConnection) conn.acceptAndOpen();
This process works perfectly until the BlackBerry is rebooted (battery dies / battery pulled). Typically, it will continue accepting connections as it should. However, on occasion the application does not get passed the data being transferred. The only way to get it to work again is to either re-pair or keep on pulling the battery until it mysteriously starts working.
The issue seems to be in correlation with the server’s channel number changing. For example, if I pair when the above code prints "btspp://A06CEC2C2294:2;authenticate=false;encrypt=
Does anyone have any insight into this issue? Why does the channel number sporadically change and seem to break the application? Is there a way around this issue?
Thank you in advance!
07-12-2012 01:41 PM