docs: private void writeInitPacket(final BluetoothGattCharacteristic characteristic, final byte[] buffer, final int size)
  			throws DeviceDisconnectedException, DfuException, UploadAbortedException {
  		if (mAborted)
  			throw new UploadAbortedException();
  		byte[] locBuffer = buffer;
  		if (buffer.length != size) {
  			locBuffer = new byte[size];
  			System.arraycopy(buffer, 0, locBuffer, 0, size);
  		}
  		mReceivedData = null;
  		mError = 0;
  		mInitPacketInProgress = true;
  
  		characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE);
  		characteristic.setValue(locBuffer);
  		logi("Sending init packet (Value = " + parse(locBuffer) + ")");
  		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 ((mInitPacketInProgress && mConnected && mError == 0) || mPaused)
  					mLock.wait();
  			}
  		} catch (final InterruptedException e) {
  			loge("Sleeping interrupted", e);
  		}
  		if (!mConnected)
  			throw new DeviceDisconnectedException("Unable to write Init DFU Parameters: device disconnected");
  		if (mError != 0)
  			throw new DfuException("Unable to write Init DFU Parameters", mError);
  	}