On Sun, Mar 17, 2013 at 7:44 AM, Wander Lairson Costa
<wander.lair...@gmail.com> wrote:
> Ok, I ran the tests again in Ubuntu 12.10 with HEAD libusbx. I problem
> I am getting is trying to loop less than 32 bytes (a packet size),
> which I read returns error. Not sure if it is a firmware bug or a
> limitation of isochronous transfer by itself.

I believe for this benchmark firmware, the expectation is that you need to
send in multiple of wMaxPacketSize.

> The "0 zero bytes" read problem I see in your code probably is due to
> firmware internal buffer size.

What is the output of "./iso-test -n 256" under your Linux setup?

Something is wrong with the libusbx Mac OS X isochronous codes.
The following is the debug output.

mymacmini:isochronous xiaofanc$ ./iso-test -n 256
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.000005] [0000060b] libusbx: debug [libusb_init] created default context
[ 0.000070] [0000060b] libusbx: debug [libusb_init] libusbx v1.0.14.10630
...
...
[ 0.116315] [0000060b] libusbx: debug [libusb_open] open 250.6
[ 0.117654] [0000060b] libusbx: debug [usbi_add_pollfd] add fd 6 events 1
[ 0.117669] [0000060b] libusbx: debug [darwin_open] device open for access
[ 0.117694] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.1
[ 0.117707] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.2
[ 0.117719] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.4
[ 0.117730] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.5
[ 0.117748] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.8
[ 0.117758] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.9
[ 0.117768] [0000060b] libusbx: debug [libusb_unref_device] destroy device 253.1
[ 0.117778] [0000060b] libusbx: debug [libusb_unref_device] destroy device 253.2
[ 0.117789] [0000060b] libusbx: debug [libusb_unref_device] destroy device 253.4
[ 0.117801] [0000060b] libusbx: debug [libusb_set_configuration] configuration 1
[ 0.185232] [0000060b] libusbx: debug [libusb_claim_interface] interface 0
[ 0.186435] [0000060b] libusbx: debug [get_endpoints] building table
of endpoints.
[ 0.186466] [0000060b] libusbx: debug [get_endpoints] interface: 0
pipe 1: dir: 0 number: 1
[ 0.186482] [0000060b] libusbx: debug [get_endpoints] interface: 0
pipe 2: dir: 1 number: 1
[ 0.186534] [0000060b] libusbx: debug [darwin_claim_interface] interface opened
[ 0.186575] [0000060b] libusbx: debug
[libusb_set_interface_alt_setting] interface 0 altsetting 2
[ 0.190696] [0000060b] libusbx: debug [get_endpoints] building table
of endpoints.
[ 0.190717] [0000060b] libusbx: debug [get_endpoints] interface: 0
pipe 1: dir: 0 number: 1
[ 0.190736] [0000060b] libusbx: debug [get_endpoints] interface: 0
pipe 2: dir: 1 number: 1
[ 0.190747] [0000060b] libusbx: debug [libusb_get_active_config_descriptor]
[ 0.190775] [0000060b] libusbx: debug [ep_to_pipeRef] converting ep
address 0x01 to pipeRef and interface
[ 0.190783] [0000060b] libusbx: debug [ep_to_pipeRef] pipe 1 on
interface 0 matches
[ 0.190841] [0000060b] libusbx: debug [libusb_get_next_timeout] next
timeout in 9.999934s
[ 0.190859] [0000060b] libusbx: debug
[libusb_handle_events_timeout_completed] doing our own event handling
[ 0.190879] [0000060b] libusbx: debug [handle_events] poll() 2 fds
with timeout in 10000ms
[ 0.201857] [00001707] libusbx: debug [darwin_async_io_callback] an
async io operation has completed
[ 0.201901] [00001707] libusbx: error [darwin_async_io_callback] async
size truncation detected - please report this error
[ 0.201936] [0000060b] libusbx: debug [handle_events] poll() returned 1
[ 0.201960] [0000060b] libusbx: debug [op_handle_events] checking fd 4
with revents = 0
[ 0.201972] [0000060b] libusbx: debug [op_handle_events] checking fd 6
with revents = 1
[ 0.201988] [0000060b] libusbx: debug [darwin_handle_callback]
handling isoc completion with kernel status 0
[ 0.202001] [0000060b] libusbx: debug
[usbi_handle_transfer_completion] transfer 0x7ff994002e00 has callback
0x10b08e6c0
Packet 0 requested to transfer 32 bytes, transfered 32 bytes.
Packet 1 requested to transfer 32 bytes, transfered 32 bytes.
Packet 2 requested to transfer 32 bytes, transfered 32 bytes.
Packet 3 requested to transfer 32 bytes, transfered 32 bytes.
Packet 4 requested to transfer 32 bytes, transfered 32 bytes.
Packet 5 requested to transfer 32 bytes, transfered 32 bytes.
Packet 6 requested to transfer 32 bytes, transfered 32 bytes.
Packet 7 requested to transfer 32 bytes, transfered 32 bytes.
[ 0.202062] [0000060b] libusbx: debug [libusb_get_active_config_descriptor]
[ 0.202090] [0000060b] libusbx: debug [ep_to_pipeRef] converting ep
address 0x81 to pipeRef and interface
[ 0.202102] [0000060b] libusbx: debug [ep_to_pipeRef] pipe 2 on
interface 0 matches
[ 0.202171] [0000060b] libusbx: debug [libusb_get_next_timeout] next
timeout in 9.999917s
[ 0.202187] [0000060b] libusbx: debug
[libusb_handle_events_timeout_completed] doing our own event handling
[ 0.202199] [0000060b] libusbx: debug [handle_events] poll() 2 fds
with timeout in 10000ms
[ 0.213265] [00001707] libusbx: debug [darwin_async_io_callback] an
async io operation has completed
[ 0.213291] [00001707] libusbx: error [darwin_async_io_callback] async
size truncation detected - please report this error
[ 0.213333] [0000060b] libusbx: debug [handle_events] poll() returned 1
[ 0.213358] [0000060b] libusbx: debug [op_handle_events] checking fd 4
with revents = 0
[ 0.213380] [0000060b] libusbx: debug [op_handle_events] checking fd 6
with revents = 1
[ 0.213395] [0000060b] libusbx: debug [darwin_handle_callback]
handling isoc completion with kernel status -536870169
[ 0.213407] [0000060b] libusbx: debug
[usbi_handle_transfer_completion] transfer 0x7ff992502350 has callback
0x10b08e6c0
Packet 0 requested to transfer 32 bytes, transfered 32 bytes.
Packet 1 requested to transfer 32 bytes, transfered 32 bytes.
Packet 2 requested to transfer 32 bytes, transfered 32 bytes.
Packet 3 requested to transfer 32 bytes, transfered 0 bytes.
Packet 4 requested to transfer 32 bytes, transfered 0 bytes.
Packet 5 requested to transfer 32 bytes, transfered 0 bytes.
Packet 6 requested to transfer 32 bytes, transfered 0 bytes.
Packet 7 requested to transfer 32 bytes, transfered 0 bytes.
[ 0.213450] [0000060b] libusbx: debug [libusb_release_interface] interface 0
[ 0.215974] [0000060b] libusbx: debug [libusb_close]
[ 0.216102] [0000060b] libusbx: debug [usbi_remove_pollfd] remove fd 6
[ 0.216167] [0000060b] libusbx: debug [libusb_unref_device] destroy device 250.6
[ 0.216193] [0000060b] libusbx: debug [libusb_exit]
[ 0.216203] [0000060b] libusbx: debug [libusb_exit] destroying default context



> BTW, I fixed the warnings you were getting.
Yes the warnings are fixed.


-- 
Xiaofan

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to