Saturday, January 15, 2011

Getting an HP LaserJet 1018 to work under Ubuntu Server

I just rebuilt my old Slackware 11 machine into a shiny, new Ubuntu Server 10.10 (maverick) machine.  Wireless printing was the most important function of my old server, so I had to get it working on the new server. 

The LaserJet 1018 uses the foo2zjs driver, which works great when installed from the repos (I believe it is part of the default installation so there is no new package to install), however the 1018 requires the computer to provide the firmware.  Here is how to do that:

First, get the firmware on your machine.  Run:

   wget http://foo2zjs.rkkda.com/firmware/sihp1018.tar.gz

Then unpack it, and run a utility to convert the image to a firmware file:

   tar zxf sihp1018.tar.gz
   arm2hpdl sihp1018.img  > sihp1018.dl

Copy it to your /usr directory for safe keeping:
  
   sudo cp sihp1018.dl /usr/share/foo2zjs/firmware/

Run the following to move the firmware to the printer:

   cat sihp1018.dl > /dev/usb/lp0

That's it, you should be able to print!  Of course, your printer will only hold on to the firmware as long as the printer is powered up; when the printer loses power, it will lose the firmware as well.  You don't want to have to run this command every time; instead you should be pushing the task off onto udev by creating a new rule!  Cd into /etc/udev/rules.d, create a new file called 80-printing.rules, and put the following inside:

   ACTION=="add", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="4117", RUN+="cat /usr/share/foo2zjs/firmware/sihp1018.dl > /dev/usb/lp0"

Save and close the file, then restart udev by running:

   sudo service udev restart

And you should be good to go!  A big shout-out goes out to the folks on this Ubuntu Forums thread, who filled in the gaps of my knowledge.  :)

1 comment:

  1. new adress of sihp1018.tar.gz file :
    https://github.com/koenkooi/foo2zjs

    ReplyDelete