code: protected void disconnect(@NonNull final BluetoothGatt gatt) {
  		if (mConnectionState == STATE_DISCONNECTED)
  			return;
  
  		sendLogBroadcast(LOG_LEVEL_VERBOSE, "Disconnecting...");
  		mProgressInfo.setProgress(PROGRESS_DISCONNECTING);
  		mConnectionState = STATE_DISCONNECTING;
  
  		logi("Disconnecting from the device...");
  		sendLogBroadcast(LOG_LEVEL_DEBUG, "gatt.disconnect()");
  		gatt.disconnect();
  
  		// We have to wait until device gets disconnected or an error occur
  		waitUntilDisconnected();
  		sendLogBroadcast(LOG_LEVEL_INFO, "Disconnected");
  	}
docs: Disconnects from the device. This is SYNCHRONOUS method and waits until the callback returns
  new state. Terminates immediately if device is already disconnected. Do not call this method
  directly, use {@link #terminateConnection(android.bluetooth.BluetoothGatt, int)} instead.
  
  @param gatt the GATT device that has to be disconnected.