Plugable USB 3.1 Type-C Power Delivery Sniffer User Guide

Introduction

The Plugable USB 3.1 Type-C Power Delivery Sniffer (hereafter USBC-TKEY or just TKEY for short) is a product based on Google’s open design of the ‘twinkie’ device (https://www.chromium.org/chromium-os/twinkie) and can be used to sniff USB Power Delivery data packets between a USB Type-C host and Type-C power supply using an Ubuntu Linux 14.04.2 system. This guide will provide a walk-through of this process as well as some advanced features.

Using TKEY as a PD sniffer

To start capturing USB PD packets, we will just be using the TKEY and the USB 2.0 to Micro-B cable. Connect the TKEY between a Type-C host and Type-C power supply. Then connect the Micro-B USB cable to your Ubuntu 14.04.2 system. An example of this setup using a USB Type-C MacBook is shown below:

4. Once the capture is started, connect your power source to the USBC-TKEY. If the power source was already plugged in, disconnect it for a moment and then reconnect it. This will capture the traces and save them to a file called captured.sr.
5. To stop the capture press CTRL+C
6. To view and decode the captured traces file with pulseview enter:

pulseview captured.sr &

PulseView will now open and display the captured trace. The results should look similar to the following:

Initial PulseView capture

You should be able to see the signal waveform on either CC1 or CC2 depending on the cable orientation. In the example above, the PD packet are being sent using CC1. If you zoom in, you can see the actual binary signal waveform captured. USB Type-C cables use an encoding called BMC (By-Phase Mark Coding) to encode the packets sent on the CC lines. To decode the signal, you’ll need to add a BMC decoder to your signal as shown in the example below:

Adding pd_bmc decoder

Then you need to choose the CC channel on which the packets were being sent by:

Picking the CC line with data

The Stack Decoder then needs to be specified. The usb_pd_packet should be chosen from the Stack Decoder drop menu:

Picking usb_pd_packet Stack Decoder

And that’s it! Along with the basic binary waveform, you’ll be able to view the packet symbols, parts, payload and even the packet type.