sr_scpi_hw_info_free(hw_info);
hw_info = NULL;
- sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
+ /* Don't send SCPI_CMD_LOCAL for HP 66xxB devices using SCPI over GPIB */
+ if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
+ scpi->transport == SCPI_TRANSPORT_LIBGPIB))
+ sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
return sdi;
}
return SR_ERR;
devc = sdi->priv;
- sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_REMOTE);
+
+ /* Don't send SCPI_CMD_REMOTE for HP 66xxB devices using SCPI over GPIB */
+ if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
+ scpi->transport == SCPI_TRANSPORT_LIBGPIB))
+ sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_REMOTE);
+
devc->beeper_was_set = FALSE;
if (sr_scpi_cmd_resp(sdi, devc->device->commands, 0, NULL,
&beeper, G_VARIANT_TYPE_BOOLEAN, SCPI_CMD_BEEPER) == SR_OK) {
if (devc->beeper_was_set)
sr_scpi_cmd(sdi, devc->device->commands,
0, NULL, SCPI_CMD_BEEPER_ENABLE);
- sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
+
+ /* Don't send SCPI_CMD_LOCAL for HP 66xxB devices using SCPI over GPIB */
+ if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
+ scpi->transport == SCPI_TRANSPORT_LIBGPIB))
+ sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
return sr_scpi_close(scpi);
}
};
static const struct scpi_command hp_6630b_cmd[] = {
+ /*
+ * SCPI_CMD_REMOTE and SCPI_CMD_LOCAL are not used when GPIB is used,
+ * otherwise the device will report (non critical) error 602.
+ */
{ SCPI_CMD_REMOTE, "SYST:REM" },
{ SCPI_CMD_LOCAL, "SYST:LOC" },
{ SCPI_CMD_GET_OUTPUT_ENABLED, "OUTP:STAT?" },