From owner-freebsd-usb@FreeBSD.ORG Fri May 15 19:19:25 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DC1E1065670 for ; Fri, 15 May 2009 19:19:25 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by mx1.freebsd.org (Postfix) with ESMTP id EC9928FC13 for ; Fri, 15 May 2009 19:19:23 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtp4-g21.free.fr (localhost [127.0.0.1]) by smtp4-g21.free.fr (Postfix) with ESMTP id 0E7414C815B for ; Fri, 15 May 2009 21:19:19 +0200 (CEST) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp4-g21.free.fr (Postfix) with ESMTP id 052364C80C2 for ; Fri, 15 May 2009 21:19:16 +0200 (CEST) Received: from tulipe.herbelot.nom (tulipe.herbelot.nom [192.168.2.5]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id n4FJJDaR001945; Fri, 15 May 2009 21:19:13 +0200 (CEST) From: Thierry Herbelot To: Hans Petter Selasky Date: Fri, 15 May 2009 21:19:07 +0200 User-Agent: KMail/1.9.10 References: <200905151857.21361.thierry.herbelot@free.fr> <200905152106.48104.hselasky@c2i.net> In-Reply-To: <200905152106.48104.hselasky@c2i.net> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200905152119.07569.thierry.herbelot@free.fr> Cc: freebsd-usb@freebsd.org Subject: Re: Asynchronous bulk transfers in usb2 ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 19:19:25 -0000 Le Friday 15 May 2009, Hans Petter Selasky a écrit : > 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.html, > > 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 cosmetic > > 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 archived > > post) is never executed : > > -------------------- > > while ( ( pdev = libusb20_be_device_foreach ( pbe, pdev ) ) ) > > { > > ddesc = 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 == MY_VENDOR_ID ) > > { > > libusb20_be_dequeue_device ( pbe, pdev ); > > break; > > } > > } > > -------------------- > > > > pdev is always NULL at the end of the loop (even though a USB device 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 : maybe 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 device nodes ? (with devd ?) in the meantime, I'll try to run from root ... Thanks TfH > > --HPS