[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

HP Laser Jet 1000





udev under Debian Etch Linux.

A HP Laser Jet 1000 printer and driver was to be installed on a PC running Debian Etch.

The appropriate packages were installed (ghost script, foo2zjs, cups, foomatic, some foo-ppd package etc.) No samba was needed. The printer needed a bit of special attention. In the time between the printer being connected to the USB port and the desire to print a page was realized, an executable (printer firmware) had to be downloaded to the printer. The executable file, sihp1000.img, was copied form Windows XP Pro after the HP Laser Jet 1000 print driver code was installed there.

The foo2zjs installation provided a folder for such firmware but there was no content. The firmware was copied to;

     /usr/share/foo2zjs/firmware/

A script, Start-HPLJ1000-Printer.scr, was generated and placed there too. This script was executed by udev once the printer was connected. When the script was run, the printer would come to life for a few moments, then wind down. The mod of the script was changed (0744) to make it executable.

The script, Start-HPLJ1000-Printer.scr, contained the following;

     #!/bin/bash

     cat /usr/share/foo2zjs/firmware/sihp1000.img > /dev/HPLJ1000

     exit 0

In /etc/udev/rules.d a symbolic link was established;

     010_HPLJ1000 -->../HPLJ1000.rules

The rule HPLJ1000.rules contained one long line;

BUS=="usb", KERNEL=="lp[0-9]", SYSFS{product}=="hp LaserJet 1000", NAME="usb/%k", SYMLINK="HPLJ1000", RUN="/usr/share/foo2zjs/firmware/Start-HPLJ1000-Printer.scr"

The key RUN caused the firmware script to be executed at the time the printer was connected to the USB port. Using RUN+= or PROGRAM did not work.

When udev performed its task, one could see the entries /dev/HPLJ1000 and /dev/usb/lp0.

norii --- at --- look ding ca



Reply to: