Determining  whether the device is ready