Date: Mon, 24 Nov 2003 14:54:39 +0100 From: Bernd Walter <ticso@cicely12.cicely.de> To: "Michael E. Mercer" <mmercer@nc.rr.com> Cc: freebsd-hackers@freebsd.org Subject: Re: USB Question: unable to open /dev/ugen0 more than once Message-ID: <20031124135438.GP74178@cicely12.cicely.de> In-Reply-To: <1069638644.355.9.camel@dual.mmercer.com> References: <1069638644.355.9.camel@dual.mmercer.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 23, 2003 at 08:50:45PM -0500, Michael E. Mercer wrote: > Hello peoples, > > I posted this to questions with no reply, I was hoping > someone here may be able to give some insight. > > > Question: Should I be able to open /dev/ugen0 more than once? > > I am using FreeBSD 4.9-Stable, libusb-0.1.7. > >From reading the libusb docs, you must open the device for each > interface you want to acquire. However, once it is opened once, it can't > be opened again. > > Furthermore, calls to usb_find_devices() shows that /dev/ugen0 has > disappeared. Investigation on how they(libusb) finds devices, shows they > are trying to open the device read only... this is where it tries to > open it the second time. This second try fails and therefore libusb > thinks the device was removed. > > Question: Is this the correct behavior? Yes - this is correct. A client using ugen on a multiple interface only need to open /dev/ugen? for probing only - the work should be done using the interface specific endpoints /dev/ugen?.? Opening /dev/ugen? read-only makes no sense, because there is no read only access possible - /dev/ugen? is for the control endpoint which always means sending commands to the device. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031124135438.GP74178>