[HN Gopher] Twonkie: A USB-PD sniffer/injector/sink based on Goo...
       ___________________________________________________________________
        
       Twonkie: A USB-PD sniffer/injector/sink based on Google's Twinkie
       open hardware
        
       Author : transpute
       Score  : 150 points
       Date   : 2024-06-25 01:55 UTC (21 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | normie3000 wrote:
       | > This one "sniffs" the link just for the Power Delivery
       | negotiations that happen at the lowest electrical levels. If a
       | device or cable is misbehaving, a knowledgeable person should be
       | able to replicate the problem and see it happening with the
       | sniffer. They could see which component was not following spec,
       | and most importantly, exactly what it was doing wrong. > > Even
       | if your computer is participating in Power Delivery, it can't see
       | its own PD traffic because all that is handled at a low level by
       | ASIC chips in your USB port. Hence the need for a separate
       | physical device to see the signals that are actually being sent
       | on the wire.
       | 
       | https://www.reddit.com/r/UsbCHardware/comments/qmz9uz/twonki...
        
         | transpute wrote:
         | Equivalent commercial PD analyer is ~$200,
         | https://www.infineon.com/cms/en/product/evaluation-boards/cy...
         | 
         |  _> records traffic passively on the Configuration Channel (CC)
         | and allows users to analyze and debug USB Power Delivery
         | communication.. acts as a pass-through for VBUS, VCONN, USB
         | 3.1, USB 2.0 and USB-PD traffic_
         | 
         | Total Phase / Google Twinkie device with Sigrok Pulseview
         | software, https://www.totalphase.com/blog/2015/10/usb-power-
         | delivery-a...
        
           | nimish wrote:
           | More like $60, or charger lab has a nicer one for about the
           | same price. https://estore.st.com/en/products/evaluation-
           | tools/product-e...
        
             | Panzer04 wrote:
             | Nicer in what way? I've used the one referenced in the
             | first comment (CY4500) and it worked quite well. I'm not
             | entirely sure what could be done better.
             | 
             | Nice to know that cheaper ones exist though - is the
             | supporting SW any good (reading out packets, recording etc)
        
               | nimish wrote:
               | Nicer in that it has a good HMI. Anandtech has a nice
               | review: https://www.anandtech.com/show/18944/usbc-power-
               | metering-wit...
        
             | transpute wrote:
             | _> charger lab has a nicer one_
             | 
             | Power-Z KM003C? https://www.amazon.com/ChargerLAB-
             | KM003C-Portable-Charging-V...
        
             | crote wrote:
             | The big question is how it performs with high-speed data.
             | Google's Twinkie and this Twonkie clone use a design which
             | messes with the data lines as little as possible so they'll
             | probably still work with USB4 if you're lucky, but the
             | linked ST device is routing those traces all over the
             | board. No issue with USB2, might work with 10Gbps USB3, but
             | anything more? I wouldn't want to bet on it.
        
               | rx_tx wrote:
               | ChargerLab's KM003C passes in Thunderbolt 4 correctly at
               | least.
               | 
               | (source: I have one and can have it between my macbook
               | pro and a TB4 dock and two displays work correctly)
        
       | transpute wrote:
       | $6 USB-C breakout for selectable voltage,
       | https://learn.adafruit.com/adafruit-husb238-usb-type-c-power...
       | 
       |  _> The HUSB238 USB PD sink chip is neat in that you can either
       | use jumpers (really, resistor selection) to set the desired power
       | delivery voltage and current or you can use I2C for dynamic
       | querying and setting._
        
         | btgeekboy wrote:
         | I combined one of those cheap breakouts with this variable
         | voltage power supply -
         | https://www.amazon.com/gp/product/B0861LGM15 - and a 3d printed
         | enclosure to make a benchtop power supply pretty affordably.
         | Just use your laptop's power supply and now you can have any
         | voltage and limited amperage.
        
           | jwildeboer wrote:
           | I am waiting for an updated version that does PD 3.1, so it
           | can go to 48V/5A.
        
             | dtx1 wrote:
             | That's 240W. You could charge an e-Bike via USB-C with
             | that. Insane.
        
               | jwildeboer wrote:
               | Yep. That's exactly what I am looking for. Use USB-PD to
               | charge small electric vehicles in a standardised way ;)
               | See https://jan.wildeboer.net/2024/06/Charging-SEVs-A-
               | Modest-Pro... where I describe the concept and
               | https://github.com/manuelbl/usb-pd-arduino/wiki where
               | there is Open Source code (and schematics) to do PD
               | sniffing and sink negotiation.
        
         | rainbowzootsuit wrote:
         | The AliExpress search term for similar devices is "trigger
         | board" or "decoy board."
         | 
         | I'm seeing them as low as ~10/$.
        
           | schmidtleonard wrote:
           | Have these gotten mature enough to actually use? A few years
           | ago, every single one I tested would just give you a
           | different voltage if it couldn't trigger the correct voltage,
           | which is obviously terrible.
        
             | rainbowzootsuit wrote:
             | My experience is good so far with them, but it's good to
             | get a couple of automobile lights to wire in series or
             | parallel to load them.
             | 
             | As the saying goes: "With Ali Express you test, don't
             | guess!"
        
             | Eisenstein wrote:
             | They go to the next lowest voltage, because some PD capable
             | supplies don't provide all the voltages. Most are missing
             | 12V, unfortunately.
        
           | kube-system wrote:
           | The electronics are small enough to put into a USBC connector
           | -- which is also a handy form factor:
           | 
           | https://www.amazon.com/Euogeudel-4-9ft-Trigger-
           | Input-2-5mm/d...
        
       | RockRobotRock wrote:
       | There is a very useful cheap device "TC66C" you can buy on
       | aliexpress which acts as a multimeter and lets you test/trigger
       | PD and the older protocols like Qualcomm quick charge.
        
       | eggy1 wrote:
       | I'm twinkie, and I'm twonkie, and we're the sniffer brothers
        
       | ComputerGuru wrote:
       | Link to original Twinkie is dead, here's an archived copy:
       | https://archive.is/EGxFi
        
         | denimnerd42 wrote:
         | https://www.chromium.org/chromium-os/developer-library/guide...
        
       ___________________________________________________________________
       (page generated 2024-06-25 23:01 UTC)