Hi,

I'm testing Bluetooth (JSR 82) in 6230 and 6600. For 6230, phone would pop one Alert to inform user that the Bluetooth connection is closed (but in my program, I can't catch the event).

In my Thread (conn is "L2CAPConnection"):
public void run() {
while (true) {
try {
if (conn.ready()) {
}
} catch (IOException e) {
}
}
}

According to the JavaDoc, for the ready() -- "java.io.IOException - if the connection is closed". But in the real device, IOExcetion is not throwed even the connection is closed. Is it any ways to catch the event ? There is somewhere can set the timeout ?

Please guide me how to do it.
Thanks.

http://www.geocities.com/akokchai/