|
Message
From: Marc Reinig<mreinig@p...>
Date: Sun Mar 7 17:19:05 CET 2004
Subject: [usb] some question about USB
Comments inline, all comments refer to the USB 2.0 spec.> -----Original Message----- > Subject: some question about USB
> 1. When the host send a "Get_Descriptor" command for the > configuration descriptor(80 06 00 02 00 00 FF 00), should I > return the configuration descriptor itself only( 9 bytes) or > followed by all the descriptor ( interface descriptor and > endpoint descriptor) at the same data stage of the control transfer ?
Per the spec (9.4.3), you return the configuration descriptor, the interface descriptors and endpoint descriptors.
> 2. It seems that the host will do a "Set_Configuration " in the > process of enumeration. Why is this "Set_Configuration" design > for ?
So you can have multiple configurations.
> If i have two configuration 01 and 02 , then the host set > me up to 01 configuration , it seems that my 02 configuration can > never be used. How are the host choosing my configuration based on?
The responsible driver for your device selects and sets the configuration. In general, few OS's have supported multiple configurations.
> 3. The USB 1.1 specification point out that the interface > descriptor cannot be directly access by GetDescriptor() or > SetDescriptor() , what if the host send out a GetDescriptor() > with (80 06 00 04 00 00 FF 00), note that "04" at the fourth byte > meaning for a interface descritor, should i handle this case ?
This is not a valid command (9.4.3), so your host is sick and will die soon. If you get an invalid command, stall it.
> 4. When the host send out a GetConfiguration , should i just > return with a single byte in the packet ?
Yes, the WLength word will be one, indicating you should return one byte.
> 5. At the electrial layer of USB , what it actual mean of Idle > state of the D+ D- lines? If just looking at their logic, for > the full speed , is that mean D+ is 1 and D- is 0 ? If so , do > idle state equal to J state?
For full speed, yes. Also, no transitions on the bus. See Table 7.2.
> 6. Due to the tree topology of USB, all the device will recieve > any packet send out by the host , if the host want to send out a > reset to device A and pull down the D+D- pin to low (SE0) for 2.5 > us , then all the other USB device will misunderstand that the > host want to reset them. How 's the host actually doing if it > want to reset a particular device only? Do the HUB has the > ability of filtering packet and signal ?
It sends a command to the hub responsible for that port to reset that port. The traffic to the hub would be visible to all, but the reset would only be visible to anything connected to that port.
Marc Reinig System Solutions
|
 |