Alan Stern wrote:
On Mon, 4 Feb 2008, Alan Nisota wrote:

I am trying to write a usb device driver for an R5000 modified set-top-box. This just adds a USB interface to the decoded signal from a satellite STB so you can save whatever is currently being watched on TV.

I snooped the USB bus in Windows, and am able to upload the firmware and communicate with the device just fine on endpoints 01 and 81. However, retrieving the stream requires a high-bandwidth read on 82. If I do this using blocking reads, the device never sends any data back It appears to be waiting for multiple bulk request URBS in the queue.

You have phrased this badly. This device can't be waiting for multiple URBs in the queue because it has no way to be aware of individual URBs. All it knows about are the packets it receives.
Hmm, that is strange. I'm at a loss as to why it stalls without returning any data then when I don't queue the packets.

This apparently eliminates my ability to use libusb, so now I need to do the same thing in kernel-space.

Not at all. Even though libusb may not currently support it, the underlying usbfs ioctl calls allow you to do asynchronous I/O from userspace.
But I need to do bulk transfers. UsbSnoop reports bulk requests, and the endpoint type is bulk
If it is useful, my read handler looks sort of like this:
         urb = usb_alloc_urb(0, GFP_KERNEL);
buf = usb_buffer_alloc(dev->udev, readsize, GFP_KERNEL, &urb->transfer_dma);
         usb_fill_bulk_urb(urb, dev->udev,
                           usb_rcvbulkpipe(dev->udev, 0x82),
                           buf, readsize, skel_read_bulk_callback, dev);

This implies that endpoint 0x82 is a bulk endpoint. So what type is it really?
It's identified as bulk.
Maybe the device really does try to send packets that are larger than the maximum allowed limit. That would explain your problems, especially if Windows doesn't bother to enforce the limit at all.
Is there any way for me to see what is actually being sent over the USB bus (rather than what seems to be sent to the driver) in Windows? It seems that UsbSnoop is reporting what is sent to the driver since I don't see data being packetized like I'd expect. I'd think that if the spec isn't followed that USB hubs wouldn't work with the device, and they seem to work fine. Then again, I know little of USB, so I don't really know what I'm doing here.

I've tried virtual-box over linux, but I can't seem to get bulk requests to work at all (even though the control requests work fine), (and no other similar VMs support EHCI that I can find) so I'm not really sure how I can proceed. I guess I can take a crack at analyzing the firmware and see if it is obvious how the FX2 is configured.

-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to