Added check for device to BLE connection