I have a headless RaspberryPi Zero W that I wish to use as a server for remote printing so my neighbours and myself can have a common printer. The printer unfortunately is an HP LaserJet 1020 - the one my neighbour has happily given to me. But setting it up as a remote printer has been a horrible experience for me.

I’ll write down a few of the commands I have tried to get it to work.

First I made sure that the laptop is connected to the laptop with the command :

lsusb

When I could see the HP printer I proceeded with:

sudo apt install cups hplips printer-driver-foo2zjs printer-driver-foo2zjs-common printer-driver-foo2zjs

From my laptop browser, I went to <my.ipv4.address>:631 and added the HP printer. Selected the driver. Checked the Shared Printer option.

Now, I rebooted the pi, re connected the printer, and tried to print something via my Linux Mint laptop. no luck

Then, I read around and found that I need to run the command:

sudo hp-setup

So, I ssh’ed back into the pi and tried to run this command and the entire pi crashed.

Has anyone managed to get this darn machine working nicely?

We’re all Linux users, so I don’t need to install samba and all that.

    • Maroon@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      23 days ago

      Using HPlips, I got it to work on one laptop. It requires the use of a GUi and very temperamental for some reason. I can only give print commands from the HP printing center software where I need to click and drag files into it to get it to print.

      It is very inconvenient.

  • lemmyreader@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    23 days ago

    This person blogged about it and offers two ways of making it work https://www.dongdongbh.tech/setup-hp-1020-priter-on-linux The second method doesn’t need a GUI it seems, and for the first method you could use VNC, or ssh -X, to have the pi’s desktop on your computer for the hplip GUI.

    The openprinting page has another thing to say about it : https://openprinting.org/printer/HP/HP-LaserJet_1020

    
    The firmware of the printer must be uploaded after turning it on. You can use a hotplug/udev script which comes with foo2zjs, or do it manually: "cat /usr/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/lp0".
    
  • Dantheta@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    23 days ago

    I had one of these about 10 years ago. The Linux device manager will be able to push the firmware file automatically provided it’s in the right directory on the filesystem. Check /var/log/syslog and dmesg when you power up or plug the printer in. The firmware should go in /lib/firmware/hp, file name sihp1020.dl.