From owner-freebsd-usb@FreeBSD.ORG Sun Oct 31 14:11:03 2004 Return-Path: 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 78B8216A4CE for ; Sun, 31 Oct 2004 14:11:03 +0000 (GMT) Received: from mta06-svc.ntlworld.com (mta06-svc.ntlworld.com [62.253.162.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id C47F243D1F for ; Sun, 31 Oct 2004 14:11:02 +0000 (GMT) (envelope-from ben@spooty.net) Received: from m132-mp1.cvx3-b.pop.dial.ntli.net ([80.1.84.132]) by mta06-svc.ntlworld.comESMTP <20041031141119.VYTD12530.mta06-svc.ntlworld.com@m132-mp1.cvx3-b.pop.dial.ntli.net> for ; Sun, 31 Oct 2004 14:11:19 +0000 From: Ben Paley To: FreeBSD USB Date: Sun, 31 Oct 2004 14:07:30 +0000 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410311407.30808.ben@spooty.net> Subject: can't talk to printer on /dev/ulpt0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Oct 2004 14:11:03 -0000 Hello, I'm having difficulty with usb devices, specifically a camera and a printer - perhaps this is the wrong list for this, but neither -questions nor -current gave me a useful response... (possibly because I've just become Stable...) well, sorry if I'm cluttering things up, but I'm starting to tear my hair out! Problem ONE is that they are not always detected. Sometimes everything goes fine: ======================================================== ugen0: Eastman Kodak Company KODAK EasyShare DX4530 Zoom Digital Camera, rev 2.0 0/1.00, addr 3 ======================================================== and ======================================================== umass0: EPSON USB2.0 MFP, rev 2.00/1.00, addr 2 ulpt0: EPSON USB2.0 MFP, rev 2.00/1.00, addr 2, iclass 8/6 ulpt0: using bi-directional mode da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 1.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (da0:umass-sim0:0:0:0): SCSI Status: Check Condition (da0:umass-sim0:0:0:0): NOT READY asc:3a,0 (da0:umass-sim0:0:0:0): Medium not present (da0:umass-sim0:0:0:0): Unretryable error Opened disk da0 -> 6 (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (da0:umass-sim0:0:0:0): SCSI Status: Check Condition (da0:umass-sim0:0:0:0): NOT READY asc:3a,0 (da0:umass-sim0:0:0:0): Medium not present (da0:umass-sim0:0:0:0): Unretryable error Opened disk da0 -> 6 ======================================================== (all the da0 stuff is to do with a built-in multi card-reader) and all the right device nodes are created for the printer - /dev/ulpt0 and /dev/unlpt0. Sometimes these messages don't show up, but I get this a few minutes after I turn one of them on: ======================================================== uhub0: device problem, disabling port 2 ======================================================== Or something like it, depending on where I've plugged it in. I am really not sure what's making the difference, except that it seems never to work if either of them is on when the box boots up, or if I turn on the printer before the camera... but those are certainly not the full story, and I can't pretend to have been exhaustive in testing all the permutations. Problem TWO is with the printer, a nice new Epson Stylus Photo R300, which works beautifully in Windows. In FreeBSD, the camera works fine (with gphoto2 in the command line) once it's detected. But the printer responds very poorly. Doing ======================================================== su-2.05b# lptest 20 10 > /dev/ulpt0 ======================================================== makes the printer kind of clear its throat, like it's getting ready to do something, but changes its mind. I've tried sending a line feed afterwards, and pressing all the buttons on the printer, and none of those things seems to help. The machine is supposed to accept US ASCII plain text, according to linuxprinting.org. At least I know I've got the right node, as redirecting to /dev/unlpt0 does nothing at all. Although it seems futile to go further before I've sorted this out, I have tried some spooling stuff. Apsfilter, of course, and there's a proper driver for this printer, print/pips-spr300_310. I've installed that and followed all the setup instructions, configured /etc/printcap with the supplied script... ======================================================== su-2.05b# lptest 20 10 | lpr -Pspr300_310 su-2.05b# lpq -Pspr300_310 Rank Owner Job Files Total Size 1st root 0 (standard input) 210 bytes ======================================================== But nothing will happen at all, for ever, not even a throat-clearing. One thing I haven't tried is editing usbd.conf - is there any point doing that in this circumstance? ======================================================== su-2.05b# uname -a FreeBSD potato.hogsedge.net 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Oct 28 14:12:12 BST 2004 root@potato.hogsedge.net:/usr/obj/usr/src/sys/POTATO i386 ======================================================== Here's a bit of dmesg.today: ======================================================== uhci0: port 0xd000-0xd01f irq 10 at device 4.2 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xd400-0xd41f irq 10 at device 4.3 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered ======================================================== and here's a bit of my kernel conf: ======================================================== # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device ugen # Generic device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse device urio # Diamond Rio 500 MP3 player device uscanner # Scanners ======================================================== I'd really appreciate help with this stuff. Thanks a lot, Ben