Re: gadgetfs isn't sending interrupt messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> When I run the closed-source app to access the device, it works by sending
>>> control messages to the device and getting interrupt messages in response.
>>> With the gadgetfs "device" I receive the control message and send a response
>>> to the interrupt endpoint without any error, but not only does XP never
>>> receive the interrupt message, usbmon doesn't show it either - which seems to
>>> indicate that gadgetfs isn't sending the interrupt message over the virtual
>>> USB bus.
> 
> Does usbmon show the interrupt URB being submitted?  If not then of 
> course the responses won't be delivered.

No, according to usbmon then URB never gets submitted.  gadgetfs correctly
receives the data for it though, because running my own app after the Windows
one will receive the interrupts one message behind (since the first response
was never read by the Windows app.)

> I was going to suggest exactly the same thing.  It sounds like 
> VirtualBox and VMware don't do a good job of forwarding interrupt URBs 
> from the guest to the host.

In this particular case I know that VirtualBox isn't to blame, because if I
plug in the real hardware device then it works perfectly (this is how I was
able to initially reverse engineer the communication protocol.)  It's only my
gadgetfs device that isn't communicating properly.

> It might be possible to learn something by enabling the usbfs_snoop 
> parameter for usbcore in the host.

I'll have a look at that, but since usbmon reports no URB, but the missing URB
gets submitted later when my app next reads from the interrupt endpoint, I
think it must be a problem related to dummy_udc or gadgetfs.

I don't know enough about USB to understand how interrupts work, but I imagine
when data arrives on an interrupt endpoint the host needs to be notified that
there is data waiting to be read.  It's almost as if this notification never
arrives, so the app sits there waiting to be notified before reading the data.
 Since my own test program doesn't wait for any notifications and just blocks
until interrupt data arrives, perhaps it doesn't matter that there is no
notification?

Cheers,
Adam.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux