First, I thought all printers configure on CUPS as local raw printer should works for windows workstation as long as I use correct printer driver to render the printing image. The CUPS will just re-route the raw printing image received to the printer.
I have follow this rule to configure two other printers: Panasonic KX-1121 dot matrix printer and Samsung ML-1450 Laser Jet Printer. Both works flawlessly for years.
I receive a HP LaserJet 1020 printer last night and try to configure it for CUPS. The printer has only one USB port. I plug the printer to the Linux machine's USB port and CUPS detect the printer well. I then install the latest HP LaserJet 1020 printer downloaded from HP web site and configure the printer as usual. I send a test page to printer. CUPS receive the printing image and report print job completed successfully but the printer doesn't print anything. The printer doesn't feed the paper.
I thought it was printer's problem. To re-confirm the problem again, I attach the printer to my Windows Vista machine directly. It print perfectly.
I found some interesting things with HP LaserJet 1020 after Google for solutions.
It is a Host-Based Printer
As defined by HP:
The host-based software uses the computer's resources to process print commands and rasterizing data, taking advantage of the computer's memory and processing power. Host-Based printing is a cost-effective printing technology that enables printers to utilize the processing power and memory resources of the PC (or the Host). In comparison, PDL-based printers use the processor and memory resources of the printer.
It utilize the power and resources of PC to render the printing images. It print much faster than those PDL printer since newer computers process at much faster speeds than most PDL printers processors.
The disadvantages of Host-Based Printers is it no longer accept ASCII text directly from computer as all print images are generated by host operating system's print engine.
This however, is a good news as it reduce the manufacturing cost of the printer. It also doesn't seems to be a problem for my RAW printer for CUPS service.
It always requires firmware download else it won't print
The printer is one of the cost-reduced HP printers that requires a firmware download before it will operate. It means every time you switch on the printer, you need to send the firmware image to printer first before you start feeding the printing images. The HP LJ1020 doesn't has a flash ROM to persist the firmware permanently. This is the main reason why the printer works well when attach to windows vista machine but not Linux machine. The HP LJ1010 printer drivers for windows OS take care of the firmware uploading well.
You may only get the N series of HP 1000 printers that has flash ROM equipped for firmware. For example, HP LaserJet 1020n printer.
I only need foo2zjs to upload the firmware to printer when the HP LJ1020 first attach to my Linux box.
- Logon to root account.
- Download foo2zjs tarball:
$ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
- Untar it:
$ tar zxf foo2zjs.tar.gz
- Configure foo2zjs:
$ cd foo2zjs
- Download HP LaserJet 1020 firmware file:
$ ./getweb 1020
- Install driver, foomatic XML files, and extra files:
$ make install
- Configure hotplug
$ make install-hotplug
- Configure CUPS:
$ make cups
- You may need to switch off and on the HP LJ 1020 printer to activate hot plug upload the firmware.
- To check if firmware uploaded:
$ usb_printerid /dev/usb/lp1
MFG:Hewlett-Packard;MDL:HP LaserJet 1020;CMD:ACL;CLS:PRINTER;DES:HP LaserJet 1020;FWVER:20050309;
If you see a string "FWVER:xxxxxxx". it means the firmware has uploaded successfully.
You may now start feeding the raw printing images from your windows workstation to HP Laser Jet 1020.