On Mon, Mar 23, 2015 at 12:09 PM, Paul Stoffregen <[email protected]> wrote:
> On 03/20/2015 10:27 AM, Terry Moore wrote: > > Your device can’t NAK setup packets; that’s not defined behavior in the > USB spec. Your device can either ACK (in which case the host begins the > data or status phase, as appropriate) or be completely silent. > > > Aren't you supposed to stall endpoint 0 if you can't respond with ACK? > That's different being being completely silent, right? > > I mean, in general for control transfers. I'm pretty sure CDC ACM > protocol requires a non-stall response on SET_LINE_CODING. > The SETUP packet is always ACKed or not responded to. You can SATLL the data or status phase of the transfer (INs or OUTs, not SETUPS) if you decide you don't like what's in the SETUP packet. The basic idea is the device doesn't have time to decide if it likes a SETUP before there has to be a handshake. The SETUP packet is either ACKed if its good, when it displaces any previous command that's being worked on (so NAK is not allowed), or the packet is not good (PID check or CRC fail) so there should be no response. Once the device has had time to contemplate the SETUP packet, it can then decide it doesn't like the command its been given, so it can then STALL the following IN or OUTs. Before its decided it should be NAKing. Once the IN or OUT is ACKed, that's saying things are good.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com This email sent to [email protected]
