On Mon, Jan 22, 2018 at 10:34 AM, Romain Tartière <rom...@blogreen.org>
wrote:


> I do not have access to such device…  In fact, when I fixed the issue
> with my Cypress FX2, I found out that the same problem existed with other
> drivers, so I fixed those which where obvious, but mabe some less
> obvious ones exist…
>
> Maybe you can help hunting the problem?  Start by locating the place
> where the first error message is emitted:
>

It will fail on first libusb_*() after libusb_open(), in
dreamsourcelab-dslogic/api.c, line 189:

        if (des.iManufacturer == 0) {
            manufacturer[0] = '\0';
        } else if ((ret = libusb_get_string_descriptor_ascii(hdl,
// <- this will return -99
                des.iManufacturer, (unsigned char *) manufacturer,
                sizeof(manufacturer))) < 0) {
            sr_warn("Failed to get manufacturer string descriptor: %s.",
                libusb_error_name(ret));
            continue;
        }

After following calls through libusb this is what I got:
    libusb_get_string_descriptor_ascii() ->
    libusb20_dev_req_string_simple_sync() ->
    libusb20_dev_req_string_sync() ->
    libusb20_dev_request_sync() ->
    pdev->methods->do_request_sync() ->
    ugen20_do_request_sync() ->
    ioctl(pdev->file_ctrl, IOUSB(USB_DO_REQUEST), &req);
ioctl() will return -1, and errno will be 5 (EIO)


> > sr: dreamsourcelab-dslogic: Failed to send start command:
> LIBUSB_ERROR_NO_DEVICE.
>                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> …then find what leads to this situations… (yeah, easy to say :-) but
> their is really no need for a fancy debugger: just adding a bunch of
> 'printf()' to see the execution path help a lot!)
>

I managed only once to get error on sending the start command, after that
error was on stop command.
Changing USB ports and firmware didn't help.

Here are some printfs after various runs, I hope something will be helpful.
If not, say, and I run it again :)

DBG: src/hardware/dreamsourcelab-dslogic/api.c:193 scan() > VID: 2a0e, PID:
0003 libusb_open() ret: 0
DBG: src/hardware/dreamsourcelab-dslogic/api.c:229 scan() >
libusb_close(hdl)
DBG: src/hardware/dreamsourcelab-dslogic/protocol.c:217
command_stop_acquisition() raw ret: -4
sr: dreamsourcelab-dslogic: Failed to send stop command:
LIBUSB_ERROR_NO_DEVICE.
DBG: src/hardware/dreamsourcelab-dslogic/protocol.c:1058
dslogic_acquisition_start() > command_stop_acquisition() failed, ret: -1,
will return now
sr: session: Could not start dreamsourcelab-dslogic device usb/2-1.2
acquisition.
DBG: src/hardware/dreamsourcelab-dslogic/protocol.c:217
command_stop_acquisition() raw ret: -4
sr: dreamsourcelab-dslogic: Failed to send stop command:
LIBUSB_ERROR_NO_DEVICE.
Failed to start session.

DBG: src/hardware/dreamsourcelab-dslogic/api.c:209 scan() > is_plausible():
1
DBG: src/hardware/dreamsourcelab-dslogic/api.c:220 scan() > VID: 2a0e, PID:
0003 libusb_open() ret: 0
                                DESCRIPTOR bLength: 18
                                DESCRIPTOR bDescriptorType: 1
                                DESCRIPTOR bcdUSB: 512
                                DESCRIPTOR bDeviceClass: 255
                                DESCRIPTOR bDeviceSubClass: 255
                                DESCRIPTOR bDeviceProtocol: 255
                                DESCRIPTOR bMaxPacketSize0: 64
                                DESCRIPTOR idVendor: 2a0e
                                DESCRIPTOR idProduct: 3
                                DESCRIPTOR bcdDevice: 1
                                DESCRIPTOR iManufacturer: 1
                                DESCRIPTOR iProduct: 2
                                DESCRIPTOR iSerialNumber: 0
                                DESCRIPTOR bNumConfigurations: 1
sr: dreamsourcelab-dslogic: Failed to get manufacturer string descriptor:
LIBUSB_ERROR_OTHER.
DBG: src/hardware/dreamsourcelab-dslogic/api.c:235 scan() > raw ret: -99
No devices found.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to