照著鳥哥網站的介紹。
安裝一台usb的印表機
[root@linux ~]# mkdir -p /dev/usb
[root@linux ~]# mknod /dev/usb/lp0 c 180 0
[root@linux ~]# chown root:lp /dev/usb/lp0
[root@linux ~]# chmod 660 /dev/usb/lp0
[root@linux ~]# ls -l /dev/usb/lp0
crw-rw---- 1 root lp 180, 0 Nov 7 16:03 /dev/usb/lp0
[root@linux ~]# echo "testing" > /dev/usb/lp0
echo "testing" > /dev/usb/lp0
↑↑↑
這段的意思是testing對吧?
但我的印表機依然毫無反應
後來想是不是驅動的關係就繼續探討下去 安裝了cups來設定印表機
當我下達了
lpadmin -p EPSON -v /dev/usb/lp0 -m /usr/share/cups/model/stp-escp2-1290.5.0.ppd -E
出現此錯誤訊息
lpadmin: File device URIs have been disabled! To enable, see the FileDevice directive in "/etc/cups/cupsd.conf".
可是我不知要怎設定cupsd.conf。
可以確定的是cups已經啟動了,網頁也能連上。
到error.log裡看是下行的錯誤訊息
CUPS-Add-Modify-Printer: Unauthorized
可以確定usb裝置是有被捉到的,如下
modinfo ehci_hcd
filename: /lib/modules/2.6.16-2-686/kernel/drivers/usb/host/ehci-hcd.ko
license: GPL
author: David Brownell
description: 10 Dec 2004 USB 2.0 'Enhanced' Host Controller (EHCI) Driver
alias: pci:v*d*sv*sd*bc0Csc03i20*
depends: usbcore
vermagic: 2.6.16-2-686 686 gcc-4.0
parm: log2_irq_thresh:log2 IRQ latency, 1-64 microframes (int)
parm: park:park setting; 1-3 back-to-back async packets (uint)
modinfo uhci_hcd
filename: /lib/modules/2.6.16-2-686/kernel/drivers/usb/host/uhci-hcd.ko
license: GPL
description: USB Universal Host Controller Interface driver
author: Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber, Alan Stern
alias: pci:v*d*sv*sd*bc0Csc03i00*
depends: usbcore
vermagic: 2.6.16-2-686 686 gcc-4.0
parm: debug:Debug level (int)
也確定印表機跟電腦連接應是ok的
: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04b8 ProdID=0005 Rev= 1.00
S: Manufacturer=EPSON
S: Product=USB Printer
S: SerialNumber=W19190405060223330
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
但...就是驅動不了
有人可以救救我嗎?