Power Delivery Sniffer

Intercept and decode BMC handshakes over the CC pin.

Active Power Profile
Awaiting Sink

Voltage (VBUS)

0.0V

Max Current

0.0A

Negotiated Wattage

0W
Cable Identity (E-Marker) Unverified (3A Limit Assumed)
Live CC Packet Stream
[SYSTEM] WebSerial Interface Ready. Waiting for connection...

Deciphering the Digital Handshake: The Engineering Behind USB-C Power Delivery

The era of "dumb" electricity is over. When you connect a modern laptop or smartphone to a charger, you aren't just completing a circuit; you are initiating a complex, encrypted digital negotiation. The USB-C Power Delivery (PD) protocol transforms a simple cable into a data network where devices haggle over voltage, current, and directionality before a single watt of high power is released. This guide dissects that invisible negotiation, explains the critical role of E-Marker chips, and helps you troubleshoot why your 100W charger might be underperforming.

The Physics of Power: Why Voltage Matters

The fundamental limitation of any charging system is heat. Heat is primarily generated by current (Amperage) flowing through the resistance of a copper wire. To increase charging speed (Wattage) without melting the cable, engineers cannot simply increase the current indefinitely.

1. The Power Equation

Electric power ($P$) is defined as the product of Voltage ($V$) and Current ($I$):

$$P_{watts} = V_{volts} \times I_{amps}$$
Standard USB 2.0 was limited to $5V$ at $0.5A$ ($2.5W$). To achieve $100W$ using $5V$, you would need $20A$ of current. A cable capable of carrying $20A$ would be as thick as a garden hose. USB-C PD solves this by negotiating the voltage up to $20V$ or even $48V$, allowing high power transmission at manageable current levels (typically $3A$ or $5A$).

2. The Configuration Channel (CC)

Unlike older USB standards that used the data lines (D+/D-) for crude signaling, USB-C introduces a dedicated lane for power negotiation called the Configuration Channel (CC). While the main VBUS pins carry the heavy electrical load, the CC pin carries a digital conversation using Biphase Mark Coding (BMC) at 300kbps. This sniffer tool listens to that conversation.

The Anatomy of a Negotiation: Step-by-Step

When you plug a device in, the VBUS (power) line is initially cold or limited to a "Safe 5V". The high voltage is not unlocked until the digital contract is signed. Here is the exact sequence of events this tool visualizes:

  1. 1. Physical Detection & Orientation The Source (Charger) detects a pull-down resistor (Rd) on the Sink (Phone/Laptop) via the CC pin. This tells the charger a device is present and determines which way the reversible cable is plugged in.
  2. 2. Source Capabilities (SRC_CAP) The charger broadcasts its menu of power options. For example: "I can do 5V@3A, 9V@3A, 15V@3A, and 20V@5A." This list is repeated until the device acknowledges it.
  3. 3. Discover Identity (E-Marker Check) Before offering more than 3 Amps (60 Watts), the Source must query the cable. It sends a `Discover_Identity` VDM (Vendor Defined Message). If the cable contains an E-Marker chip, it replies: "I am an active cable rated for 50V and 5A." If no reply is received, the system hard-locks the limit to 3A to prevent fire.
  4. 4. The Request (REQ) The Sink (Laptop) reviews the Source Capabilities and the Cable limits. It calculates its own battery needs and sends a specific request: "Give me Object #4 (20V) at 4.5 Amps."
  5. 5. Accept & Power Supply Ready (PS_RDY) The Source replies "Accept." It then physically adjusts its internal transformer to output 20V. Once the voltage on the VBUS pin stabilizes at 20V, it sends "PS_RDY." The Sink then begins drawing full power.

The "E-Marker" Chip: Active vs. Passive Cables

One of the most confusing aspects of the USB-C ecosystem is the hidden difference between cables. Physically, a $5 cable and a $30 cable may look identical, but electronically, they are worlds apart. This difference is defined by the E-Marker (Electronic Marker).

An E-Marker is a tiny integrated circuit embedded in the plug of the cable. It acts as an ID card for the wire. It stores data regarding:

THE 3-AMP SAFETY RULE

By USB-IF specification, any cable that lacks an E-Marker is assumed to be a "Generic Passive Cable." The protocol dictates that generic cables can NEVER exceed 3 Amps.

This means if you have a 100W charger (20V/5A) and a 100W laptop, but you use a cheap cable without a chip, your charging speed will be capped at 60W (20V/3A). The sniffer tool above will show this failure in the "Discover Identity" phase.

