News for hackers. Stuff that matters.
Re:Ask HN: Why do laptop chargers have data wires? by gnabgib on Monday December 16, 2024 @09:29PM (#42437770)
The charger will work, just at a low/slow power. No destruction, unless it's non-conformant (the source should only increase the volts/amps if it detects the correct signalling from the drain... and this should is defined in the USB certification specs).

You may want to charge without a data-wire, or use a cable with a correct power-negotiation chip if you don't know/trust the source (eg a charging nook in a library/school/bar/airport.. anywhere public). Some devices are very trusting of power sources, or have been (security is improving, modern phones require unlock before they even acknowledge they accept/send data).

Re:Ask HN: Why do laptop chargers have data wires? by Faaak on Thursday December 19, 2024 @09:15AM (#42461559)
USB PD without signaling won't work. It wont supply the needed voltage (e.g. 19V), and the laptop won't charge
Re:Ask HN: Why do laptop chargers have data wires? by yread on Thursday December 19, 2024 @09:19AM (#42461589)
Is that true? I have a cable here that I use to charge my laptop with 65W PD but it doesn't make a data connection. Does it do some black magic?
Re:Ask HN: Why do laptop chargers have data wires? by Kirby64 on Thursday December 19, 2024 @09:26AM (#42461664)
There’s data, but then there’s also the “CC” pins. CC is mandatory for USB-C. It is what does the communication for PD. So, it’s data, but a very specific type of data.
Re:Ask HN: Why do laptop chargers have data wires? by cesarb on Thursday December 19, 2024 @09:26AM (#42461668)
> I have a cable here that I use to charge my laptop with 65W PD but it doesn't make a data connection. Does it do some black magic?

The magic is that USB-C has not one, but _several_ mostly independent "data" connection wires. Chargers normally do not use or care about the USB 2.0 data channel (or the separate USB 3.0 data channel), they only care about the separate "configuration" channel used for USB-PD negotiation; IIRC, according to the standard pure chargers are even supposed to short together the USB 2.0 wires, to signal to older USB B or micro-B devices "I'm a dumb passive charger which can provide more than just 2.5W of power".

So, if you have a broken cable which does not have the USB 2.0 wires connected (which AFAIK is not allowed by the standard), but has the power and configuration wires correctly connected, it might (or might not) work as a charge-only cable.

Re:Ask HN: Why do laptop chargers have data wires? by nucleardog on Thursday December 19, 2024 @09:22AM (#42461622)
> You may want to charge without a data-wire, or use a cable with a correct power-negotiation chip if you don't know/trust the source (eg a charging nook in a library/school/bar/airport.. anywhere public).

There's an alternate charging interface you can use that's pretty widely available and I'd highly recommend--the 120/240VAC outlets all over the place!

Yeah yeah, I'm only half kidding. If you're going out to the bar you're probably not gonna shove a USB charger in your pocket. But in most of the rest of those situations (library, school, airport) and more you _probably_ have a few things you're carrying with you. Just leave a small adapter and cable rolling around the bottom of your bag and you don't have to worry about this. (Or at least you're into the realm of _wildly_ theoretical attacks.)

This doesn't just avoid the potential security issues... A lot of those charging lockers and things are not exactly well designed or well engineered. If you use your own charger you also know some weird cheap out-of-spec setup isn't going to damage your phone and there won't be any incompatibilities with the charger/cable/device that leave you charging at 7.5W.