docs: void writeOpCode(@NonNull final BluetoothGattCharacteristic characteristic, @NonNull final byte[] value, final boolean reset)
              throws DeviceDisconnectedException, DfuException, UploadAbortedException {
  		if (mAborted)
  			throw new UploadAbortedException();
  		mReceivedData = null;
  		mError = 0;
  		mRequestCompleted = false;
  		/*
  		 * Sending a command that will make the DFU target to reboot may cause an error 133
  		 * (0x85 - Gatt Error). If so, with this flag set, the error will not be shown to the user
  		 * as the peripheral is disconnected anyway.
  		 * See: mGattCallback#onCharacteristicWrite(...) method
  		 */
  		mResetRequestSent = reset;
  
  		characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT);
  		characteristic.setValue(value);
  		mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_VERBOSE, "Writing to characteristic " + characteristic.getUuid());
  		mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_DEBUG, "gatt.writeCharacteristic(" + characteristic.getUuid() + ")");
  		mGatt.writeCharacteristic(characteristic);
  
  		// We have to wait for confirmation
  		try {
  			synchronized (mLock) {
  				while ((!mRequestCompleted && mConnected && mError == 0) || mPaused)
  					mLock.wait();
  			}
  		} catch (final InterruptedException e) {
  			loge("Sleeping interrupted", e);
  		}
  		if (!mResetRequestSent && !mConnected)
  			throw new DeviceDisconnectedException("Unable to write Op Code " + value[0] + ": device disconnected");
  		if (!mResetRequestSent && mError != 0)
  			throw new DfuException("Unable to write Op Code " + value[0], mError);
  	}