# HP LaserJet 1020

## swierke

I have a HP laserjet 1020 and I'm trying to get this printer working. I tried to find more information on google, http://www.linuxprinting.org/ and http://hpinkjet.sourceforge.net/ but I didn't find anything about this printer. I tried to use it as a laserjet 1010, 1012 or 1015 but the printer just sit there, doing nothing. The device /dev/usb/lp0 is there and dmesg gives me this:

```
 usb 1-1: new full speed USB device using uhci_hcd and address 6

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x03F0 pid 0x2B17

 
```

[/code]

Does anybody knows how to get this printer working?

thx,

swier

----------

## CodAv

It's been a while since you posted this, but I've found a solution which may help you at http://support.ideainformatica.com/hplj1020/

Here's the "Gentoo translation"  :Wink: 

First, I think you tried to get it working with gimp-print / foomatic, you have hotplug installed, and your CUPSd is configured and works, otherwise, see the tutorials in the Tips&Tricks section or use the search function.

Now do the following steps (# as root, $ as normal user):

```
# emerge foo2zjs

$ wget http://support.ideainformatica.com/hplj1020/foo2zjs.tar.gz

$ tar xzpf foo2zjs.tar.gz

$ cd foo2zjs

$ make

# make install

# make install-hotplug
```

Then, plug your printer, restart cupsd, and use your favorite CUPS interface to add the printer, which is now available in the HP printer list.

That's all, it worked for me, so it should do for anyone else. Hopefully, the package maintainer of foo2zjs will update his package with these drivers.

----------

## gifkins

Good to find this post, very helpful

I did everything you said.  Here is what I get in /etc/cups/printers.conf

 *Quote:*   

> <DefaultPrinter hp1020>
> 
> Info
> 
> Location
> ...

 

however when i tried to print a test page from CUPS, nothing came out, printer is completely silent. The job is 'aborted' after a few seconds and

if I click 'restart' button/link next to that aborted job, I got:

 *Quote:*   

> Error:
> 
>     client-error-not-possible

 

The dmesg showed:

 *Quote:*   

> usb 1-1: new high speed USB device using ehci_hcd and address 6
> 
> drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x03F0 pid 0x2B17
> 
> drivers/usb/class/usblp.c: usblp0: failed reading printer status

 

It appears the last line is where the problem is. But I just can't figure out why.

Also firmware seems loaded okay.

usb_printerid /dev/usb/lp0 shows

 *Quote:*   

> GET_DEVICE_ID string:
> 
> MFG:Hewlett-Packard;MDL:HP LaserJet 1020;CMD:ACL;CLS:PRINTER;DES:HP LaserJet 1020;FWVER:20041129;

 

Thanks for any help.

----------

## CodAv

Hm. About a week ago, my printer worked fine, but now I've getting the same error. Probbly some update broke the support again... damn. But doing the "make install-hotplug" command again solved the problem. Seems hotplug's paths have changed in the recent past.

----------

## ixion

cheers for this thread!

I finally got the HP1020 installed by following these directions, but when printing the test page, it come out all garbled and blurry. Is there something I've missed possibly?

----------

## ixion

anyone who got this working, would you mind sharing your USE variables, and related foomatic packages installed. I have hpijs installed as well as gimp-print. Could those be interfering?

----------

## ixion

I re-ran 'make install-hotplug', but that didn't solve it for me. I still have this in dmesg:

```

usb 1-2: usb timed out on ep0in

drivers/usb/class/usblp.c: usblp0: failed reading printer status

```

and the printer still prints blurred.

Edit: Enabled Loadable Module support in kernel, rebooted, re-ran make, etc, restarted CUPS, reinstalled printer, nogo.

----------

## CodAv

That's weird. I've either got my printer to work, or not, but I never had any blurry output.  Referring to your PN, I have no special kernel configuration. The only additional USE flags I added for CUPS were cups, foomaticdb and ppds. You should also have the flag usb, but this will probably already be the case.

Please check if the following packages are installed and configured:

- cups (core printing system)

- foomatic (driver repository)

- foo2zjs (foomatic to ZJScript translator)

- hotplug (to support hot plugging)

- coldplug (to support cold plugging)

- psutils (needed by CUPS to convert documents)

If you're not sure about one of those packages, try to re-emerge it, this solved my latest problem.

----------

## ixion

Thank you for your reply!

I've done as you suggested with the USE flags, and emerging the above packages, but still same issue, printing blurred. The printer prints fine in Windows. I added coldplug to the runlevel default, and it reports the firmware is already loaded on the printer.

redoing 'make install && make install-hotplug' didn't solve this, either.

do you think that one of my already installed gimp-print, hpijs, foomatic-* packages might be conflicting?

edit: followed the below tutorial to no avail:

http://support.ideainformatica.com/hplj1020/

----------

## ixion

Just FYI, found this article:

http://support.ideainformatica.com/hplj1020/

 *Quote:*   

> 
> 
> DISTRIBUTIONS NOTES
> 
> NOTE: It seems that printing with a page format other that A4 causes the printer to print blur.
> ...

 

I switched to A4, and it seems to print well. It does lock up very easily and requires a reboot, though, but it's doable for now.

Does anyone think there's a chance more official drivers may end up in hpijs, or maybe foo2zjs drivers will get better? If so, then I will end up keeping this printer, but if not, it's getting sold and time to move onto something more stable with Linux. What do you guys think?

----------

## oddjobz

Hi,

For what it's worth I'm in the same position.

The printer works fine .. for the first print. Then the organge and green light flash alternately and dmesg says;

 [kernel] drivers/usb/class/usblp.c: usblp0: error -110 reading printer status

And the next print just site in the queue ..

Rebooting the printer and restarting the job seems to be the only "cure" ..

Something is going badly wrong with the driver / generic setup , I don't think I'm doing anything wrong according to the docs ...

If anyone's gotten past this, live to hear!

Incidentally, upgrading from 2.6.9 to 2.6.12 got rid of extra "error on pin 40" USB messages, howeber the remaining issue is still a killer ...

(!)

----------

## genstef

I updated the foo2zjs ebuild with the patch for hplj1020 and a new loading for udev:

http://dev.gentoo.org/~genstef/files/overlay/foo2zjs.tar

Please test and tell me if it is working.

Be sure to remove the hotplug script: /etc/hotplug/usb/hplj*

----------

## thebigjc

I posted a fix to the blurry problem on letter paper here:

https://forums.gentoo.org/viewtopic-t-378173.html

----------

## nunogt

Just emailed HP about this lack of drivers. HPLIP sourceforge page lists almost every printer model EXCEPT this one, the one I bought. Damn it. So, unless HP officially supports this printer under linux (and fast) I'm returning it to the vendor. I don't really consider the mentioned solution efficient, I'd call it a hack, and honestly I need a reliable printer.

----------

## genstef

The driver works pretty well here for me. I do not understand your rant. Just emerge the latest version and be happy.

----------

## CodAv

After an upgrade to udev-084, the firmware upload is broken again. I'll try to fix this issue when I've got some time, and in the meantime I upload the firmware file manually by executing

```
# cat /lib/firmware/sihp1020.dl > /dev/usb/lp0
```

as root after switching the printer on.

----------

## CodAv

Ok, fixed it. Simply the firmware upload script "/sbin/foo2zjs-loadfw" didn't exist anymore. I created it with the following content:

```
#!/bin/sh

cat /lib/firmware/sihp${1}.dl > ${DEVNAME}
```

That's all, now my printer works again. But make sure the file '/etc/udev/rules.d/58-foo2zjs.rules' exists on your system, and contains the following lines:

```
BUS=="usb", KERNEL=="lp[0-9]*", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="0517", RUN+="/sbin/foo2zjs-loadfw 1000"

BUS=="usb", KERNEL=="lp[0-9]*", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="1317", RUN+="/sbin/foo2zjs-loadfw 1005"

BUS=="usb", KERNEL=="lp[0-9]*", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="2b17", RUN+="/sbin/foo2zjs-loadfw 1020"
```

----------

## ugluk

the info on these pages is somewhat misleading, this is what worked for me

```

su

cd

emerge cups

emerge foomatic

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

tar xvf foo2zjs.tar.gz

cd foo2zjs

./getweb 1020

make

make install

<start cupsd and configure>

cat /root/foo2zjs/sihp1020.dl >/dev/usb/lp0 # add this to local.start to forego hotplugging

```

all works! (with A4 paper) on amd64!

Suppose an ebuild could be made? How to become a developer?

----------

## jleejj

Okay, so here's a solution if nothing else has worked for you.  I bought an HP1020 and had it working within an hour of getting home.  You can still find my positive post somewhere on the forum.  Less than a week later it stopped working after an emerge, and 3 months of occasional attempts at fixing it were unsuccessful.  I tried the official package and I tried the foo2zjs package in portage.  Neither worked.  The kernel would see the device, I could see /dev/usb/lp0, the log would record loading the firmware .. but CUPS couldn't see the device,  lpinfo -v  didn't list a USB device, and the log would get messages like this:

```
drivers/usb/class/usblp.c: usblp0: failed reading printer status 
```

But sometimes with an error 110 or something like that as well.  Finally, I read on one of the CUPS sites that the firmware in the official package might be bad.  I pulled the firmware from the driver installed in my Windows XP work laptop (the driver package from HP) and that solved it!

Solution:

So, here's my strategy for solving this.  First, follow the steps of the post directly above this one.  The package from the foo2zjs web site worked for me. The package from Gentoo did not.  YMMV.  This has the added advantage that your firmware file won't get overwritten by an emerge accidentally.  Don't forget this step after the install:

```
make install-hotplug
```

(It's missing in the instructions above.)  Now, download the official driver from HP for the 1020. The direct link is here for me, but you can browse around and find it on your own if this doesn't work or you have a slightly different model:

http://h10025.www1.hp.com/ewfrf/wc/softwareList?os=228&lc=en&cc=us&dlc=en&product=439320&lang=en

Unpack the driver.  You can do this in Wine if you don't have a Windows machine around:

```
wine ./lj1020-1022-HB-pd-win2kxp-en.exe
```

Now look in the install directory for the following file:  hp1020.img  (Once again, pick the correct model firmware as needed.) This the printer firmware file.  It is typically found here:

```
C:\Program Files\Hewlett-Packard\LaserJet 1020-1022 Drivers
```

Obviously, if you unpacked this in Wine you should be looking in ~/.wine/drive_c for this path.  While you're there, compare that file to the 'official' one installed by the foo2zjs:

```
ls -l hp1020.img /usr/share/foo2zjs/firmware/sihp1020.dl
```

I saw this:

```
-rw-r--r--  1 root root 128820 Jan 25 13:01 sihp1020.dl

-rw-r--r--  1 root root 126151 Jan 22 17:10 /usr/share/foo2zjs/firmware/sihp1020.dl
```

I note that now there is yet another firmware available, at least in my unpacking just now by wine (the sizes are slightly different).  Anyway, the important point is that the foo2zjs package pulls in a firmware of about 126k and the package from HP was about 128k.  So, simply overwrite your recently installed firmware from foo2zjs with the one you just unpacked:

```
cp hp1020.img /usr/share/foo2zjs/firmware/sihp1020.dl
```

You might want to back-up the old one first.  Anyway, from this point I just restarted CUPS, turned on my printer, went to http://localhost:631/, and had my printer working and running off a test page in about 5 clicks.

Hope this helps.

----------

## musikaras

jleejj, did you use the hplip package or are you printing directly to USB?

----------

## jleejj

I'm printing directly.  I tried both methods, and the hplip system didn't help any.  I would expect that the real problem was the bad ROM though, as it seems that people have got this to work either way.

----------

