|
Answer» Hello guys, this forum was recommended to me by somebody and just wanted to enquire about something. I applied for a work placement with a company and have been asked to complete a task detailing what USB handshaking is. Ive talked about what handshaking is in networking and PROTOCOLS and why handshaking is necessary, but I believe handshaking in USB to be done via status packets as drivers tell devices how to communicate with each other and the protocols of USB are already defined, am I missing something or am I correct in my assumptions?
What I was asked to do is quite vague and to add substance to this I have gone off on a tangent as im not sure if theyre looking for something else or what,
Any help or direction would be greatly appreciated,
Many thanks, JoeThis is only my observations, not from a textbook. USB is both a hardware standard and a software standard. In Windows, you plug in a USB device and the system becomes aware taht a change has taken place. If The device is recognized as a device that has been USED recently, the device is installed as it was bedsore.Otherwise, the system software will probe the device to learn about its type. Each type can have its own protocol and date transfer rate.
Some possible types are:
Human interface, such as a mouse. A keyboard that conforms to the common standard. A mass steerage device. such as a hard drive Some form of a network device, such as a wireless Bluetooth or Wi-Fi An adapter the connects to a printer or scanner. An interface e to an iPad, smartphone or camera.
Transitionally, the device MAY even provide the name of the maker and a model number.
The information can be stored in the computer upon the first time the device is used. Later, the system will respond more quickly to a devices had be already registered. Bear in mine, this is no a textbook answer. Does this help any? Thanks for your reply geek, yes it does help somewhat. The device like you say can be probed and information about itself can be exchanged so ill include that. Because the role I have applied for is a trainee position in a technical department, I think they are looking for a bit more depth. This is why I didnt quite understand what they were asking as handshaking in USB does not seem to be of the same fashion as networking as in deciding what protocols are suitable to use as like you said it is both a software and hardware standard so the devices are somewhat similar in how they connect. What I have read details how when data is transferred in USB, that different packets are sent and recieved controlled by the host containing the payload data and the sync data and handshake/status packets, which is why I was thinking that handshaking was somewhat different and kind of a vague question. Here is a piece I have found from another website:
"USB Packet Types
USB has four different packet types. Token packets indicate the type of transaction to follow, data packets contain the payload, handshake packets are used for ACKNOWLEDGING data or reporting errors and start of frame packets indicate the start of a new frame.
Token Packets
There are three types of token packets, In - Informs the USB device that the host wishes to read information. Out - Informs the USB device that the host wishes to send information. Setup - Used to begin control transfers.
Token Packets must conform to the following format,
Sync PID ADDR ENDP CRC5 EOP
Data Packets
There are two types of data packets each capable of transmitting up to 1024 bytes of data. Data0 Data1
High Speed mode defines another two data PIDS, DATA2 and MDATA.
Data packets have the following format,
Sync PID Data CRC16 EOP
Maximum data payload size for low-speed devices is 8 bytes. Maximum data payload size for full-speed devices is 1023 bytes. Maximum data payload size for high-speed devices is 1024 bytes. Data must be sent in multiples of bytes.
Handshake Packets
There are three type of handshake packets which consist simply of the PID ACK - Acknowledgment that the packet has been successfully received. NAK - Reports that the device temporary cannot send or received data. Also used during interrupt transactions to inform the host there is no data to send. STALL - The device finds its in a state that it requires intervention from the host.
Handshake Packets have the following format,
Sync PID EOP"
I hope this explains my thinking a bit more and I really appreciate your input.
Thanks, Joe Interesting. I see no reason why a technician would nee to know this. There is no adjustment or pair that could fix a USB device that 'forgot' one of the protocols. There is no screw, resistor, capacitor nor jumper that wold alter the USB protocols.
I just saw this in a search:
Quote USB 2 Analyzer only $875 - Teledyne...
How is this for an answer: USB 2 protocol requires a $875 tester to verify proper protocol and handshake functionality.
|