On 08/08/2013 09:16 PM, Peter Stuge wrote:
Tom Schouten wrote:
I wonder though, control requests are PC->USB only, right?
Wrong.
It wouldn't work well for incoming asynchronous C-APDU from the phone
It would work fine.
as the PC needs to poll constantly in software
All USB communication is polled.
Study chapters 5 and 8 of the USB 2.0 specification.
Yes I understand USB is polled.
Though there's a difference between polling by the usb controller and polling at the software level, meaning having to send multiple control requests until there is data ready vs just waiting until there is data on an IN endpoint.
I don't believe a control request is meant to block for a long time. I.e. a if there is an IN stage after the SETUP stage, it's supposed to answer promptly to the control packet sent by the host.
//Peter