Mocking USB



Once again, plugging a high-speed USB flash drive into the USB 3.0 port, I saw the inscription " This device can work faster ... ". But wait, I already plugged it into port 3.0! Is the contact junk? And if so, how does the flash drive determine at what speed it works? After all, modern PCs support as many as three connection standards - USB 1.1, 2.0 and 3.0. Is it possible to “downgrade” the USB standard by forcing the device to work, for example, on USB 1.1? Not all of these questions were answered on the network, and I decided to figure it out myself, along the way, faced with rather unobvious situations.



Downgrade USB 3.0 to 2.0

You will now say - what could be easier, just take a USB 2.0 cable - and you will be absolutely right. If there are no USB 3.0 pins in the cable or connector, the device will have no other way out than to start at USB 2.0 speed:





But which particular wires disconnect will switch to USB 2.0? What happens if you turn off only one, or close the neighboring ones? It's interesting to go beyond the standard and experiment!



For experiments, I soldered the USB "mother" and USB "dad" with wires on the breadboard:





In the photo, it's not just that one wire is in the air. It turned out that the connection works fine even without one of the SS_TX diff conductors. couples! (for the SS_RX pair, this trick no longer works)



Moreover, if you disconnect all USB 3.0 contacts, except for SS_TX, the device continues to think that it is connected to USB 3.0 and is not detected in the system at all. To be honest, I was sure that the connection in this case would switch to 2.0 mode:



here SS_RX-, SS_RX + and SS_TX + are disabled.Totally,



we conclude that the USB 3.0 device checks for a SuperSpeed ​​connection on the SS_TX line, and the transceiver is so resistant to errors that it spit on the break of one of the lines of the pair. To ensure that the device switches to USB 2.0, both lines must be torn: SS_TX- and SS_TX +.



Downgrade USB to 1.1



USB 2.0 is good for everyone, but it hurts too smart. If you've ever tried to sniff it with a logic analyzer, you either have a very cool analyzer, or you found an ancient USB hub like this:





Despite the fact that the Internet is replete with questions "how to downgrade USB 2.0 to 1.1", I have not seen a simple solution anywhere:





Let's take a closer look! According to the USB standard, the operating speed is consistent at the signal level. The device raises the D- level to 0.8v, and the host responds with a sawtooth signal:





We see the same thing on our "experimental stand" on an oscilloscope:





That is, you need to make sure that the host does not see this voltage increase. So - we put the diode in the gap of the D- line (Schottky, to minimize the drop):





Iiii it successfully suppresses the signal from the device without interfering with normal data transmission:









And here I was sure that the diode would disrupt the data transmission on the line and nothing would work, but no - I could not find a single device that did not work through such an "adapter".



Putting together a downgrader



As a generalization of the above experiments, I made a simple passive USB mode switch - 1.1 / 2.0 / 3.0



My desire for simplicity is sometimes impossible to restrain. I wanted to implement everything on a single three-position switch, like this:







The original idea was - one row of contacts switches D- between:



  • "Diode" (USB 1.1)
  • Empty (USB 3.0)
  • "D-" (USB 2.0)


And another row of pins connects SS_TX- only in USB 3.0 mode:



  • Empty (USB 1.1)
  • "SS_TX-" (USB 3.0)
  • Empty (USB 2.0)


But I rejected this idea because of doubts - hardly all USB 3.0 devices will be able to work only on one diff line. couples. So I redid the switch with wire cutters:





Now the middle contact switches between the extreme ones, and in the middle position the switch closes two pairs of independent contacts. Ideally! It remains to solder and you're done:



TODO: dilute the printed circuit board and make it beautiful



Everything, now you can be sure that the flash drive works in 3.0 (2.0, 1.1) mode, otherwise it simply will not be found in the system. In conclusion, we test our card reader in various switch positions.



"3.0":



"2.0":


for some reason, the speed of USB 1.1 did not like Crystal Disk Mark, and as a result of the test it showed zeros



Tricky question



There are two pairs of contacts in the USB 3.0 connector - USB 2.0 and USB 3.0, we have already found out that the device (flash drive, card reader) first climbs onto the 3.0 pins, and if it does not work, it goes into 2.0 mode.



What if you connect one device to 3.0 pins and another to 2.0 pins? Which device will the computer see?





Try answering the poll below before looking under the spoiler.



Answer
, USB 3.0 SATA- USB 2.0 :













! , USB 3.0 . , Intel.




All Articles