Send USB-tastaturer bare signaler eller mottar de dem også?

Innholdsfortegnelse:

Send USB-tastaturer bare signaler eller mottar de dem også?
Send USB-tastaturer bare signaler eller mottar de dem også?

Video: Send USB-tastaturer bare signaler eller mottar de dem også?

Video: Send USB-tastaturer bare signaler eller mottar de dem også?
Video: Psexec.exe: A Powerful tool for IT Admins - YouTube 2024, Mars
Anonim
De fleste av oss gir aldri tanke på tastaturene våre så lenge de fungerer bra, men hvis du slutter å tenke på det for et øyeblikk, sender de bare signaler til våre datamaskiner eller er det en aktiv frem og tilbake prosess på jobben ? Dagens SuperUser Q & A innlegg har svaret på en nysgjerrig leser spørsmål.
De fleste av oss gir aldri tanke på tastaturene våre så lenge de fungerer bra, men hvis du slutter å tenke på det for et øyeblikk, sender de bare signaler til våre datamaskiner eller er det en aktiv frem og tilbake prosess på jobben ? Dagens SuperUser Q & A innlegg har svaret på en nysgjerrig leser spørsmål.

Dagens Spørsmål & Svar-sesjon kommer til oss med høflighet av SuperUser-en underavdeling av Stack Exchange, en fellesskapsdrevet gruppering av Q & A-nettsteder.

Spørsmålet

SuperUser leser Ne Mo vil vite om USB-tastaturer bare sender signaler, eller hvis de mottar dem også:

A USB keyboard does not need to receive any signals from a computer, just power, right? Or does it need to receive signals as well as send them?

Har USB-tastaturer bare sende signaler eller mottar de dem også?

Svaret

SuperUser bidragsytere LawrenceC og Dmitry Grigoryev har svaret for oss. Først opp, LawrenceC:

From the “Device Class Definition for Human Interface Devices (HID)” specification:

To change the keyboard LEDs, the keyboard accepts a command to do so. So it is not an “input-only” device (meaning it only outputs data to the host). That being said, there is a negotiation and enumeration process with all USB devices that require a back-and-forth conversation between the host and the device. You cannot have a “read-only” USB device. Even before USB, the computer’s keyboard controller would accept commands because it did a few things besides read the keyboard (reference):
To change the keyboard LEDs, the keyboard accepts a command to do so. So it is not an “input-only” device (meaning it only outputs data to the host). That being said, there is a negotiation and enumeration process with all USB devices that require a back-and-forth conversation between the host and the device. You cannot have a “read-only” USB device. Even before USB, the computer’s keyboard controller would accept commands because it did a few things besides read the keyboard (reference):
Image
Image

Etterfulgt av svaret fra Dmitry Grigoryev:

Any USB device regardless of its class requires bidirectional communication to function. Every USB device (or function in terms of USB specifications) is represented as a set of endpoints which can be thought of as buffers which accept or receive data. However, even endpoints which can only send data wait for a special packet called a token before they can reply:

The gray boxes represent the USB host while the white boxes represent USB functions (chart source).
The gray boxes represent the USB host while the white boxes represent USB functions (chart source).

Even so-called interrupt transfers are done in this way, with the USB host polling connected devices using token packets. What differs between regular (bulk) transfers and interrupt transfers is that the polling time is small and guaranteed in the latter case. Still, all transfers are initiated by the host.

Har du noe å legge til forklaringen? Lyder av i kommentarene. Vil du lese flere svar fra andre tech-savvy Stack Exchange-brukere? Sjekk ut hele diskusjonstråden her.

Bilde Kreditt: Luke Jones (Flickr)

Anbefalt: