Install HP Laserjet 1018 on Raspbian

I managed to successfully install the HP Laserjet 1018 printer on a Raspberry Pi 4 with Raspbian Buster by following the instructions below. It makes use of the foo2zjs linux printer driver.

These instructions are based on andrum99’s blog-post which is available on the Internet Archive.

1. Install pre-requisite packages:

sudo apt-get update
sudo apt-get install tix groff cups

2. Add user pi to lpadmin group:

sudo usermod -a -G lpadmin pi

3. Download and build foo2zjs:

wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
tar zxf foo2zjs.tar.gz
cd foo2zjs
make

4. Get the printer firmware:

./getweb 1018

5. Install foo2zjs and tool to download firmware to printer. Also, restart CUPS:

sudo make install install-hotplug cups

6. Plug in the HP Laserjet 1018 printer, and switch it on.
Orange light should flash and the printer motor will run for a few seconds, indicating firmware has been downloaded successfully.
Verify it has with:

usb_printerid /dev/usb/lp0

The output of this command should include FWVER:20051028 or similar.
If no FWVER shown, firmware download has not worked.

7. Manually create cups printer (do not use the web interface):

sudo lpadmin -p hp1018 -v "usb://HP/LaserJet%201018" -E -P /usr/share/cups/model/HP-LaserJet_1018.ppd.gz

8. Set system default printer to the one we just created:

sudo lpadmin -d "hp1018"

9. Set default page size to A4:

sudo lpoptions -o media=A4
(use media=Letter to change back to letter if required)

10. Create a text file with the “Text Editor” application and use File -> Print… to print it.

The selected hp1018 printer should print the text file, possibly with a delay of up to 5 seconds.

5 comments

  1. panos says:

    Super! It works

  2. guolaing says:

    works for HP LaserJet 1020 too, thanks

  3. David says:

    Thank you!

  4. pera says:

    I made a change to HP_laserjet_P1005 as below and got it working.
    Thanks for a week’s work finally finished.

  5. rickrich1 says:

    I am the author of foo2zjs. I also used HP Laserjet P1005. No problems. Did it in less than 2 hours even though it was my first Pi! Here is what I had to do:

    http://foo2zjs.rkkda.com/forum/read.php?42,4426

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.