From owner-freebsd-usb@FreeBSD.ORG Tue Apr 17 15:48:48 2012 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 1E2E9106566B for ; Tue, 17 Apr 2012 15:48:48 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id C9EAE8FC19 for ; Tue, 17 Apr 2012 15:48:47 +0000 (UTC) Received: from [82.113.119.16] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SKAe4-00049v-Ty; Tue, 17 Apr 2012 17:48:45 +0200 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q3HFmfQv001769; Tue, 17 Apr 2012 17:48:42 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q3HFmdKV001768; Tue, 17 Apr 2012 17:48:39 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Tue, 17 Apr 2012 17:48:39 +0200 From: Matthias Apitz To: Hans Petter Selasky Message-ID: <20120417154838.GA1710@tiny> References: <20120417100147.GA2557@tiny> <201204171653.24802.hselasky@c2i.net> <20120417151801.GA1476@tiny> <201204171736.56773.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201204171736.56773.hselasky@c2i.net> X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 82.113.119.16 Cc: Bruce Cran , freebsd-usb@freebsd.org Subject: Re: dfu-util 0.5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2012 15:48:48 -0000 El día Tuesday, April 17, 2012 a las 05:36:56PM +0200, Hans Petter Selasky escribió: > > Could you check if the libusb handle gets closed after reset? The code part lookslike this: printf("Resetting USB...\n"); ret = libusb_reset_device(_rt_dif.dev_handle); if (ret < 0 && ret != LIBUSB_ERROR_NOT_FOUND) fprintf(stderr, "error resetting " "after detach\n"); fprintf(stderr, "doing libusb_set_configuration(dif->dev_handle, 1)\n"); libusb_set_configuration(dif->dev_handle, 1); sleep(2); fprintf(stderr, "dif->dev_handle %08x\n", dif->dev_handle); for reset it uses _rt_dif.dev_handle, and you made me add an operation with dif->dev_handle, is this correct? anyway: Resetting USB... doing libusb_set_configuration(dif->dev_handle, 1) dif->dev_handle 28449f00 Opening USB Device... No such Alternate Setting: "rootfs" Thanks matthias -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5