4 ms·
You'd think the USB-PD spec would have devices exchange their battery capacity, charge level, and AC power state. There is no scenario where anyone wants a 80-1
by xenadu02 4y ago
You'd think the USB-PD spec would have devices exchange their battery capacity, charge level, and AC power state.
There is no scenario where anyone wants a 80-100Ah device like a laptop to charge from a 3-4Ah device like a phone if both are on battery. Only if the device with a small battery is on AC power should it offer anything to the larger device. So the spec should prohibit this.
Secondly you'd think for devices of comparable battery capacity they'd prioritize having the one with AC power feed the one without it. If neither have AC power then have the one with a higher charge level feed the one with a lower charge level only when the one with the lower level reaches 20% and only as much as necessary to maintain 20%. Once the system providing power hits some threshold (40%?) stop feeding power altogether. This would do what most people want when you connect two laptops or two phones: share enough power to keep the other device running but don't completely drain them.
If a "battery bank" flag is set then it should always be a supplier unless the other end is a power supply.
You can have minor quibbles about the exact numbers here but this strategy is simple and does the right thing the vast majority of the time.
- jefftk 4y ago> If a "battery bank" flag is set then it should always be a supplier unless the other end is a power supply. If I plug my laptop into the wall and my battery bank into my laptop I want the laptop to charge the battery bank.
- pydry 4y ago>You'd think the USB-PD spec would have devices exchange their battery capacity, charge level, and AC power state. Screw that. They just need a signal for one device to tell the other that it wants to charge or be charged. The rest can be left up to the UI. It's better if it isn't smart. I'm mystified that we have this many USB C cable types, chargers and data transfer speeds and there isn't some protocol for explaining what is available when a cable is plugged in or dictating behavior based upon that.
- rektide 4y agoUSB HID defines a good number of power/battery telemetry/control items. It's bothered me a lot that no battery pack or chargers expose themselves as such in actual USB. This whole series of resistors in usb legacy and aux channel chat in usb-pd makes me more than a bit sad. I would have liked to have used longstanding usb hid specs to implememt usb-pd, rather than having assorted side-band negotiations. It still leaves the question of how two laptops would work. The naive "wait to see if there's a device and if not become the device" strategy more or less mirrors what usb-pd already does, with all the weird uncontrollable quirks. Im not sure how usb4 figures out there is a host-to-host link & negotiates networking, that's another wrinkle that might give us a good extension point to build from to enable bidirectional control. Maybe we run usb-ip over the network link - expose our usb hid battery/charger devices over that! ;p