From: Martin Ling Date: Sun, 4 May 2014 23:38:58 +0000 (+0100) Subject: rigol-ds: Quick hack to fix bug #354. X-Git-Tag: libsigrok-0.3.0~5 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=05238d2830c1cc2217d9e2c6d64203914e7fa95b;p=libsigrok.git rigol-ds: Quick hack to fix bug #354. --- diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 492b05ff..46500104 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -272,8 +272,13 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) gchar *channel_name, **version; if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) { - sr_info("Couldn't get IDN response."); - return NULL; + sr_info("Couldn't get IDN response, retrying."); + sr_scpi_close(scpi); + sr_scpi_open(scpi); + if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) { + sr_info("Couldn't get IDN response."); + return NULL; + } } for (i = 0; i < ARRAY_SIZE(supported_models); i++) {