From owner-freebsd-questions Sat Nov 25 15:12:44 2000 Delivered-To: freebsd-questions@freebsd.org Received: from murphys-outbound.servers.plus.net (unknown [212.159.14.225]) by hub.freebsd.org (Postfix) with SMTP id B157E37B4CF for ; Sat, 25 Nov 2000 15:12:40 -0800 (PST) Received: (qmail 2562 invoked from network); 25 Nov 2000 22:44:23 -0000 Received: from unknown (HELO daemon.lpds.sublink.org) (212.159.49.132) by murphys with SMTP; 25 Nov 2000 22:44:23 -0000 Received: from pelissero.org (hyde.lpds.sublink.org [10.0.0.2]) by daemon.lpds.sublink.org (8.9.3/8.9.3) with ESMTP id WAA23021 for ; Sat, 25 Nov 2000 22:36:08 GMT (envelope-from wcp@pelissero.org) Received: (from wcp@localhost) by pelissero.org (8.9.3/8.9.3) id WAA12598; Sat, 25 Nov 2000 22:42:52 GMT (envelope-from wcp) Message-ID: <14880.16492.311270.383061@hyde.lpds.sublink.org> Date: Sat, 25 Nov 2000 22:42:52 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: "Walter C. Pelissero" Reply-To: walter@pelissero.org To: Keith Walker Cc: questions@freebsd.org Subject: Problem with USB printer In-Reply-To: <00112510022900.06194@mars.walker.dom> References: <00112510022900.06194@mars.walker.dom> X-Mailer: VM 6.72 under 21.1 (patch 9) "Canyonlands" XEmacs Lucid X-Attribution: WP Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Keith Walker writes: > Ok, a while back (couple of days ago) I posted a question about my Epson 900 > not working when attached via the USB cable. > > I found the solution to the problem. Hopefully this will help others with > Epson's that don't seem to work via the USB port. > > The Epson's must have an initialization string sent to them to wake up the > beast. This string only needs to be sent once, after plugging the printer in. > Turning off the power doesn't seem to matter, just the power cord. Anyhow, > sending the init string once per job is sufficient and harms nothing. Well done! Ok. I put this line in my rc.local and even my Epson 860 works. printf "000\033\001@EJL 1284.4\n@EJL \n" | tr 0 '\0' > /dev/ulpt0 There is only one problem left: this string is either incomplete or not correct. The proof is that after sending it to the printer the next printout is corrupted. So if you print graphics you get a bounch of random chars because of synch loss, but if you try to print a plain ASCII file you'll miss the first few characters (I experienced something like 50-60). I'm trying to figure out what is missing or what is superfluous in that init string. In the meanwhile I had a look at the Gimp Print driver and I found this procedure: void initialize_print_cmd(void) { bufpos = 0; if (isUSB) { static char hdr[] = "\000\000\000\033\001@EJL 1284.4\n@EJL \n\033@"; memcpy(printer_cmd, hdr, sizeof(hdr) - 1); /* Do NOT include the null! */ bufpos = sizeof(hdr) - 1; } } That looks a little bit different from what you mentioned. I'm going to try this version. Let's see if it changes anything. -- walter pelissero http://www.pelissero.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message