fluke-45: disable ECHO test, it confuses other SCPI devices
Disable the ECHO test in the Fluke 45 probe routine which violates the SCPI protocol and makes other devices unavailable. This fixes bug #1272.
This commit is contained in:
parent
712f7d5e40
commit
71db2d4d06
|
@ -31,6 +31,12 @@
|
||||||
#include "scpi.h"
|
#include "scpi.h"
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This test violates the SCPI protocol, and confuses other devices.
|
||||||
|
* Disable it for now, until a better location was found.
|
||||||
|
*/
|
||||||
|
#define ECHO_TEST 0
|
||||||
|
|
||||||
static const uint32_t scanopts[] = {
|
static const uint32_t scanopts[] = {
|
||||||
SR_CONF_CONN,
|
SR_CONF_CONN,
|
||||||
SR_CONF_SERIALCOMM,
|
SR_CONF_SERIALCOMM,
|
||||||
|
@ -62,11 +68,14 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
const struct fluke_scpi_dmm_model *model = NULL;
|
const struct fluke_scpi_dmm_model *model = NULL;
|
||||||
gchar *channel_name;
|
gchar *channel_name;
|
||||||
|
#if ECHO_TEST
|
||||||
char *response;
|
char *response;
|
||||||
|
#endif
|
||||||
|
|
||||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||||
sdi->conn = scpi;
|
sdi->conn = scpi;
|
||||||
|
|
||||||
|
#if ECHO_TEST
|
||||||
/* Test for serial port ECHO enabled. */
|
/* Test for serial port ECHO enabled. */
|
||||||
response = NULL;
|
response = NULL;
|
||||||
sr_scpi_get_string(scpi, "ECHO-TEST", &response);
|
sr_scpi_get_string(scpi, "ECHO-TEST", &response);
|
||||||
|
@ -74,6 +83,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
|
||||||
sr_err("Serial port ECHO is ON. Please turn it OFF!");
|
sr_err("Serial port ECHO is ON. Please turn it OFF!");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Get device IDN. */
|
/* Get device IDN. */
|
||||||
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
|
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
|
||||||
|
|
Loading…
Reference in New Issue