I am looking for some help with a problem I have on a 6680. I have a Bluetooth application which works okay on a 6600. When I try to run it on my 6680 I get IOExceptions when trying to read or write data.

There seems to be a known issue with the 6680 where an IOException is thrown while reading an InputStream if the stream is closed by the sender before the recipient has finished reading it. The exception is thrown when the loop ends: while((c = in.read()) != -1). When the stream ends (it should read -1) the exception is being thrown. I read that to get around this I need to keep the sending stream open until the recipient has finished reading. How do I do this? Do I put a wait() on the other thread?

The second problem I am having is trying to open the OutputStream. I have a StreamConnection and when it tries to open the actual OutoutStream an IOException is thrown. I don't know why. Has anybody come across this on the 6680 or does anyone have any suggestions?

Any help would be much appreciated as I don't have long to get the application working on the phone!