HP10xx Hewlett-Packard LaserJet 1020 Debian Lenny (stable) english

We will use:

heh, I have installed many packages, so i might miss some packages please fix me if so… (maybe libusb, cupsys?)
So lets add squeeze resource:

deb http://debian.mirror.vu.lt/debian squeeze main
deb-src http://debian.mirror.vu.lt/debian squeeze main

to file: /etc/apt/sources.list.d/squeeze.list
then install p910nd:

apt-get update
apt-get install p910nd

and do not forget to remove squeeze from apt list 😉 using command:

rm /etc/apt/source.list.d/squeeze.list

Next we need just install drivers to our printer and launch printing daemon…
So p910nd printing daemon conf file: /etc/default/p9910nd

# Printer number, if not 0
# Additional daemon arguments, see man 8 p910nd
P910ND_OPTS="-b -f /dev/usb/lp0 0"
# my printer connects to device: /dev/usb/lp0 ;)

# Debian specific (set to 1 to enable start by default)

So lets start it:

/etc/init.d/p910nd restart

Next, Dowload firmware: sihp1020.dl extracting it:

wget http://lpic.lt/wp-content/uploads/2010/08/sihp1020.dl.tar.bz2
bunzip2 sihp1020.dl.tar.bz2
tar -xf sihp1020.dl.tar

drop firmware into yours printer:

cat sihp1020.dl > /dev/usb/lp0

As I mentioned /dev/usb/lp0 – my printer device in linux 🙂
so, 🙂 what’s next?
As i recall that’s it… Just go to http://localhost:631 ? (I appeared to be 🙂 after one of cups or cupsys is installed)

If something do not work after reboot or replugging USB printer we should copy paste script a to /usr/sbin/hplj1020 so script a:


if [ -f /tmp/busy-prn ]; then
exit 99

touch /tmp/busy-prn

sleep 2

D=$(awk '/Manufacturer/ {print $2} ' /proc/bus/usb/devices | grep -v Linux | wc -l)

if [ $D == 1 ]; then
# No daemon running
# Start daemon if printer is attached
if [ -e /dev/usb/lp0 ]; then
/etc/init.d/p910nd start
sleep 1
cat /root/sihp1020.dl > /dev/usb/lp0
if [ $D == 0 ]; then
# No Printer attached but daemon running
# Kill daemon
/etc/init.d/p910nd stop

# Kill the spare process //hid3

kill `pidof p9100d | awk '{print $2}'`

rm -f /tmp/busy-prn

now copy:

cp a /usr/sbin/hplj1020

that’s it? 😉

External link:

Leave a Reply

Your email address will not be published. Required fields are marked *