13

I plug an unknown USB-C cable into my computer.
Theoretically, could a program read information about that cable? In particular:

  1. What version of USB it supports: 2.0, 3.1, etc.
  2. Whether it supports Thunderbolt, etc.
  3. Whether it supports Power Delivery, Quick Charge, VOOC, SuperCharge, Pump Express, Super FlashCharge, etc.
  4. Up to what speed it can transfer data.
  5. Up to what wattage/amperage it can charge a high-spec device.

Notes:

  • I am on Linux, but answers for other OSes are fine too.
  • Let's say nothing is connected at the other end of the cable. But if really necessary, we can say a recent rooted Android phone is connected and can run whatever code is needed.
Ale..chenski
  • 13,235
Nicolas Raoul
  • 11,561

2 Answers2

8

All answers of what Type-C connector can do and can't are given in its specifications.

In brief, Type-C cable specs are nearly independent from USB data and USB Power Delivery (Type-C can support anything).

By specs, Type-C connector/cable provides two methods of self-identification.

First one is by combination of resistor pulls-up and pulls-down on both sides of CC wires. Since there are two CC pins in Type-C connectors, and several analog levels, many combinations are available. Other than connect function itself and basic determination of source-sink roles and power capacity, several "alternate" functions are defined, as Display Port, Audio, and Debug mode.

The second amendment to Type-C is the mandatory embedding of e-markers into every C-C cable. The information in e-marker contains name of manufacturer and current carrying capability of particular cable.

The state of CC1/CC2 pins is usually acquired by a special CC-controller chip. The CC-controller communicates with main system by I2C interface. The register-based interface is standardized in Intel document USB Type-C Connector System Software Interface Specification

Microsoft provides a special UCSI driver to communicate the state of Type-C connector to Windows. I am certain that Linux does have the corresponding driver as well, take a look at this article.

So, partial answer your set of questions can be found in the following EE article. #1 and #5 is supported. #4 is the same as #1. Regarding #3, Type-C connector supports only one "charging signature", which is Power Delivery specification. Regarding the second part of your notes, if nothing is connected on the other end of CC cable, I am not sure if presence of Ra alone will trigger any detection of the cable, need to check on this.

Ale..chenski
  • 13,235
4

Mac

Run this in the terminal:

system_profiler SPUSBDataType

Example output:

USB 3.1 Bus:

Host Controller Driver: AppleT8122USBXHCI

tk-x001:

  Product ID: 0x5026
  Vendor ID: 0x18d1  (Google Inc.)
  Version: 1.00
  Speed: Up to 12 Mb/s
  Manufacturer: Google Inc.
  Location ID: 0x00100000 / 1
  Current Available (mA): 500
  Current Required (mA): 100
  Extra Operating Current (mA): 0

USB 3.1 Bus:

Host Controller Driver: AppleT8122USBXHCI

USB 3.1 Bus:

Host Controller Driver: AppleT8122USBXHCI

Linux

Run this in the terminal:

> lsusb -vvv

Windows

Android Studio says Windows support is coming soon at Android Studio Koala Feature Drop | 2024.1.2 (August 2024) - USB cable speed detection

It might require inserting an Android device at the other end of the cable, and will probably look like this:

Connection speed warning

Greenonline
  • 2,390
Nicolas Raoul
  • 11,561