View previous topic :: View next topic |
Author |
Message |
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Mon Feb 19, 2007 10:33 pm Post subject: cups doesn't recognize USB printer [SOLVED] |
|
|
Hello,
I'm trying to add my USB-printer with the webinterface of cups, but I can't choose USB as device for my printer.
But lsusb shows a connected printer:
Code: |
router ~ # lsusb
Bus 005 Device 002: ID 04f9:0027 Brother Industries, Ltd
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
|
Also a device for this printer exists:
Code: |
router ~ # ls -al /dev/usb/lp0
crw-rw---- 1 root lp 180, 0 Feb 19 23:13 /dev/usb/lp0
|
I emerged cups with following useflags:
Code: |
router ~ # emerge -pv cups
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] net-print/cups-1.2.6 USE="dbus jpeg nls pam png ppds samba ssl -X -php -slp -tiff" 0 kB
|
Also USB-printer support is compiled in the actual used kernel:
Code: |
router ~ # uname -r
2.6.19-gentoo-r5
|
This is the used cupsd.conf:
Code: |
#
# "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $"
#
# Sample configuration file for the Common UNIX Printing System (CUPS)
# scheduler. See "man cupsd.conf" for a complete description of this
# file.
#
# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel debug
# Administrator user group...
SystemGroup lpadmin
# Only listen for connections from the local machine.
Listen *:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Restrict access to the server...
<Location />
Order allow,deny
Allow localhost
Allow 192.168.*
</Location>
# Restrict access to the admin pages...
<Location /admin>
Encryption Required
Order allow,deny
Allow localhost
Allow 192.168.0.1
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
Allow localhost
</Location>
# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an adminstrator...
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Su\
bscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend\
-Current-Job Resume-Job CUPS-Move-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an adminstrator to authenticate...
<Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-Af\
ter-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shut\
down-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Cl\
ass CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
AuthType Basic
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
#
# End of "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $".
#
|
Maybe I should say this is a fresh installation.
I've searched this forum for any useful topics, but didn't found any...
Any help is appreciated...
Sorry for my bad englisch
Last edited by machinesoul on Tue Feb 20, 2007 5:04 pm; edited 1 time in total |
|
Back to top |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
|
Back to top |
|
|
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Tue Feb 20, 2007 7:24 am Post subject: |
|
|
I hadn't installed gimp-print, but I emerged it now.
It still doesn't let me choose USB as device for the printer. |
|
Back to top |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Tue Feb 20, 2007 7:39 am Post subject: |
|
|
machinesoul wrote: | I hadn't installed gimp-print, but I emerged it now.
It still doesn't let me choose USB as device for the printer. |
you may want to restart cups after you emerge gimp-print
edit: didn't close tag _________________ He who calls for full employment calls for war!
Last edited by sugar on Tue Feb 20, 2007 7:42 am; edited 1 time in total |
|
Back to top |
|
|
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Tue Feb 20, 2007 7:40 am Post subject: |
|
|
Yes, I have restarted cupsd |
|
Back to top |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
|
Back to top |
|
|
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Tue Feb 20, 2007 7:50 am Post subject: |
|
|
Quote: | Also USB-printer support is compiled in the actual used kernel: |
Yes it is.
Code: |
CONFIG_USB_PRINTER=y
|
|
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Feb 20, 2007 8:55 am Post subject: |
|
|
can you post what is shown when you try to add a new printer to the cups webadmin Add printer page.
Sinc you have you should get a drop down list for device that includes or something similar.
check whether udev has created /dev/usb/lp0 for you.
Code: |
bash-3.2#ls /dev/usb*
/dev/usbdev1.1_ep00 /dev/usbdev2.1_ep81 /dev/usbdev3.2_ep00
/dev/usbdev1.1_ep81 /dev/usbdev3.1_ep00 /dev/usbdev3.2_ep01
/dev/usbdev2.1_ep00 /dev/usbdev3.1_ep81 /dev/usbdev3.2_ep82
/dev/usb:
lp0
|
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
kernelOfTruth Watchman
Joined: 20 Dec 2005 Posts: 6111 Location: Vienna, Austria; Germany; hello world :)
|
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Feb 20, 2007 12:23 pm Post subject: |
|
|
machinesoul wrote: | I hadn't installed gimp-print, but I emerged it now.
It still doesn't let me choose USB as device for the printer. |
the actual printer drivers is the next step. Not having a driver should not prevent you selecting the usb device. Even if you dont have the correct driver you should be able to install the printer in cups with a _wrong_ driver. Just to clarify the difference.
You could also download the TurboPrint demo drivers but you still need to solve the device issue independantly.
HTH.
PS one thing I just noted, I was printing an image and tried to add a new printer . When I came to the device list the usb was not present. I waited until the printing was finished , tryed to select the device again and there it was.
It seems it was not listed while it was busy. Is it possible that device is somehow busy (lsusb, usbview or other prog) and therefore not showing up?
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Tue Feb 20, 2007 2:06 pm Post subject: |
|
|
Hello,
thanks for the replies.
From kernelOfTruth: Quote: |
enable some more options for cups, just in case, these are mine:
Quote:
net-print/cups-1.2.7 USE="X dbus jpeg nls pam png ppds ssl tiff"
don't forget "etc-update" after an update & "/etc/init.d/cupsd restart" !
|
I will not enable the X useflag of this ebuild, because this system doesn't has any Monitor nor I want to waste hdd-space for an useless X-server. And tiff only adds support for tiff images according to the gentoo printing guide:
Code: |
http://www.gentoo.org/doc/en/printing-howto.xml#doc_chap3
|
But after reading this guide _again_ I found this interresting:
Code: |
To enable USB printing, you need USB support and USB printer support.
Code Listing 2.2: USB Port Printer Configuration
Device Drivers -->
USB Support -->
<*> Support for Host-side USB
(...)
--- USB Host Controller Drivers
(Select the HCD that your system uses. If you do not know which one
to select, run "lspci -v | grep HCI" from another terminal)
<*> EHCI HCD (USB 2.0) support ( or )
<*> OHCI HCD support ( or )
<*> UHCI HCD (most Intel and VIA) support
(...)
<*> USB Printer support
|
I have compiled EHCI HCD, OHCI HCD and UHCI HCD into my kernel, since I never bevore had any problems with this configuration. But this printing guide suggests to install only one driver.
As far as I know an USB 2.0 - Controller consists of two Controller on one chip... one USB 2.0 and one USB 1.1.
Also mounting of an USB-Stick is working, so I guess USB is working
But I will compile a kernel only with one of the USB Controller Drivers.
From Gentree:
Quote: |
can you post what is shown when you try to add a new printer to the cups webadmin Add printer page.
|
I will post this when I'm at home again.
But thanks so far.
I don't think another program is blocking this device, since i don't have started anythink that needs usb support. |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Tue Feb 20, 2007 3:01 pm Post subject: |
|
|
EHCI or OHCI or UHCI doesn't sound reasonable. If your motherboard is capable of EHCI (USB 2.0) then it will also be capable of either OHCI or UHCI. Compiling all three into your kernel should make no difference as the kernel will chose the driver according to what it finds on its PCI scan.
On this machine, Intel CPU and chipsets, USB printing works and Code: | CONFIG_USB_EHCI_HCD=y
CONFIG_USB_UHCI_HCD=y |
Another thing you might try is switching on your USB printer, making sure it is connected and running Code: | # lpinfo -v
network socket
network beh
direct usb://EPSON/Stylus%20D88
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct canon:/dev/lp0
direct epson:/dev/lp0
direct scsi
serial serial:/dev/ttyS0?baud=115200 | You can also look in /var/log/messages and, around the time you switched it on or connected it, you should see something like Code: | Feb 20 14:38:48 usb 3-1: new full speed USB device using uhci_hcd and address 2
Feb 20 14:38:49 usb 3-1: configuration #1 chosen from 1 choice
Feb 20 14:38:49 drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0005 | but this should be OK as you have the /dev/usb/lp0 device which shows that all the necessary settings in your kernel are there.
It may be that you are missing a library, cups depends on dev-libs/libusb, have you got it?
You can also try Code: | $ /usr/libexec/cups/backend/usb
direct usb://EPSON/Stylus%20D88 "EPSON Stylus D88" "EPSON Stylus D88 USB #1" "MFG:EPSON;CMD:ESCPL2,BDC,D4;MDL:Stylus D88;CLS:PRINTER;DES:EPSON Stylus D88;" | which should read all the information from the connected printer. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
alienjon Veteran
Joined: 09 Feb 2005 Posts: 1726
|
Posted: Tue Feb 20, 2007 3:11 pm Post subject: |
|
|
I can say from experience that having all three compiled shouldn't pose any problems as I currently have that setup in my computer and my printer works fine. They're probably just saying that because chances are that one day something will be incompatible and it's safer to say to just use the newest one (as the others would then be superfluous) I know this is a dumb question, but what it is your printer and have you checked to see if cups itself supports it?
(Also, side question: Wynn, what the hell is that a picture of?) |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Tue Feb 20, 2007 3:17 pm Post subject: |
|
|
alienjon wrote: | but what it is your printer and have you checked to see if cups itself supports it? | If CUPS can see the printer through the USB port, then it should appear in the dropdown device list on the second page of "Add printer". This seems to be the sticking point. Running /usr/libexec/cups/backend/usb should give further evidence one way or the other.
alienjon wrote: | Also, side question: Wynn, what the hell is that a picture of? | but the answer is in the ``signature''! If you watch Elephants Dream â you can download it from orange.blender.org â in the scene where Emo and Proog are going across the bridge, there are a number of mechanical birds swooping around. These are the "jorma" that they used in the film but, in the production materials, there is another version which ... well, I'm sure you can finish the story. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Tue Feb 20, 2007 4:48 pm Post subject: |
|
|
Well.... shame on me....
looks like cups always sends me the wrong url for the admin-pages... something like:
Code: |
https://localhost:631/admin?OP=add-printer
|
this loads a cups page, sure... but not from my router...
so the problem changes...
How do I tell cups to send a valid url for its admin-pages? |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Tue Feb 20, 2007 5:04 pm Post subject: |
|
|
machinesoul wrote: | looks like cups always sends me the wrong url for the admin-pages... something like:
Code: |
https://localhost:631/admin?OP=add-printer
|
this loads a cups page, sure... but not from my router...
so the problem changes...
How do I tell cups to send a valid url for its admin-pages? | From what you say it sounds as if you have CUPS installed on your router (?)
Another thing, if you are doing remote admin using https you are going to need to create a certificate ... er ... perhaps, it seems to depend on whether gnutls is being used or not and it appears to be used. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
machinesoul n00b
Joined: 25 Jan 2005 Posts: 17
|
Posted: Tue Feb 20, 2007 5:13 pm Post subject: |
|
|
I solved it with the help of this topic:
https://forums.gentoo.org/viewtopic-t-519300-highlight-cupsd+ssl.html
the cups-server on my router (which is my cups-server for my home-network) tried do send a invalid url... which i corrected...
next problem was the one described in the topic i wrote above...
So thanks to everyone who helped me
[SOLVED] |
|
Back to top |
|
|
|