title: Detecting Bluetooth Device Sleep State Android
body: <p>I am working on an application which has Bluetooth connection as core part. Currently the app is connecting to and communicating with the Bluetooth device successfully. The main problem now is that the device we are using to collect data goes into sleep mode after some idle condition. </p>
  
  <p>My question is, how can I detect that the device is in sleep mode so that my application can ask the user to wake up the device?</p>
  
  <p>I am connecting through SSP. Connection code is exact copy of Bluetooth Chat application from API demo.</p>
  
  <p><strong>Sleep Mode</strong> -- The device (Not Mobile) to which my application is connected runs on a battery, so optimize use of battery if Android application don't any request to the device in 1 min Device goes in sleep mode.(May be off without dropping connection). So my application need to catch this condition and let the user know that device is in sleep mode and wake it up so it can respond to applications request.
  This is the best way I can explain sleep mode. Keep in mind sleep mode of Bluetooth device and not the android mobile.</p>