diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c index 2a714a4..6388bb5 100644 --- a/src/mares_iconhd.c +++ b/src/mares_iconhd.c @@ -326,6 +326,7 @@ mares_iconhd_transfer (mares_iconhd_device_t *device, const unsigned char comman return rc; // Discard any garbage bytes. + dc_iostream_sleep (device->iostream, 100); dc_iostream_purge (device->iostream, DC_DIRECTION_INPUT); device->available = 0; device->offset = 0; @@ -482,8 +483,8 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_ goto error_free; } - // Set the timeout for receiving data (1000 ms). - status = dc_iostream_set_timeout (device->iostream, 1000); + // Set the timeout for receiving data (3000 ms). + status = dc_iostream_set_timeout (device->iostream, 3000); if (status != DC_STATUS_SUCCESS) { ERROR (context, "Failed to set the timeout."); goto error_free;