]> sigrok.org Git - libsigrok.git/commitdiff
scpi/usbtmc: fix remote locking according to USBTMC spec
authorStefan Brüns <redacted>
Sat, 16 Apr 2016 21:37:40 +0000 (23:37 +0200)
committerUwe Hermann <redacted>
Sat, 23 Apr 2016 15:08:44 +0000 (17:08 +0200)
According to USBTMC usb488 subclass spec, wValue hast to be 0 for both
LOCAL_LOCKOUT and GO_TO_LOCAL. At least required for R&S HMO1002, the
bad request results in a STALL. Fixes bug #783.

src/scpi/scpi_usbtmc_libusb.c

index 3dd622a2e44829c007fda3670103508e4ff5eb1d..6e472750cb5d2f261227a9c2081f3f75c1ddb3ff 100644 (file)
@@ -238,7 +238,7 @@ static int scpi_usbtmc_remote(struct scpi_usbtmc_libusb *uscpi)
                        LIBUSB_ENDPOINT_IN         |
                        LIBUSB_REQUEST_TYPE_CLASS  |
                        LIBUSB_RECIPIENT_INTERFACE,
-                       LOCAL_LOCKOUT, 1,
+                       LOCAL_LOCKOUT, 0,
                        uscpi->interface,
                        &status, 1,
                        TRANSFER_TIMEOUT);
@@ -276,7 +276,7 @@ static void scpi_usbtmc_local(struct scpi_usbtmc_libusb *uscpi)
                        LIBUSB_ENDPOINT_IN         |
                        LIBUSB_REQUEST_TYPE_CLASS  |
                        LIBUSB_RECIPIENT_INTERFACE,
-                       GO_TO_LOCAL, 1,
+                       GO_TO_LOCAL, 0,
                        uscpi->interface,
                        &status, 1,
                        TRANSFER_TIMEOUT);