What is the best way to determine when connection is lost? My NXT is connected to my Android via bluetooth and I'm looking for a good way to determine when the connection is lost. Eg: The user of the Android disables the bluetooth or perhaps walks out of range.
I thought that when the NXT tries to send data and fails, I could use that as a sign that the connection has been lost but I'm just not having any luck. I've also tried Bluetooth.getOpenPort(); but this seems to return 0 (even though the connection is still running).
What about Bluetooth.getStatus();? What values does it return?
Anyone have any hints on the best way to do this?
