Finally I found the issue. Indeed the problem was the firmware, I was
setting up the isochronous endpoint with handshake. I have done some
raw tests and it feels like it is working. Thank you all.

2013/1/20 Wander Lairson Costa <wander.lair...@gmail.com>:
> 2013/1/20 Xiaofan Chen <xiaof...@gmail.com>:
>> On Fri, Jan 11, 2013 at 6:37 PM, Wander Lairson Costa
>> <wander.lair...@gmail.com> wrote:
>>>>> [1] https://github.com/walac/isochronous
>>>>>
>>>>> [2] https://github.com/walac/bmfw
>>>>
>>>> Can your test your firmware against the BenchmarkCon host software
>>>> from libusbdotnet? Under Linux, libusbdotnet will use libusb-1.0
>>>> API so it indirectly tests the libusbx (assume you use libusbx
>>>> as the libusb-1.0 API provider).
>>>
>>> I guess so. Probably I will have to change the code to match my
>>> endpoints (they are in alternate setting 2). I will test and report
>>> the results.
>>
>> I just built your test firmware with a PIC18F87J50 USB PIM
>> with Microchip MPLAB 8.89 and MPLAB C18 3.44. Then I tested
>> it with libusbK 3.0.5.16 under Windows with libusbK.sys
>> driver, it seems to work. But this test does not involve
>> libusbx since libusbx does not suppport isoc transfer under
>> Windows as of now.
>>
>> C:\libusbK-dev-kit>klist
>>
>> Loading USB ID's maintained by Stephen J. Gowdy <linux.usb....@gmail.com>..
>>
>>  1. Benchmark Device (Microchip Technology, Inc.) [Connected]
>>     Service              : libusbK
>>     ClassGUID            : {ECFB0CFD-74C4-4F52-BBF7-343461CD72AC}
>>     DeviceID             : USB\VID_04D8&PID_FA2E\LUSBW1
>>     DeviceInterfaceGUID  : {77360352-3618-7749-A71D-1BB42062794E}
>>     SymbolicLink         : 
>> \\?\usb#vid_04d8&pid_fa2e#lusbw1#{77360352-3618-7749-
>> a71d-1bb42062794e}
>>     DevicePath           : 
>> \\?\usb#vid_04d8&pid_fa2e#lusbw1#{77360352-3618-7749-
>> a71d-1bb42062794e}
>>     SerialNumber         : LUSBW1
>>     BusNumber            : 0
>>     DeviceAddress        : 2
>>
>> Select device (1-1) :1
>>
>> Loading driver api..
>> Getting descriptors..
>>
>> -Device:
>>   bLength             :18
>>   bDescriptorType     :0x01
>>   bcdUSB              :0x0200
>>   bDeviceClass        :0x00 (Defined at Interface level)
>>   bDeviceSubClass     :0x00
>>   bDeviceProtocol     :0x00
>>   bMaxPacketSize0     :8
>>   idVendor            :0x04D8 (Microchip Technology, Inc.)
>>   idProduct           :0xFA2E
>>   bcdDevice           :0x0001
>>   iManufacturer       :1 (Travis Robinson)
>>   iProduct            :2 (Benchmark Device)
>>   iSerialNumber       :3 (LUSBW1)
>>   bNumConfigurations  :1
>> !End Device
>> -Configuration:
>>   bLength             :9
>>   bDescriptorType     :0x02
>>   wTotalLength        :78
>>   bNumInterfaces      :1
>>   bConfigurationValue :0x01
>>   iConfiguration      :0
>>   bmAttributes        :0xC0
>>   MaxPower            :50 (100ma)
>>  -Interface:
>>     bLength             :9
>>     bDescriptorType     :0x04
>>     bInterfaceNumber    :0x00
>>     bAlternateSetting   :0x00
>>     bNumEndpoints       :2
>>     bInterfaceClass     :0x00 (Defined at Interface level)
>>     bInterfaceSubClass  :0x00
>>     bInterfaceProtocol  :0x00
>>     iInterface          :0
>>    -Endpoint:
>>       bLength             :7
>>       bDescriptorType     :0x05
>>       bEndpointAddress    :0x01
>>       bmAttributes        :0x02 (Bulk)
>>       wMaxPacketSize      :16
>>       bInterval           :0x00
>>    !End Endpoint
>>    -Endpoint:
>>       bLength             :7
>>       bDescriptorType     :0x05
>>       bEndpointAddress    :0x81
>>       bmAttributes        :0x02 (Bulk)
>>       wMaxPacketSize      :16
>>       bInterval           :0x00
>>    !End Endpoint
>>  !End Interface
>>  -Interface:
>>     bLength             :9
>>     bDescriptorType     :0x04
>>     bInterfaceNumber    :0x00
>>     bAlternateSetting   :0x01
>>     bNumEndpoints       :2
>>     bInterfaceClass     :0x00 (Defined at Interface level)
>>     bInterfaceSubClass  :0x00
>>     bInterfaceProtocol  :0x00
>>     iInterface          :0
>>    -Endpoint:
>>       bLength             :7
>>       bDescriptorType     :0x05
>>       bEndpointAddress    :0x01
>>       bmAttributes        :0x03 (Interrupt)
>>       wMaxPacketSize      :16
>>       bInterval           :0x01
>>    !End Endpoint
>>    -Endpoint:
>>       bLength             :7
>>       bDescriptorType     :0x05
>>       bEndpointAddress    :0x81
>>       bmAttributes        :0x03 (Interrupt)
>>       wMaxPacketSize      :16
>>       bInterval           :0x01
>>    !End Endpoint
>>  !End Interface
>>  -Interface:
>>     bLength             :9
>>     bDescriptorType     :0x04
>>     bInterfaceNumber    :0x00
>>     bAlternateSetting   :0x02
>>     bNumEndpoints       :2
>>     bInterfaceClass     :0x00 (Defined at Interface level)
>>     bInterfaceSubClass  :0x00
>>     bInterfaceProtocol  :0x00
>>     iInterface          :0
>>    -Endpoint:
>>       bLength             :7
>>       bDescriptorType     :0x05
>>       bEndpointAddress    :0x01
>>       bmAttributes        :0x05 (Isochronous, Asynchronous, Data Endpoint)
>>       wMaxPacketSize      :32
>>       bInterval           :0x01
>>    !End Endpoint
>>    -Endpoint:
>>       bLength             :7
>>       bDescriptorType     :0x05
>>       bEndpointAddress    :0x81
>>       bmAttributes        :0x05 (Isochronous, Asynchronous, Data Endpoint)
>>       wMaxPacketSize      :32
>>       bInterval           :0x01
>>    !End Endpoint
>>  !End Interface
>> !End Configuration
>>
>> C:\libusbK-dev-kit>kbench list mode=async buffercount=2 verify
>> device-count=1
>> 1. Benchmark Device (USB\VID_04D8&PID_FA2E\LUSBW1) [libusbK]
>> Select device (1-1) :1
>>
>> opened Benchmark Device (USB\VID_04D8&PID_FA2E\LUSBW1)..
>> Loop Test Information
>>         Driver          : libusbK
>>         Vid / Pid       : 04D8h / FA2Eh
>>         DevicePath      : 
>> \\?\usb#vid_04d8&pid_fa2e#lusbw1#{77360352-3618-7749-a
>> 71d-1bb42062794e}
>>         Device Speed    : Low/Full
>>         Interface #     : 00h
>>         Alt Interface # : 00h
>>         Num Endpoints   : 2
>>         Priority        : 0
>>         Read Size       : 4096
>>         Write Size      : 4096
>>         Buffer Count    : 2
>>         Display Refresh : 1000 (ms)
>>         Transfer Timeout: 5000 (ms)
>>         Retry Count     : 0
>>         Verify Data     : On
>>
>> Bulk Read (Ep81h) max packet size: 16
>> Bulk Write (Ep01h) max packet size: 16
>>
>> While the test is running:
>> Press 'Q' to quit
>> Press 'T' for test details
>> Press 'I' for status information
>> Press 'R' to reset averages
>>
>> Press 'Q' to exit, any other key to begin..
>> Loop data synchronized. Offset=32 Byte=00h Reliability=99.2%.
>> Avg. Bytes/s: 172176.99 Transfers: 38 Bytes/s: 172176.99
>> Avg. Bytes/s: 172191.28 Transfers: 80 Bytes/s: 172204.20
>> Avg. Bytes/s: 172714.43 Transfers: 123 Bytes/s: 173696.25
>> Avg. Bytes/s: 172628.35 Transfers: 165 Bytes/s: 172376.75
>> Avg. Bytes/s: 172017.04 Transfers: 207 Bytes/s: 169656.80
>> Avg. Bytes/s: 172287.65 Transfers: 248 Bytes/s: 173667.01
>> Avg. Bytes/s: 172494.36 Transfers: 291 Bytes/s: 173696.25
>> Avg. Bytes/s: 172648.16 Transfers: 334 Bytes/s: 173696.25
>> Avg. Bytes/s: 172598.45 Transfers: 376 Bytes/s: 172204.20
>> Avg. Bytes/s: 172576.15 Transfers: 418 Bytes/s: 172376.75
>> Avg. Bytes/s: 172305.44 Transfers: 460 Bytes/s: 169656.80
>> Avg. Bytes/s: 172184.59 Transfers: 501 Bytes/s: 170840.28
>> Avg. Bytes/s: 172303.12 Transfers: 544 Bytes/s: 173696.25
>> stopped Ep81h thread.   ExitCode=0
>> stopped Ep01h thread.   ExitCode=0
>> Loop Test Information
>>         Driver          : libusbK
>>         Vid / Pid       : 04D8h / FA2Eh
>>         DevicePath      : 
>> \\?\usb#vid_04d8&pid_fa2e#lusbw1#{77360352-3618-7749-a
>> 71d-1bb42062794e}
>>         Device Speed    : Low/Full
>>         Interface #     : 00h
>>         Alt Interface # : 00h
>>         Num Endpoints   : 2
>>         Priority        : 0
>>         Read Size       : 4096
>>         Write Size      : 4096
>>         Buffer Count    : 2
>>         Display Refresh : 1000 (ms)
>>         Transfer Timeout: 5000 (ms)
>>         Retry Count     : 0
>>         Verify Data     : On
>>
>> Bulk Read (Ep81h) max packet size: 16
>>         Total Bytes     : 2228224
>>         Total Transfers : 544
>>         Avg. Bytes/sec  : 172303.12
>>         Elapsed Time    : 12.93 seconds
>>
>> Bulk Write (Ep01h) max packet size: 16
>>         Total Bytes     : 2228224
>>         Total Transfers : 544
>>         Avg. Bytes/sec  : 172303.12
>>         Elapsed Time    : 12.93 seconds
>>
>> Press any key to exit..
>>
>
> Actually, the tests were done with bulk transfer, which works just
> fine. Isochronous endpoints are in the alternate setting 2. If you
> pass the argument 'altf=2' to the benchmark app, the error should
> occur.
>
> In my tests, it didn't work:
>
> ./Bm-winusb.exe vid=0x4d8 pid=0xfa2e altf=2
> LibUsbDotNet USB Benchmark v2.2.9.110
> Copyright (c) 2010 Travis Robinson. <libusbdot...@gmail.com>
> website: http://sourceforge.net/projects/libusbdotnet
> Benchmark device 04D8:FA2E opened..
> Loop Test Information
>         Vid / Pid       : 04D8h / FA2Eh
>         Interface #     : 00h
>         Alt Interface # : 02h
>         Priority        : Normal
>         Buffer Size     : 4096
>         Buffer Count    : 1
>         Display Refresh : 1000 (ms)
>         Transfer Timeout: 5000 (ms)
>         Retry Count     : 0
>         Verify Data     : Off
>
> Isochronous Read (Ep81h) max packet size: 32
> Isochronous Write (Ep01h) max packet size: 32
>
> While the test is running:
> Press 'Q' to quit
> Press 'T' for test details
> Press 'I' for status information
> Press 'R' to reset averages
>
> Press 'Q' to exit, any other key to begin..
>
> wrn:Zero-length transfer on Ep81h expected 4096.
> wrn:Zero-length transfer on Ep01h expected 4096.
> stopped Ep81h thread.
> stopped Ep01h thread.
> Loop Test Information
>         Vid / Pid       : 04D8h / FA2Eh
>         Interface #     : 00h
>         Alt Interface # : 02h
>         Priority        : Normal
>         Buffer Size     : 4096
>         Buffer Count    : 1
>         Display Refresh : 1000 (ms)
>         Transfer Timeout: 5000 (ms)
>         Retry Count     : 0
>         Verify Data     : Off
>
> Isochronous Read (Ep81h) max packet size: 32
> Isochronous Write (Ep01h) max packet size: 32
> Press any key to exit..
>
>
> --
> Best Regards,
> Wander Lairson Costa



-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to