From owner-freebsd-usb@FreeBSD.ORG Thu Jan 10 00:13:32 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1CB216A46C for ; Thu, 10 Jan 2008 00:13:32 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id 9D29013C4D1 for ; Thu, 10 Jan 2008 00:13:32 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so775862waf.3 for ; Wed, 09 Jan 2008 16:13:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=79cNyGnJZWILO1uXzJWMcEbx/et1XaEOSPrO4j0NuEU=; b=g1/cQRM/CieH1KIp9cf5nwb97dvtWpweHegUpf63ZChViTAxMlIqpQkUqPiekmfEfk4dycHlzJXKn7q1bAlhgNe8LsREivdhcW3J1W2wuYHfLQIoXPbKb9/+1+ASU4lq4f1FVCpKk5/2zVWtJUnqsuxoBYf4P0mGW79ZWFlZrNQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SuulWTAdPprWHP0GmnYyS/22iKjDLfi68OQG093tPnjFU4b87vPDU7Vv/u8nJ87TycubVsQfANC0AxgG1HzjEapL/tTm2sugGNMSUAcUfmiPELNPQewuxKfdRqekU/tJzblJCDaKocWBZUy2nRNI/x3EAOZWKo9Fas8WeEERS3Y= Received: by 10.114.183.1 with SMTP id g1mr1525239waf.3.1199923078639; Wed, 09 Jan 2008 15:57:58 -0800 (PST) Received: by 10.114.174.8 with HTTP; Wed, 9 Jan 2008 15:57:58 -0800 (PST) Message-ID: Date: Thu, 10 Jan 2008 07:57:58 +0800 From: "Xiaofan Chen" To: "Hans Petter Selasky" In-Reply-To: <200801091934.54053.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200801090114.56195@aldan> <200801091015.17730@aldan> <200801091934.54053.hselasky@c2i.net> Cc: johnjen@reynoldsnet.org, R.Tobin@ed.ac.uk, Mikhail Teterin , usb@freebsd.org Subject: Re: BlackBerry (Re: using libusb) 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: Thu, 10 Jan 2008 00:13:32 -0000 On Jan 10, 2008 2:34 AM, Hans Petter Selasky wrote: > On Wednesday 09 January 2008, Mikhail Teterin wrote: > > We really need the low-level (ugen?) interfaces available for all > > USB-devices -- even those, which are /also/ handled by higher-level > > interfaces (like ulpt, uscan, umass). As things stand, the higher-level > > ones are "greedy" and will prevent ugen from appearing, even if one wanted > > to. > > Yes, you are completely right. And this is not very far away from happening. > I've wanted to do this for a long time, but have found no time yet. > > My plan is to extend /dev/usbX so that it becomes a so-called clonable device. > When you open up "/dev/usb0.2.3" for example, you open up the device having > index 2 on USB bus 0 and endpoint 3. This will need some modifications in > libusb. Ugen will still be there, but I plan to move the functionality over > to "usb.c". Accessing endpoints will then work regardless of what drivers are > hooked on. I am a non-programmer (I only know a bit of C) and not a USB expert. But I like libusb and use it with some USB devices. If you can get this done for FreeBSD, it will be wonderful. On the Linux libusb front, there are two new things going on. One is that the new libusb maintainer will be Daniel Drake and he will use his fpusb as the base for libusb 1.0 and get rid of the old 1.0 code. The 0.1 branch may also get some fixes. http://www.nabble.com/libusb-future-to14571903.html http://reactivated.net/fprint/wiki/Fpusb The other development is OpenUSB (under Solaris and Linux) mainly sponsored by Sun. http://openusb.sourceforge.net/wiki/index.php/Main_Page So you might look into these two. > Some open problems that needs to be resolved: > > Should we allow parallell access to USB interfaces? Do you mean thread safe access and/or assynchronous I/O? You might want to check out OpenUSB. > And what about rights management? >From what I know, it seems devfs rule works fine under FreeBSD. http://mcuee.blogspot.com/2007/11/setting-up-permissions-for-usb-ports-to.html (my blog post). Under Linux, the old one is using hotplug, now udev rules or HAL. Regards, Xiaofan