USB drives with no phantom load (2018)
joeyh.name
joeyh.name
I frequently wonder how many devices actually adhere to that requirement. Probably not many.
If a company claims their product is "USB compatible", but the product doesn't 100% comply with the detailed technical specification, what's the company's liability?
And if the company knew the product didn't strictly meet the USB standard, but marketed the product as "USB compatible" anyway, does that rise to the level of fraud?
1 second * 365 (number of times plugged in per year) * 500mA * 5 volts * 5 years (expected lifespan) * $0.14 ($/kWh electricity)...
Total compensation is $0.00014... Would you like a check for that?
I doubt it's likely to succeed. Everyone on the jury will be easily convinced that software is hard to get right, since they have probably used a lot of shitty software and consider it normal.
If you don't make a claim about power draw, then I suspect your consumers can't complain unless the power draw is unexpectedly large. And even then, what are the actual damages you need to compensate them for?
I initially thought this might have been about phantom partitions or data or functionality not under the control of the owner/user.
This has worked fairly well, though it exposes some other interesting problems which I suspect are deeper issues in the Linux kernel, where "replugging" the same device hundreds of times over the course of days of runtime eventually exhausts some internal resource, causing the port to go completely dead until you unbind/bind the xhci device.
Note that if you're not on RPi or some other device with easily usable GPIO to control the relay, you can use any FTDI cable as 4x GPIO, and there are lots of cheap 5V relay breakout boards available.
There is IOCTL_USB_HUB_CYCLE_PORT in Windows that power cycles a port (https://docs.microsoft.com/en-us/windows-hardware/drivers/dd...). My research seems to indicate it doesn't always work. The corresponding utility on Linux has problems on modern hardware but the driver may not be complete.
For both operating systems, you can likely use the autosuspend features, but this is gated by the driver (at least on Linux) and may not be able to reset a malfunctioning device.
For some reason PCIe and USB lack a way to do a hard reset.
[1] https://rwmj.wordpress.com/2015/10/09/usb-per-port-power-swi...