From owner-freebsd-usb@FreeBSD.ORG Thu Mar 16 20:13:05 2006 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B28816A422 for ; Thu, 16 Mar 2006 20:13:05 +0000 (UTC) (envelope-from cyberbotx@cyberbotx.com) Received: from samus.cyberbotx.com (cyberbotx.com [70.88.125.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 986E943D62 for ; Thu, 16 Mar 2006 20:12:59 +0000 (GMT) (envelope-from cyberbotx@cyberbotx.com) Received: from localhost (localhost [127.0.0.1]) by samus.cyberbotx.com (Postfix) with ESMTP id B97A1C293; Thu, 16 Mar 2006 15:13:38 -0500 (EST) Received: from samus.cyberbotx.com ([127.0.0.1]) by localhost (samus.cyberbotx.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 90143-07; Thu, 16 Mar 2006 15:13:29 -0500 (EST) Received: from metroid (c-68-61-58-20.hsd1.mi.comcast.net [68.61.58.20]) by samus.cyberbotx.com (Postfix) with SMTP id C18F7C128; Thu, 16 Mar 2006 15:13:28 -0500 (EST) Message-ID: <117601c64936$0817ffd0$fe02a8c0@metroid> From: "Naram Qashat" To: "M. Warner Losh" References: <107401c6486b$773e9b10$fe02a8c0@metroid> <20060316.111031.106263180.imp@bsdimp.com> Date: Thu, 16 Mar 2006 15:13:03 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Virus-Scanned: amavisd-new at cyberbotx.com Cc: freebsd-usb@freebsd.org Subject: Re: IEEE1284 Device ID string for USB Printers 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, 16 Mar 2006 20:13:05 -0000 Well, I don't have a Linux machine to see exactly what is needed, but HPLIP's hpiod is looking for that IEEE1284 Device ID, which I believe starts off with MFG: or MANUFACTURER: followed by the maker of the product. HPLIP tries to get the device ID by using an IOCTL on the device, specifically, it's sending LPIOC_GET_DEVICE_ID(maxSize) [where maxSize is either the size sent to the function or 1024, whichever is smaller, and LPIOC_GET_DEVICE_ID is a macro that is set to _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len) with IOCNR_GET_DEVICE_ID #define'd to 1], and it passes a character pointer as a buffer. But FreeBSD doesn't let you do that on an u?lpt* device, and trying it on the root usb device doesn't get the information that is needed. I noticed in the ulpt.c source that the function ieee1284_print_id() is commented out with #if 0, and earlier in the file where it's called, it says that trying to retrieve the ID causes printing to stop working. I don't know enough about it to know why. I'm not sure if there is more needed by HPLIP to get the driver to work, but I've narrowed it down to this. Naram Qashat ----- Original Message ----- From: "M. Warner Losh" To: Cc: Sent: Thursday, March 16, 2006 01:10 PM Subject: Re: IEEE1284 Device ID string for USB Printers > In message: <107401c6486b$773e9b10$fe02a8c0@metroid> > "Naram Qashat" writes: > : I was wondering if there were any plans on getting the ieee1284_print_id() > : function in src/sys/dev/usb/ulpt.c to work properly. I was trying to see > : about getting HPLIP converted to FreeBSD, but it's hpiod program requires an > : ioctl to access the printer andget the IEEE1284 device ID string to identify > : the USB printer. Without that ioctl, HPLIP can't be ported over. > > What would it take to get working properly? > > Warner