[Nut-upsuser] [EXTERNAL] trying to talk to TrippLite SMX1500LCD using RPI & NUT
Stuart D Gathman
stuart at gathman.org
Tue Nov 24 18:42:25 GMT 2020
On Tue, 24 Nov 2020, Marco Walther wrote:
> On 11/24/20 9:11 AM, Kirk Bocek wrote:
>>
>> On 11/24/2020 8:10 AM, David Zomaya wrote:
>>>>> Only when I physically unplug it and plug it in again will it start.
You need a USB hub that supports either mandatory all ports off (even
though it is mandatory, very few hubs sold actually implement it),
or optional PPPS (per port power switching). With older kernels,
I was able to use hub-ctrl to power off the port with the UPS, and
then power it on again - which has the same effect as unplugging the
cable. I put all this into a package (trippfix on github) for CentOS-6.
With newer kernels, e.g. CentOS-8, the kernel knows how to deal with
this kind of braindamage, and will do the PPPS power cycle
automatically (which won't work, of course, unless you have a hub
that actually supports it). So with C8, I don't need my package.
Here is an example from dmesg of the kernel doing the power cycle
automatically:
[1909765.932951] usb 2-1.4-port4: disabled by hub (EMI?), re-enabling...
[1909765.933328] usb 2-1.4.4: USB disconnect, device number 17
[1909766.898490] usb 2-1.4-port4: Cannot enable. Maybe the USB cable is
bad?
[1909767.754326] usb 2-1.4-port4: Cannot enable. Maybe the USB cable is
bad?
[1909767.754586] usb 2-1.4-port4: attempt power cycle
[1909768.774301] usb 2-1.4.4: new low-speed USB device number 20 using
ehci-pci
[1909768.817887] usb 2-1.4.4: New USB device found, idVendor=09ae,
idProduct=3016, bcdDevice= 0.02
>>>>> Is there a way I can do something about that?
Get a hub that supports PPPS.
Since all USB microcontrollers on the market support PPPS, you can
also add it yourself if you are so inclined:
http://hackaday.com/2014/02/05/software-controlled-per-port-power-switching-for-usb-hubs/
For a list of working hubs when I bought mine in 2016:
https://github.com/codazoda/hub-ctrl.c
This is not something NUT can really do anything about (other than
the driver recovering properly when the UPS goes away and then comes back).
It is braindead USB hardware in many Tripplite boxes.
My Tripplite does really well at handling the surges that come with
power failures and switching to alternate circuits or home generator
power. So it was worth it to work around its USB braindamage. Buying a
higher end device might have been more cost effecting considering
my time - but wouldn't be nearly as fun...
More information about the Nut-upsuser
mailing list