The LIBUSB_ERROR_PIPE error also occurred when I tried to use the device in
Linux. This sounds kind of similar to my problem (haven't looked at it
again since i posted my problem).

https://sourceforge.net/p/sigrok/mailman/message/35236612/

Hopefully your post get me a bit further then. Good luck.




2016-07-31 14:21 GMT+02:00 Erik Montnemery <[email protected]>:

> With latest daily build (I tested July 29th 2016) Hantek 6022BE is not
> useable in Windows.
>
> Symptoms:
> pulseview:
> - Does not capture any data
>
> sigrok-cli:
> - Reports error "sr: hantek-6xxx: Failed to control transfer: 0xe5:
> LIBUSB_ERROR_PIPE."
> - Only captures date when capturing an amount of samples that is a power
> of 2
>
> With the patch below, both pulseview and sigrok-cli can capture data
> although the LIBUSB error remains.
> Any idea what is causing the LIBUSB error?
>
> Note1: I'm not the original author of the patch, it's from reply #359
> here:
> http://www.eevblog.com/forum/testgear/sainsmart-dds120-usb-oscilloscope-(buudai-bm102)/350/
> Note2
> <http://www.eevblog.com/forum/testgear/sainsmart-dds120-usb-oscilloscope-(buudai-bm102)/350/Note2>:
> The patch has only been tested by me in Windows 10 64 bit.
>
> Suggested patch:
> diff --git a/src/hardware/hantek-6xxx/api.c
> b/src/hardware/hantek-6xxx/api.c
> index 8848c91..e81ee04 100644
> --- a/src/hardware/hantek-6xxx/api.c
> +++ b/src/hardware/hantek-6xxx/api.c
> @@ -531,7 +531,11 @@ static uint32_t data_amount(const struct sr_dev_inst
> *sdi)
>                 data_left = devc->samplerate * NUM_CHANNELS;
>         }
>
> -       data_left += MIN_PACKET_SIZE; /* Driver does not handle small
> buffers. */
> +       uint32_t i;
> +       /* Round up to nearest power of two */
> +       for (i = MIN_PACKET_SIZE; i < data_left; i *= 2)
> +         ;
> +       data_left = i;
>
>         sr_spew("data_amount %u", data_left);
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> sigrok-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sigrok-devel
>
------------------------------------------------------------------------------
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to