HOWTO_HP_LaserJet_P1006
Contents |
About
This HOWTO could help to power up printers in Gentoo that supposed to be supported by driver foo2xqx
General system settings
Packages
net-print/hplip have to be build with ppds flag and net-print/foo2zjs with foomaticdb support. Put in FOO2ZJS_DEVICES devices which you are going to use.
| Code: Emerging packages |
# echo "net-print/foo2zjs foomaticdb usb cups" >> /etc/portage/package.use # echo 'FOO2ZJS_DEVICES="hpp1006"' >> /etc/make.conf # echo "net-print/hplip ppds" >> /etc/portage/package.use # emerge -av hplip foo2zjs |
Emerge net-print/cups package if it have not been emerged yet.
| Code: Emerging packages |
# echo "net-print/cups ppds" >> /etc/portage/package.use # emerge -av cups |
Hacking packages
At present (08 APR 2008) your HP LaserJet P1006 printer wouldn't work just out of the box in Gentoo. Some simple patches are needed to performed.
Patching foo2zjs package
Open file /sbin/foo2zjs-loadfw in your favorite editor and look at this part of file
| File: /sbin/foo2zjs-loadfw |
...
#
# Figure out the model number from the name of this script
#
case "$1" in
P1006)
MODEL="P1006"
MODELNAME="HP LaserJet P1006"
;;
1000)
MODEL=1000
MODELNAME="hp LaserJet $MODEL"
;;
1005)
MODEL=1005
MODELNAME="hp LaserJet $MODEL"
;;
1018)
MODEL=1018
MODELNAME="HP LaserJet $MODEL"
;;
1020)
MODEL=1020
MODELNAME="HP LaserJet $MODEL"
;;
*)
log "Only HP LaserJet 1000, 1005, 1018 and 1020 are supported"
log "You need to supply one of these on the cmdline: $0 10**"
exit
;;
esac
...
|
Just add case for your model in this part. If needed model of printer is presented here skip this part. I have put here section for P1006 model. MODELNAME here is the full printer name as it give usb_printers utility
| Code: Looking for printer name |
noname linux # usb_printerid /dev/usb/lp0 GET_DEVICE_ID string: MFG:Hewlett-Packard;MDL:HP LaserJet P1006;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet P1006; |
Model name is used for locating firmware file. So if you fw file is /lib/firmware/sihpP1006.dl put in MODEL var string P1006
Finaly checking up modified script.
| Code: Loading firmware |
noname linux # /sbin/foo2zjs-loadfw P1006 /dev/usb/lp0 MFG:Hewlett-Packard;MDL:HP LaserJet P1006;CMD:ACL;CLS:PRINTER;DES:HP LaserJet P1006; /sbin/foo2zjs-loadfw: loading HP LaserJet P1006 firmware /lib/firmware/sihpP1006.dl to /dev/usb/lp0 ... /sbin/foo2zjs-loadfw: ... download successful. noname linux # usb_printerid /dev/usb/lp0 GET_DEVICE_ID string: MFG:Hewlett-Packard;MDL:HP LaserJet P1006;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet P1006;FWVER:20070910; noname linux # |
String FWVER:20070910; in usb_printerid output show us success of loading firmware.
Updating udev rules
Open file /etc/udev/rules.d/11-hplj10xx.rules and add string type of for your printer.
| File: /etc/udev/rules.d/11-hplj10xx.rules |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \
ATTRS{idProduct}=="3e17", RUN+="/sbin/foo2zjs-loadfw P1006 $tempnode" |
Product ID one can find in lsusb outout
| Code: Determine product ID |
noname linux # lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 024: ID 03f0:3e17 Hewlett-Packard
Bus 001 Device 002: ID 0458:0036 KYE Systems Corp. (Mouse Systems)
Bus 001 Device 001: ID 0000:0000 |
Here 3e17 is the product ID of my HP P1006 printer. Turn off and again turn on printer and check output of usb_printerid command. If string like FWVER:20070910 is present then everything is ok.
Whats next ?
Now shamanism is gone and you can setup printer in usual way by means of hp-setup utility from package net-print/hplip. Just run it and follow instructions.
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and list their apartments, townhouses and units.
