Android-DFU-Library icon indicating copy to clipboard operation
Android-DFU-Library copied to clipboard

DfuServiceInitiator requires a new method

Open xiaozhao1995 opened this issue 1 year ago • 0 comments

Target

Library

Describe the feature

	/**
	 * Sets the time required by the device to reboot. The library will wait for this time to disconnect
	 * for the device to make sure device has received BLE_GATTC_EVT_HVX
	 *
	 * @param disconnectTime the disconnect time in milliseconds,default 0.
	 * @return the builder
	 */
	public DfuServiceInitiator setDisconnectTimeout(final long disconnectTime) {
		this.disconnectTime = disconnectTime;
		return this;
	}

We found that on some phones, such as Huawei mate30pro, Huawei pura70, if you call (ButtonlessDfuImpl#performDfu)disconnect immediately after receiving 0x200101, the device may not receive the BLE_GATTC_EVT_HVX event, resulting in an interrupt into boot.

xiaozhao1995 avatar Jun 11 '24 01:06 xiaozhao1995