|
From: Lloyd R. <Llo...@co...> - 2006-07-03 16:29:52
|
Hello, I currently have some working USB code from the USRP fusb library. I wanted to compare the transfer rate of my device to that of libUSB. I can currently acheive ~40MB/sec using fusb library. I am getting a "Connection timed out" error, and wanted to check to see if I was using the correct order for my function calls. I do the standard issue: usb_init(); usb_find_busses(); usb_find_devices(); ... and can easily find my device on the bus. My device has interface0: command using ep0 interface1: reads using ep2 interface2: writes using ep6 so I then make a calls to usb_claim_interface() with no errors. I am assuming the order in which I claim interfaces does not matter, and that all 3 interfaces should be claimed, because I am claiming them all. I then make a call to usb_control_msg() which is identical to the call in the USRP code. usb_control_msg(drx_dev_handle,VRT_VENDOR_IN,VRQ_XFER,0,0,0,0,1000); where (if this even matters) #define VRT_VENDOR_IN 0xC0 #define VRQ_XFER 0x01 I have little doubt this stalls ep0, I would get an EPIPE error if it does. This is all consistent with my firmware for my fx2 chip. Is this the correct way to send a control msg to a usb device? Thanks in advance. Take Care, Lloyd |