Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2009 13:30:35 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        thierry.herbelot@free.fr
Cc:        freebsd-usb@FreeBSD.org
Subject:   Re: Asynchronous bulk transfers in usb2 ?
Message-ID:  <20090515.133035.452788619.imp@bsdimp.com>
In-Reply-To: <200905152119.07569.thierry.herbelot@free.fr>
References:  <200905151857.21361.thierry.herbelot@free.fr> <200905152106.48104.hselasky@c2i.net> <200905152119.07569.thierry.herbelot@free.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200905152119.07569.thierry.herbelot@free.fr>
            Thierry Herbelot <thierry.herbelot@free.fr> writes:
: Le Friday 15 May 2009, Hans Petter Selasky a =E9crit :
: > On Friday 15 May 2009, Thierry Herbelot wrote:
: > > Hello,
: > >
: > > This is a follow-on for :
: > > http://www.mail-archive.com/freebsd-usb%40freebsd.org/msg04000.ht=
ml,
: > > where a code snippet was posted to use the new USB stack.
: > >
: > > I've just recompiled my old experiment (which used to work at the=
 time),
: > > and it does not seem to work with today's current (I made the cos=
metic
: > > changes due to the change of name for the libusb, so the compile =
at least
: > > is OK).
: > >
: > > the issue is that the following loop (copied from the previous ar=
chived
: > > post) is never executed :
: > > --------------------
: > > 	while ( ( pdev =3D libusb20_be_device_foreach ( pbe, pdev ) ) )
: > > 	{
: > > 		ddesc =3D libusb20_dev_get_device_desc ( pdev );
: > > 		printf("vendor %x prod %x\n", ddesc->idVendor, ddesc->idProduct=
);
: > >
: > > 		/* stop with the first found device */
: > > 		if ( ddesc->idVendor =3D=3D MY_VENDOR_ID )
: > > 		{
: > > 			libusb20_be_dequeue_device ( pbe, pdev );
: > > 			break;
: > > 		}
: > > 	}
: > > --------------------
: > >
: > > pdev is always NULL at the end of the loop (even though a USB dev=
ice has
: > > been plugged, has been detected by the USB stack and is correctly=
 seen,
: > > as per usbconfig, with the expected idVendor).
: > >
: > > I have not followed the recent developments on the USB stack : ma=
ybe some
: > > change is needed in my code ?
: >
: > Check permissions for devices under /dev/usb
: =

: *blush* (this is indeed the reason)
: =

: but .... this used to work ;-) (maybe it did no longer work after the=
 device =

: nodes were added for the USB devices)
: =

: what is the recommended way to change the permissions for the usb dev=
ice =

: nodes ? (with devd ?)
: =

: in the meantime, I'll try to run from root ...

I use devfs.rules:

[localrules=3D10]
	add path 'usb/*' mode 0660

and put my trusted to use usb users into group operator.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090515.133035.452788619.imp>