From owner-freebsd-usb@FreeBSD.ORG Sat Jan 12 00:51:14 2008 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 66E3D16A418 for ; Sat, 12 Jan 2008 00:51:14 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id F2C0613C457 for ; Sat, 12 Jan 2008 00:51:13 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JDUac-0001d2-E9 for freebsd-usb@freebsd.org; Sat, 12 Jan 2008 00:51:10 +0000 Received: from 81.210.234.246 ([81.210.234.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Jan 2008 00:51:10 +0000 Received: from saper by 81.210.234.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Jan 2008 00:51:10 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-usb@freebsd.org From: Marcin Cieslak Date: Sat, 12 Jan 2008 01:51:02 +0100 Lines: 59 Message-ID: <47880EF6.40804@system.pl> References: <200801090114.56195@aldan> <200801091015.17730@aldan> <200801102203.m0AM33dF091080@chevy.androcles.org> <200801101800.26311.mi+mill@aldan.algebra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.234.246 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.11) Gecko/20071215 SeaMonkey/1.1.7 In-Reply-To: <200801101800.26311.mi+mill@aldan.algebra.com> Sender: news Cc: Duane H Hesser Subject: Re: uscanner and ulpt over the same connection (Re: BlackBerry) 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: Sat, 12 Jan 2008 00:51:14 -0000 Mikhail Teterin wrote: > четвер 10 січень 2008 05:03 по, Duane H Hesser Ви написали: >> A similar problem occurs to many of us who have HP printers which >> hook up (quite properly, it seems to me) on ulpt0. Mine also >> hooks up on umass0 (to service the flash memory card slots), >> and would hook up on uscanner0, too, if uscanner.c were modified >> to recognize it. If we want to use HP's software (HPLIP) >> to drive the printer we must arrange arrange for it to be ugen. I think "must arrange to be ugen" is I think too much - shouldn't we say "should we make this interface think it is talking via libusb to the proper endpoint"? I guess there are two problems with getting libusb-only applications to work on whatever shiny new USB stack we come up: 1. Get the scanning and device detection properly 2. Provide nice way to use control and interrupt endpoints using FreeBSD syscalls. I've had a quick look at sane, libgphoto2 and hplip they don't really use all very complicated logic - they just plain write to the pipes. For sane it is a matter of getting sanei_usb interface right - for libgphoto2 everything is in one file only (libgphoto2_port/usb/libusb.c), hplip has interesting stuff in io/hpmud/musb.c. I think those above are two different problems - solving #1 in a nice way - for example by doing bus enumeration usb(4) controller interface and then access provided via FreeBSD devices - will allow us to keep existing /dev/umassX naming scheme without the need to provide raw /dev/usbX.Y.Z access. I think it is realistic to have our own "libusb" (API-compatible but does not have to be related to the original project). > If both are currently available via the same USB cable, then it is already a > good improvement /and/ it should be easy to add ugen to the mix too -- we > might not need to wait for Hans' full and comprehensive rework to get > this... I have looked at the berry code and what I see is that most of the controller.cc and usbwrap.cc job is already done by the FreeBSD kernel and actually we probably might need a tiny Blackberry driver doing something like probe.cc and plug this easily into the application. A real test how nice is C++ object encapsulation :-) Can you send the udesc_dump (in ports/sysutils) output of a Blackberry and multifunction HP devices? My dream solution for control/interface would be if we could provide chipset-specific interface on top of our stack like ECP (/dev/uprinter0.ecp or whatever) or chipset support (/dev/uniash0), providing just "write register" and "read register" like operations. --Marcin