Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 May 2021 14:33:51 +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:  <c38c9846-feba-1d98-ce5f-9c140a58854e@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:

> Could you do:
> 
> usbdump -i usbusX -f Y -s 65536 -vvv
> 
> Where X.Y are the numbers after ugen for this device. Are you certain that NUT only execute exactly the same commands like the windows tool for this UPS? Does apcupsd work for this device too? I've never used NUT myself.

  Ok, results are encouraging:

  If NUT's (user-mode) driver starts fast enough to detect UPS, UPS stops to disconnect and works! After that, NUT could be stopped and/or restarted, but UPS remains connected.

  It is almost impossible to achieve with running NUT on startup (as UPS flickering from system power-up and there is no guarantee, that startup scripts will run in proper moment). Even `devd` could be not fast enough :-(

  Traffic received with usbdump is here:

http://lev.serebryakov.spb.ru/_sklad/ups/ups-freebsd-with-nut-no-flickr-usbdump.txt

  Looks like, I need small kernel-level driver which "prime" HID UPSes on connect with pre-canned requests to stop them from disconnect.

-- 
// Lev Serebryakov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c38c9846-feba-1d98-ce5f-9c140a58854e>