# Setting up an USB printer

## romildo

Hello.

I want to have my Epson Stylus Color 777 printer working in Gentoo. It

is connected to a USB port.  It does work with Fedora Core 1 and Windows

XP. The CPU is an AMD Athlon XP 2000. The motherboard is a SOYO KT333

Dragon Plus.

I have tried both gentoo-sources-2.4.22-r5 and

gentoo-dev-sources-2.6.1-r1 kernels. With the 2.4.22 kernel I have

loaded the modules usbcore, uhci and printer. With the 2.6.1 kernel I

have loaded the moduels usbcore uhci-hcd usblp. hotplug is not set in

both kernels.

The first step is to make direct access to the printer work. Sending

text to the printer device (ls > /dev/usb/lp0) does not work (and the

output of ls is not empty). Nothing appears in the printer.

Please, help me configure this printer.

Some more information related to the printer:

```

# escputil --raw-device /dev/usb/lp0 --status

Escputil version 4.3.25, Copyright (C) 2000-2003 Robert Krawitz

Escputil comes with ABSOLUTELY NO WARRANTY; for details type 'escputil -l'

This is free software, and you are welcome to redistribute it

under certain conditions; type 'escputil -l' for details.

                                                                                          

Read from printer timed out

Read from printer timed out

                                                                                          

# lsmod | grep -i usb

usbcore                63148   1  [printer uhci]

                                                                                          

# lsmod | grep -i print

printer                 7232   0

usbcore                63148   1  [printer uhci]

                                                                                          

# lsmod | grep -i uhci

uhci                   26684   0  (unused)

usbcore                63148   1  [printer uhci]

                                                                                          

# find /dev -name "lp*" -ls

   869    0 crw-rw----   1 root     root              Dec 31  1969 /dev/usb/lp0

   972    0 lr-xr-xr-x   1 root     root           10 Jan 18 22:32 /dev/lp0 -> printers/0

                                                                                          

# find /dev -name "print*" -ls

   970    0 drwxr-xr-x   1 root     root            0 Dec 31  1969 /dev/printers

And here are the relevant messages I get in the system log file:

                                                                                          

# grep -i usb /var/log/messages

[...]

Jan 18 22:32:30 gentoo usb.c: registered new driver usbdevfs

Jan 18 22:32:30 gentoo usb.c: registered new driver hub

Jan 18 22:32:30 gentoo uhci.c: USB Universal Host Controller Interface driver v1.1

Jan 18 22:32:30 gentoo uhci.c: USB UHCI at I/O 0xd800, IRQ 11

Jan 18 22:32:30 gentoo usb.c: new USB bus registered, assigned bus number 1

Jan 18 22:32:30 gentoo hub.c: USB hub found

Jan 18 22:32:30 gentoo uhci.c: USB UHCI at I/O 0xdc00, IRQ 10

Jan 18 22:32:30 gentoo usb.c: new USB bus registered, assigned bus number 2

Jan 18 22:32:30 gentoo hub.c: USB hub found

Jan 18 22:32:30 gentoo uhci.c: USB UHCI at I/O 0xe000, IRQ 5

Jan 18 22:32:30 gentoo usb.c: new USB bus registered, assigned bus number 3

Jan 18 22:32:30 gentoo hub.c: USB hub found

Jan 18 22:32:30 gentoo usb.c: registered new driver usblp

Jan 18 22:32:30 gentoo printer.c: v0.11: USB Printer Device Class driver

Jan 18 22:32:30 gentoo hub.c: new USB device 00:10.0-2, assigned address 2

Jan 18 22:32:30 gentoo printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto+2 vid 0x04B8 pid 0x0005

                                                                                          

# grep -i print /var/log/messages

[...]

Jan 18 22:32:30 gentoo printer.c: v0.11: USB Printer Device Class driver

Jan 18 22:32:30 gentoo printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto+2 vid 0x04B8 pid 0x0005                                                                                         
```

Regards.

Romildo

----------

## FreeFly42

Check out this page.  According to the documentation there the printer doesn't respond to the direct write commands like you are testing it with, but it will still work.  You'll need to emerge cups, foomatic, hpljs, etc.  But the site is Gentoo oriented and well written.

----------

## Minos

I just set up an Epson Stylus C84, and it's working beautifully.  I used CUPS with gimp-print.  You should set USE="cups ppds", then emerge cups and gimp-print.  Once you've started CUPS, it should be easy to add your printer via CUPS' web interface.  Just make sure it's on and connected when you start CUPS.

----------

## romildo

Printer installation now succeeds. Basically I had to unmerge and then emerge again packages like cups, foomatic, gimp-print and ghostscript. The "ppds" USE flag was not needed. I just used the foomatic-config command to build the ppd:

```
foomatic-configure -s cups -p Epson-Stylus_Color_777 -c file:/dev/usb/lp0 -n stc777 -d gimp-print-ijs
```

Then configuring the printer was easy with the web interface for cups.

At first directly copying to the printer port was not working and that is where I had got stuck. After printer configuration it does works.

Thanks for the tips.

Romildo

----------

