From owner-freebsd-usb@FreeBSD.ORG Fri May 7 13:28:23 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1BD6106566B for ; Fri, 7 May 2010 13:28:23 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4EBC78FC0A for ; Fri, 7 May 2010 13:28:22 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o47DRdUd037142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 May 2010 15:27:39 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o47DRSFS029858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 May 2010 15:27:28 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o47DRSKB030746; Fri, 7 May 2010 15:27:28 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o47DRPku030745; Fri, 7 May 2010 15:27:25 +0200 (CEST) (envelope-from ticso) Date: Fri, 7 May 2010 15:27:25 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20100507132724.GO3185@cicely7.cicely.de> References: <201005061949.o46Jngdt028521@lava.sentex.ca> <201005062240.30548.hselasky@c2i.net> <201005062056.o46KuV0k028879@lava.sentex.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201005062056.o46KuV0k028879@lava.sentex.ca> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: adk0212@gmail.com, freebsd-usb@freebsd.org Subject: Re: apcupsd port regression from 7x. to 8.x X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 13:28:24 -0000 On Thu, May 06, 2010 at 04:56:36PM -0400, Mike Tancsa wrote: > At 04:40 PM 5/6/2010, Hans Petter Selasky wrote: > >> 0.003 apcupsd: generic-usb.c:398 Initializing libusb > > > >The FreeBSD LibUSB v0.1 reports the wrong number of busses and devices. I > >can > >fix this. > > Great! > > >> 0.003 apcupsd: generic-usb.c:403 Found 0 USB busses > >> 0.007 apcupsd: generic-usb.c:405 Found 0 USB devices > > > >The problem is that the UPS code is designed to attach to the first > >matching > >device only. LibUSB does not hide devices with drivers already > >attached, which > >I think your utility assumes. You should use: > > > >pidfile, see man pidfile > > > >To create a temporary file with some string which consists of all numbers > >in > >udev->filename, separated by ".". Or USB LibUSB v.1.0! > > I am guessing the program would need to be re-written to use v1.0 > ? Thanks for the feedback and help as always! I recently converted own code to 1.0 API, just to get negative feedback from Debian users, since they only offer libusb 0.1 packages for anything but bleeding edge development versions. I assume because of this the old API will still be around for some time. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.