Date: Tue, 17 Apr 2012 19:59:02 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Matthias Apitz <guru@unixarea.de> Cc: Bruce Cran <bruce@cran.org.uk>, freebsd-usb@freebsd.org Subject: Re: dfu-util 0.5 Message-ID: <201204171959.02363.hselasky@c2i.net> In-Reply-To: <20120417154838.GA1710@tiny> References: <20120417100147.GA2557@tiny> <201204171736.56773.hselasky@c2i.net> <20120417154838.GA1710@tiny>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 17 April 2012 17:48:39 Matthias Apitz wrote: > El d=EDa Tuesday, April 17, 2012 a las 05:36:56PM +0200, Hans Petter Sela= sky=20 escribi=F3: > > Could you check if the libusb handle gets closed after reset? >=20 > The code part lookslike this: >=20 > printf("Resetting USB...\n"); > ret =3D > libusb_reset_device(_rt_dif.dev_handle); if (ret < 0 && ret !=3D > 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); >=20 > for reset it uses _rt_dif.dev_handle, and you made me add an operation > with dif->dev_handle, is this correct? >=20 > anyway: >=20 > Resetting USB... > doing libusb_set_configuration(dif->dev_handle, 1) > dif->dev_handle 28449f00 > Opening USB Device... > No such Alternate Setting: "rootfs" >=20 You should use the same handle like for libusb_reset_device(); =2D-HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204171959.02363.hselasky>