Understanding Power Delivery Profiles (2.0 vs 3.0 vs 3.1)

The USB PD standard has evolved significantly. Understanding the version helps explain why certain devices charge faster than others.

Protocol Version Max Power Key Feature Typical Use Case
USB PD 2.0 100W (20V 5A) Fixed Voltage Rules Older Laptops (2016-2018)
USB PD 3.0 100W (20V 5A) PPS (Programmable Power Supply) Samsung Galaxy, Modern Laptops
USB PD 3.1 (EPR) 240W (48V 5A) Extended Power Range High-End Gaming Laptops, eBikes

What is PPS (Programmable Power Supply)?

Introduced in PD 3.0, PPS is a game-changer for smartphone charging efficiency. In standard PD, voltages are fixed (5V, 9V, 15V, 20V). If a phone battery is at 3.8V, supplying it with 9V requires the phone to step-down that voltage internally, generating significant heat.

PPS allows the phone to request non-standard voltages (e.g., 4.2V, 4.22V, 4.24V) in tiny 20mV increments. This allows the charger to deliver exactly what the battery needs, bypassing the phone's internal conversion circuitry. This results in cooler, faster charging. If you see "Augmented Power Data Objects" (APDO) in the sniffer logs, you are witnessing PPS in action.

Extended Power Range (EPR): The Road to 240W

The latest iteration, USB PD 3.1, breaks the 100W ceiling. Previous standards maxed out at 20V. To get more power without increasing current (which creates heat), the standard introduced EPR (Extended Power Range), raising the voltage limit to 28V, 36V, and ultimately 48V.

Achieving 240W ($48V \times 5A$) requires a specific "EPR Cable." These cables have reinforced capacitors inside the connectors to handle the voltage spikes (arcing) that can occur when unplugging a live 48V connection. Using this sniffer, you can verify if a cable identifies as "EPR Mode Capable" before trusting it with your expensive workstation.

Troubleshooting: Why is my device charging slowly?

A common frustration is plugging a high-end device into a high-end charger and seeing slow speeds. The protocol sniffer often reveals one of these three culprits:

  1. 1. The "Cold" Battery Rule Lithium-ion batteries cannot accept high current when they are cold (below ~15°C) or fully charged (above 80%). The Sink (phone) will intentionally request a lower PDO (e.g., 5V/1A) to protect the battery chemistry. This is normal behavior, not a hardware failure.
  2. 2. Thermal Throttling If the charger or phone detects overheating, it sends a "Hard Reset" or a new Request for lower power. You might see the wattage drop from 60W to 15W abruptly in the logs. This protects the components from melting.
  3. 3. Protocol Mismatch (Proprietary Modes) Some manufacturers use proprietary extensions (like VOOC, Warp Charge, or HyperCharge) that run on top of standard USB. If you mix brands (e.g., a OnePlus charger with a Samsung phone), they may fail to negotiate the proprietary handshake and fall back to the safest, slowest standard (5V/2A).

Frequently Asked Questions (FAQ)

Can I use a 100W cable for a 20W phone?
Yes, absolutely. USB-C is backward compatible. A cable rated for 100W (5 Amps) simply has thicker wires. When used with a 20W phone, the phone will only request the power it needs. Using a "stronger" cable is always safe; using a "weaker" cable typically results in slower charging but is also safe due to the E-Marker safety checks.
How does the WebSerial API work for sniffing?
Browser security models (sandbox) prevent websites from directly accessing your computer's USB hardware. However, the Web Serial API allows a user to explicitly grant a website permission to talk to a specific serial device (like a COM port). This tool connects to an external microcontroller (like an Arduino or ESP32 running Twinkie or similar firmware) that acts as a "Man-in-the-Middle" on the CC line, relaying the text logs to this webpage for visualization.
What is the difference between Thunderbolt 4 and USB4?
While both use the USB-C connector and can support 100W+ charging, the difference lies in data and certification. Thunderbolt 4 guarantees minimum specs (like 40Gbps data, dual 4K monitor support, and 32Gbps PCIe tunneling). USB4 has various "tiers" (20Gbps or 40Gbps). Crucially, almost all Thunderbolt 4 cables are E-Marked for 100W charging, making them the gold standard for reliable power delivery.

Start Your Analysis

Use the simulation mode to learn the protocol, or connect your hardware sniffer to verify your real-world equipment.

Recommended Logic Tools