From owner-freebsd-usb@freebsd.org Tue May 11 09:27:49 2021 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F2FE62F528 for ; Tue, 11 May 2021 09:27:49 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FfXdd0pKBz3Q3j; Tue, 11 May 2021 09:27:49 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [148.251.9.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id E84BB20D60; Tue, 11 May 2021 09:27:48 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [IPv6:2001:470:923f:1:a00e:4207:f246:df8d] (unknown [IPv6:2001:470:923f:1:a00e:4207:f246:df8d]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 4BE9F42DC; Tue, 11 May 2021 12:27:46 +0300 (MSK) Reply-To: lev@FreeBSD.org Subject: Re: Flickering connection to UPS (again, but now I'm sure it is Ok under Windows) To: Hans Petter Selasky , freebsd-usb@freebsd.org References: <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> From: Lev Serebryakov Organization: FreeBSD Message-ID: Date: Tue, 11 May 2021 12:27:45 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2021 09:27:49 -0000 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