Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 May 2021 12:27:45 +0300
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        Hans Petter Selasky <hps@selasky.org>, freebsd-usb@freebsd.org
Subject:   Re: Flickering connection to UPS (again, but now I'm sure it is Ok under Windows)
Message-ID:  <ea6bc995-333b-69a1-c52f-38f62d174421@FreeBSD.org>
In-Reply-To: <f9954f21-e393-9c5b-306d-f1c45fdd3016@selasky.org>
References:  <e90a1125-1c85-4344-2427-aa50158036fc@FreeBSD.org> <98420b49-dc9a-0a5f-bcfe-e0a0e11a5994@selasky.org> <0c52bcf1-3b1a-a746-9ac3-26bdb4c46354@FreeBSD.org> <6e52d05d-8668-8c38-6745-a4edec50741d@selasky.org> <9a7b3be1-d606-cca6-d6c0-7ebefdfd4753@FreeBSD.org> <0814e5e8-45dd-14c8-3206-40eab0dc286e@selasky.org> <035b4eb7-58bd-8555-3416-39e0ec0a665e@FreeBSD.org> <f9954f21-e393-9c5b-306d-f1c45fdd3016@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09.05.2021 21:51, Hans Petter Selasky wrote:

[I'M ANSWERING TO BOTH MESSAGES IN THIS ONE]

> Could you do:
> 
> usbdump -i usbusX -f Y -s 65536 -vvv
> 
> Where X.Y are the numbers after ugen for this device.
   I'll do ASAP and return with results, but see below.

> Are you certain that NUT only execute exactly the same commands like the windows tool for this UPS?
   Of course, not! I'm sure, it is other sequence of commands at least, as NUT has generic driver for many UPSes which share one protocol, and it it not replication of Windows software.

> Does apcupsd work for this device too? I've never used NUT myself.
   Nope, it is another (not APC-compatible) protocol.

 > Then connect the device and run nut.
   nut is very slow in detecting UPSes and it can not "wait" for device to connect, so it simply can not find compatible device, as it is disconnected already. Maybe, I'll be lucky and will be able to "catch" long enough connection for nut to detect UPS and request information at leas one time.

 > If you don't run nut, does the same attach/detach happen?
   Oh. Looks like here is miscommunication. attach/detach happens WITHOUT nut on FreeBSD. But it DOESN'T even when software IS NOT installed on Windows. So:

(1) Windows WITHOUT Vendor-provided software: NO DETACH, "solid" connection.
(2) Windows WITH Vendor-provided software: NO DETACH, "solid" connection.
(3) FreeBSD WITHOUT nut: DETACH and re-attech in the loop.
(4) FreeBSD WITH nut: try to catch this combination, but it is not-trivial and fragile, not usable in production now, as UPS have detached itself before nut could start typically.


-- 
// Lev Serebryakov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ea6bc995-333b-69a1-c52f-38f62d174421>