[Nut-upsuser] Generic UPS driver

Ariel Wainer ari at ariwainer.com.ar
Sun Jan 12 22:06:12 UTC 2014

On 12/01/14 16:32, Charles Lepple wrote:
> On Jan 12, 2014, at 11:07 AM, Ariel Wainer wrote:
>> On 11/01/14 15:27, Charles Lepple wrote:
>>> On Jan 10, 2014, at 4:46 PM, Ariel Wainer wrote:
>>>> On 10/01/14 01:53, Charles Lepple wrote:
>>>>> I am curious about why the Interrupt Out packet is sent by the Windows software if it isn't to turn off the UPS. Is it possible to do some more testing with shorter timeouts so that the battery doesn't get depleted? You would need to record the exact time when it shuts down, I think.
>> Ok, I did some more testing, with or without load and the observed
>> result is that te UPS completly powers down arround 30 seconds after the
>> interrput out packet that is sent during windows shutdown process.
> Hmm, then the driver should be doing the same thing.
> What does the debug output look like when you run ./nutdrv_atcl_usb -a ups -DDD -u root -k ?

root at lucy:/usr/local/ups/bin# ./nutdrv_atcl_usb -a ups -DDD -u root -k
Network UPS Tools - 'ATCL FOR UPS' USB driver 0.03
Warning: This is an experimental driver.
Some features may not function correctly.

   0.000000     debug level is '3'
   0.001212     Searching for USB device...
   0.565808     Checking USB device [1d6b:0001] (009/001)
   0.628893     Checking USB device [1d6b:0001] (008/001)
   0.692795     Checking USB device [1d6b:0001] (007/001)
   0.756970     Checking USB device [073a:2230] (006/003)
   0.757050     Checking USB device [1bcf:0002] (006/002)
   0.760954     Checking USB device [1d6b:0001] (006/001)
   0.761052     Checking USB device [1d6b:0003] (005/001)
   0.761166     Checking USB device [0001:0000] (004/007)
   0.765134     Initiating UPS shutdown
   0.765167     upsdrv_shutdown: attempting to call
usb_interrupt_write(01 00 00 00 00 00 00 00)

Then, 60 seconds afted the command exits, the UPS turns off. This only
happens on batteries, on AC the output is the same but the ups does not
turn off.

>> Strangely, when this happens I don't see any new packets on the capture.
>> The settings used for this test are: 1 minute both for shutdown on AC
>> fail and shutdown on low battery (I don't thing this one has any effect).
> Where do you mean? It looks like the host resets the USB port about 7 seconds after sending the Interrupt Out (packet #221 in the latest capture). If the Windows application doesn't reconnect, that would explain the lack of Interrupt In packets after it is finished enumerating.

Yes, the resets are sent when windows powers down, but the ups remains
on a minute after that and during that minute, no traffic is sent on the
bus, probably as you said, because the port is reset.

>>> If it's not too late for your tests, I committed a v0.03 to the 'atcl' branch, with string matching to avoid confusion with other 0001:0000 devices.
>> It wasn't, the output of the new driver:
> If it works for you, then that works for me.
> Thanks for testing,

It does indeed :D
Thank you for adding support for this UPS :)

More information about the Nut-upsuser mailing list