Wait before sending the firmware data

Without the small delay, sending the first frame often fails. Trying to
read the ACK response byte just fails with a timeout, and no data is
received at all. The bootloader is probably not ready to receive data
yet.
This commit is contained in:
Jef Driesen 2021-01-11 20:54:53 +01:00
parent 0239329f06
commit 939470df52

View File

@ -903,6 +903,9 @@ divesystem_idive_device_fwupdate (dc_device_t *abstract, const char *filename)
goto error_free;
}
// Wait before sending the firmware data.
dc_iostream_sleep (device->iostream, 100);
// Upload the firmware.
unsigned int offset = 0;
while (offset + 2 <= size) {