# USB-C PD Plank?

**URL:** <https://forum.buspirate.com/t/usb-c-pd-plank/599>\
**Category:** General\
**Created:** [September 4, 2024, 6:14pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599 "2024-09-04T18:14:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomKeddie](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@TomKeddie](https://forum.buspirate.com/u/TomKeddie)\
**Post date:** [September 4, 2024, 6:14pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/1 "2024-09-04T18:14:57Z")

</div>

Early on in the Glasgow development Rod Whitby proposed a USB-C PD interface. The project is stalled am talking to Rod about reviving it but it occurs to me that glasgow is probably overkill for this application so I might build a plank instead. The details are at [glasgow-addons/hardware/usb-pd-addon at usbp-pd-addon · rwhitby/glasgow-addons · GitHub](https://github.com/rwhitby/glasgow-addons/tree/usbp-pd-addon/hardware/usb-pd-addon)

The initial goal was to interface to the bootloader serial port on the modern Arm MACs (ala [HW:USB PD · AsahiLinux/docs Wiki · GitHub](https://github.com/AsahiLinux/docs/wiki/HW%3AUSB-PD)).

I’d like the ability to query usb-c e-marked cables to see if they really are e-marked - see [What is an E-Marker in a USB Type-C Cable and How Does It Work? - Total Phase](https://www.totalphase.com/blog/2020/10/what-is-e-marker-how-does-it-work/)

Am posting here in case this grabs someone else’s attention and they want to take the idea and run with it. My project completion rate is pretty low these days unfortunately.

---

<div class="post-metadata">

**Author:** ![TomKeddie](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@TomKeddie](https://forum.buspirate.com/u/TomKeddie)\
**Post date:** [September 4, 2024, 8:10pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/2 "2024-09-04T20:10:39Z")

</div>

Adding this link here since this gives some idea of what is possible.

> **[All About USB-C: Talking Low-Level PD](https://hackaday.com/2023/02/14/all-about-usb-c-talking-low-level-pd/)**
>
> In this USB-C series, we’ve covered quite a bit of USB-C – things that are well known, things that should be  better known, and a couple things that just appeared online for the first t…

---

<div class="post-metadata">

**Author:** ![ian](https://forum.buspirate.com/user_avatar/forum.buspirate.com/ian/32/28_2.png) [@ian](https://forum.buspirate.com/u/ian)\
**Post date:** [September 5, 2024, 1:50pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/3 "2024-09-05T13:50:19Z")

</div>

So, querying the chips inside the cables? That sounds really interesting. I’m bookmarking this.

---

<div class="post-metadata">

**Author:** ![TomKeddie](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@TomKeddie](https://forum.buspirate.com/u/TomKeddie)\
**Post date:** [September 6, 2024, 1:46pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/4 "2024-09-06T13:46:23Z")

</div>

Rod is sending me his protos, first step will be to interface them to the BP, will need to mux a lot of the IO since glasgow has 16pins and BP has 8. Will come back once I have the electrical planned.

---

<div class="post-metadata">

**Author:** ![henrygab](https://forum.buspirate.com/user_avatar/forum.buspirate.com/henrygab/32/1330_2.png) [@henrygab](https://forum.buspirate.com/u/henrygab)\
**Post date:** [September 8, 2024, 4:23am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/5 "2024-09-08T04:23:55Z")

</div>

> [@TomKeddie](#):
>
> I’d like the ability to query usb-c e-marked cables to see if they really are e-marked

@ian, imho, the ability to query and probe e-marked USB-C cables would be a keynote-worthy capability for the BusPirate!

Brainstorming… what if the plank had _ **two** _ USB-C connectors? Could it then identify / differentiate:

1. Single-ended e-marked USB-C cable
2. e-marked USB-C cables with _ **different** _ data per side(!)
3. e-marked USB-C cables that _ **correctly** _ report same data on both ends
4. Dumping of the e-marked data with possible interpretation … is that 100W cable you bought actually reporting itself as capable of 100W?

As stretch goals / later additions that might impact what pins you connect… Could other common problems be detected? (e.g., are there charge-only USB-C cables? do some have excessive voltage drop due to wires that are too thin? etc.)

---

<div class="post-metadata">

**Author:** ![henrygab](https://forum.buspirate.com/user_avatar/forum.buspirate.com/henrygab/32/1330_2.png) [@henrygab](https://forum.buspirate.com/u/henrygab)\
**Post date:** [September 8, 2024, 7:33am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/6 "2024-09-08T07:33:02Z")

</div>

Well, here’s a nifty schematic I found. Sadly, the person is no longer making these available on Tindie. ☹ I wonder how much something like this would cost (fully populated) from Ian’s crew? _\<poke, poke\>_

Github link has the [schematics](https://github.com/aroerina/LimePulse_USB_cable_checker).  
Tindie link has discussion with useful [recommended changes](https://www.tindie.com/products/aroerina2/usb-cable-checker/).  
Looks like there’s a similar item still for [sale on Amazon](https://www.amazon.com/dp/B0CF95VL2Y).

Maybe modify to add in the USB-PD queries using that fancy new chip, and folks will start to throw away old (or return new) USB cables…

---

<div class="post-metadata">

**Author:** ![ian](https://forum.buspirate.com/user_avatar/forum.buspirate.com/ian/32/28_2.png) [@ian](https://forum.buspirate.com/u/ian)\
**Post date:** [September 8, 2024, 1:58pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/7 "2024-09-08T13:58:13Z")

</div>

All the LEDs for the various pull-x coded stuff is cool, but it makes me hate that as a method of marking the cables. I’m pro E-marker, converted 🙂

---

<div class="post-metadata">

**Author:** ![electronic\_eel](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/e/e8c25b/32.png) [@electronic\_eel](https://forum.buspirate.com/u/electronic_eel)\
**Post date:** [September 8, 2024, 3:57pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/8 "2024-09-08T15:57:16Z")

</div>

> [@henrygab](#):
>
> Well, here’s a nifty schematic I found. Sadly, the person is no longer making these available on Tindie.

Here is something that looks similar from my bookmarks: [https://github.com/smaroukis/usb-sleuth](https://github.com/smaroukis/usb-sleuth)  
The description says it does detect the e-markers, but I haven’t tried it yet.

I think this cable testing thing could be one useful feature of a plank for the bp, but other things, like testing PD sources, sinks, role-swap, sending arbitrary pd-messages to pd controllers and seeing what happens, should also be possible.

If you are looking for a dedicated cable tester, the project I linked is probably better because as a dedicated tool it is easier to use.

---

<div class="post-metadata">

**Author:** ![henrygab](https://forum.buspirate.com/user_avatar/forum.buspirate.com/henrygab/32/1330_2.png) [@henrygab](https://forum.buspirate.com/u/henrygab)\
**Post date:** [September 8, 2024, 5:43pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/9 "2024-09-08T17:43:52Z")

</div>

For BP5, likely could do much better than these devices. With that many pins, might want to mux the two connections, then test for any improper cross-connections… (E.g., mux to sending voltage only over one pin at a time, and then detect which pin(s) it shows up on the other connector; Also allow checking if shield and ground are connected, etc.)

Thus, no need for the LEDs… use the BP screen to display the results. The costly bit is the sheer number of USB connectors needed (plus one time engineering costs). When coupled with the ability to not only detect, but _ **query** _ the e-marker, … SO useful!

---

<div class="post-metadata">

**Author:** ![TomKeddie](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@TomKeddie](https://forum.buspirate.com/u/TomKeddie)\
**Post date:** [September 8, 2024, 7:58pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/10 "2024-09-08T19:58:22Z")

</div>

> [@henrygab](#):
>
> For BP5, likely could do much better than these devices. With that many pins, might want to mux the two connections, then test for any improper cross-connections…

Please feel free to kick off something like this.

My plan is to port Rod’s original intent to BP. More of a general purpose tool to learn about USB-C PD than anything dedicated. His original design used 16 IO at both 5V and 3.3V porting it to 8 IO at 5V is my first challenge.

---

<div class="post-metadata">

**Author:** ![henrygab](https://forum.buspirate.com/user_avatar/forum.buspirate.com/henrygab/32/1330_2.png) [@henrygab](https://forum.buspirate.com/u/henrygab)\
**Post date:** [September 9, 2024, 3:33am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/11 "2024-09-09T03:33:31Z")

</div>

> [@TomKeddie](#):
>
> Please feel free to kick off something like this.

😂 You think too highly of my skills. 😂 I get too frustrated with the tooling for schematics (EasyEDA, KiCad, Fusion360 aka Eagle).

A GPIO extender + two of those fancy USB-PD chips to query the e-marker … all of which can be accessed via I2C … then I can write the logic to test the full connectivity matrix + port the USB-PD features over to BP5. Someone else would need to design the board … it’s not my cup of tea.

---

<div class="post-metadata">

**Author:** ![ian](https://forum.buspirate.com/user_avatar/forum.buspirate.com/ian/32/28_2.png) [@ian](https://forum.buspirate.com/u/ian)\
**Post date:** [September 9, 2024, 11:07am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/12 "2024-09-09T11:07:52Z")

</div>

![image](https://forum.buspirate.com/uploads/default/original/2X/b/b4fb54576fae190a7b6cfef3e1680329f58ad4a1.jpeg)

Just now had a chance to check this a bit. So the mux is needed to have 24 pins for each side of the cable? 48 pins total? Is that like with an analog mux so a single set can do input and output? Or like a boat load of 595s and 166s? If hardware is what is needed, I can get it sorted if I know the approach.

Ok, just read the hack a day posts and the datasheet for FUSB302B.

 ![image](https://forum.buspirate.com/uploads/default/original/2X/2/2d416b5529b6dd116daee44db066b5927dc99071.png)

Seems straight forward.

 ![image](https://forum.buspirate.com/uploads/default/original/2X/4/4f029766f6aa954e49d46dab048f67cee1bd0cca.png)

Cap values.

This is really interesting. I didn’t read the protocol spec yet, I’m curious how negotiation for host/device works and how you manage talking to the cable e marker and also e.g. the power supply (multiple devices). Need to keep reading 🙂

![image](https://forum.buspirate.com/uploads/default/original/2X/0/0945401ad0a2fd90dbd3646d43773b99d2c4c72e.png)

This just makes me want to stick my finger in every register! With a warning like this you know there’s some good stuff in there.

---

<div class="post-metadata">

**Author:** ![grymoire](https://forum.buspirate.com/user_avatar/forum.buspirate.com/grymoire/32/2123_2.png) [@grymoire](https://forum.buspirate.com/u/grymoire)\
**Post date:** [September 9, 2024, 2:18pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/13 "2024-09-09T14:18:24Z")

</div>

I think the [original cable tester](https://github.com/alvarop/usb_c_cable_tester) was designed by  
[Alvero Prieto](https://x.com/alvaroprieto) from the [Unnamed Reverse Engineering Podcast](https://unnamedre.com/)  
He made it open source, and the [Amazon link](https://www.amazon.com/dp/B0CF95VL2Y) is the same thing.

While this isn’t precisely a cable tester, this open source project , the [USBValve](https://github.com/cecio/USBvalve), is an inexpensive way to detect evil cables like the [Evil Crow](https://www.tindie.com/products/aprbrother/evil-crow-cable/). Perhaps it could be modified to detect e-marked cables? A simple plank could be maded for the BusPirate, and an Evil cable detector plank that would detect the O.MG cables would be very cool and not too expensive to build. The USBValve is just a Pico, a display, and a female USB connector.

---

<div class="post-metadata">

**Author:** ![TomKeddie](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@TomKeddie](https://forum.buspirate.com/u/TomKeddie)\
**Post date:** [September 10, 2024, 4:33am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/14 "2024-09-10T04:33:54Z")

</div>

(finally added [forum.buspirate.com](http://forum.buspirate.com) to my hosts file so I don’t have to tether to my phone to post here - site is still blocked by cloudflare family dns despite my best efforts)

I’m going to look at porting Rod’s schematic to BP. A lot of work and discussion went into this design, I want to retain as much of it as I can. Original schematic is below

Changes

- Run all the IO at 3.3V and boost to 5V for VBUS\_OUT
- Change the FUSB302B VDD to 3.3V so all its IO moves to 3.3V

| Direct Pin |
| --- |
| FUSB SCL |
| FUSB SDA |
| FUSB INT |
| SBU1\_3V3 |
| SBU2\_3V3 |
| USBP\_3V3 |
| USBP\_3V3 |
| CTRL |

CTRL will be a uart to a cheap cpu (CH32V003?) to control low speed pins using a simple single character protocol like repeat the same command 3 times to be valid, lower case for off, upper case for on.

| CTRL Command | Muxed Pin | Default |
| --- | --- | --- |
| a/A | SBU1\_DIR | Input |
| b/B | SBU2\_DIR | Input |
| c/C | SLV | 3.3V |
| d/D | USBP\_DIR | Input |
| e/E | USBN\_DIR | Input |
| f/F | ULV | 3.3V |
| g/G | VEN | off |

The only IO we lose is the FLT on the AP2171W power switch, can’t avoid this.

One desirable thing the original design didn’t have is the ability to isolate the FUSB302 from the bus and sniff CC1/CC2. Not sure how to add this, could be on a second set of usb-c connectors but there are no IO left.

This will be expensive to produce in its current form. Once we work out the functionality I think we can depop (and 0R bypass) a bunch of parts to make a lite version that is FUSB302B only, probably with the IO at 5V to remove the boost regulator.

 ![image](https://forum.buspirate.com/uploads/default/original/2X/9/93f2990cb2ab44ed09654fc463349c285389f51b.png)

---

<div class="post-metadata">

**Author:** ![henrygab](https://forum.buspirate.com/user_avatar/forum.buspirate.com/henrygab/32/1330_2.png) [@henrygab](https://forum.buspirate.com/u/henrygab)\
**Post date:** [September 10, 2024, 8:35am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/15 "2024-09-10T08:35:38Z")

</div>

Love it!

About to show my ignorance here…

How will the buspirate query the low speed pins (e.g., to read which pins show voltage, in order to detect / show the results)?

Also, will the cheap CPU need to read analog values to determine the pre-USB3 resistor values?

---

<div class="post-metadata">

**Author:** ![TomKeddie](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@TomKeddie](https://forum.buspirate.com/u/TomKeddie)\
**Post date:** [September 10, 2024, 1:49pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/16 "2024-09-10T13:49:46Z")

</div>

> [@henrygab](#):
>
> How will the buspirate query the low speed pins (e.g., to read which pins show voltage, in order to detect / show the results)?

The low speed pins are connected to the BP via the U2A and U4A analog switches. The glasgow was all digital but if the BP has ADC on these pins then their analog level could be read.

> [@henrygab](#):
>
> Also, will the cheap CPU need to read analog values to determine the pre-USB3 resistor values?

I personally have no intention of supporting QC 2.0/3.0 but this could be done as above. From my pov this is intended to be a USB-C plank, QC is not a USB-C protocol.

---

<div class="post-metadata">

**Author:** ![Anonymous](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@Anonymous](https://forum.buspirate.com/u/Anonymous)\
**Post date:** [September 20, 2024, 4:56am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/17 "2024-09-20T04:56:09Z")

</div>

I had a board very much like that one pictured on AMazon. The problem for cable testing is that it doesn’t run a signal through each pin individually and confirm that the neighboring pins DON’T signal. So you could twist all the wires together and it would “pass”.

Doing that takes more than just passive parts and I don’t see anything particularly active on that board. Even a mid-grade CH32V003 that’d raise a GPIO and then confirm ONLY that pin was raised would be enough. Oh. I guess you might need one '006 for output pins and another for input pins and then some kind of signalling between them. I’d have to think if you could pull that off with 18 (?) diodes cheaper than another MCU or something. I’ll leave that to you hardware experts.

The Pinecils were laid out with different PD tranceivers. The PD302 was chosen.

QC2 and 3 shouldn’t have existed. PD (rightfully) won.

---

<div class="post-metadata">

**Author:** ![rce\_pirate](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/r/e79b87/32.png) [@rce\_pirate](https://forum.buspirate.com/u/rce_pirate)\
**Post date:** [October 23, 2024, 2:29pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/18 "2024-10-23T14:29:08Z")

</div>

For a minute there in this post from wow four years ago I was thinking that there was some want for a plank that did something similar to the USB cereal on crowdsupply or the minnow on tindie.

> **[USB-Cereal](https://www.crowdsupply.com/0xda/usb-cereal#products)**
>
> An open source hardware accessory that supports log capture, simplifies CLI interaction, and facilitates firmware updates for USB Type-C devices

> **[Minnow USB-C Debug Accessory Mode Tool (DAM) by JBR Engineering on Tindie](https://www.tindie.com/products/jbrengineering/minnow-usb-c-debug-accessory-mode-tool-dam/)**
>
> Minnow is a tool for using DAM (Debug Accessory Mode), providing an interface to SWD or JTAG and/or UART from the device

I do a fair bit of usb research with all the greatscott gadgets, but USB-c, pd driver debugging, and other items are on my list to dig into.

---

<div class="post-metadata">

**Author:** ![BusPirateV5](https://forum.buspirate.com/user_avatar/forum.buspirate.com/buspiratev5/32/102_2.png) [@BusPirateV5](https://forum.buspirate.com/u/BusPirateV5)\
**Post date:** [October 24, 2024, 2:45am UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/19 "2024-10-24T02:45:12Z")

</div>

Welcome. I cant speak for others, although I believe they’d say similar, I appreciate the info.  
I’m curious, what kind of work do you do with usb and great scott gadgets?

---

<div class="post-metadata">

**Author:** ![rce\_pirate](https://forum.buspirate.com/letter_avatar_proxy/v4/letter/r/e79b87/32.png) [@rce\_pirate](https://forum.buspirate.com/u/rce_pirate)\
**Post date:** [October 24, 2024, 1:28pm UTC](https://forum.buspirate.com/t/usb-c-pd-plank/599/20 "2024-10-24T13:28:34Z")

</div>

Hi, Mostly reversing other people’s weaponized tooling. Usually from a forensic/dfir standpoint in cases. I also run into cases of backdoored firmware and things of that nature. I used the bus pirate og version for many many years to get at things while they were running on chips. Now getting more into the hardware side of things, so this is such a great forum to read and learn from. Thanks!.

[Next page](https://forum.buspirate.com/t/usb-c-pd-plank/599.md?page=2)
