Installing legacy printer on RPI w/ USB-Parallel port adaptr

Guides written by the community, for the community, and only guides!

Installing legacy printer on RPI w/ USB-Parallel port adaptr

Postby whatshisname » Wed Aug 04, 2021 9:21 pm

I spent days on this so you won't have to. Though YMMV.

Setup:
Raspberry Pi 3.
HP Laserjet 5p (A freaking workhorse printer I didn't want to throw away.)

My RPI is headless so I had to rely on the command line. I was able to tunnel to the Raspberry Pi and use the CUPS web interface but try as I might, it wouldn't let me administer the printer. In the end, I doubt I could have installed it through the GUI interface anyway. FWIW, to tunnel to CUPS on the PI from my workstation running Arch, I used this command:

$this->bbcode_second_pass_code('', '
#ssh your_user@your_rpi -T -L 3631:localhost:631
')

The parallel port to USB adapter doesn't show up as a USB or parallel port device. On my machine, "lsusb" revealed:
$this->bbcode_second_pass_code('', '
Bus 001 Device 005: ID 050d:0002 Belkin Components IEEE-1284 Controller
')

In the end, I didn't need this information. But it did assure me the PI was seeing the device.

This is a reasonable rehash of what worked. Though understand, I hacked at this for a couple of days. The cups documentation was very helpful for some of the command line stuff.

1) Determine the list of printer drivers on your Pi. It can be a long list so whittle it down with a couple or three "greps"
$this->bbcode_second_pass_code('', '
sudo lpinfo -m
')

For my LJ5P, it was this: (Syntax for this command was important.)
$this->bbcode_second_pass_code('', '
drv:///hp/hpcups.drv/hp-laserjet_5p.ppd HP LaserJet 5p, hpcups 3.21.6
')

2) Install the printer using "lpadmin": (You can name your printer whatever you wish with the "-P" switch.)
$this->bbcode_second_pass_code('', '
sudo lpadmin -p HP-LaserJet-5p -E -v socket:localhost -m drv:/hp/hpcups.drv/hp-laserjet_5p.ppd
')

3) List the available backends and printers
$this->bbcode_second_pass_code('', '
sudo lpinfo -v
')

This is where I found:
$this->bbcode_second_pass_code('', '
direct usb://HP/LaserJet%205P
')

4) Stop cups and edit "/etc/cups/printers.conf" and replace the line for "DeviceURI". in my case, it was:
$this->bbcode_second_pass_code('', '
DeviceURI usb://HP/LaserJet%205P
')

5) Start cups with "systemctl start cups".

6) You should be able to print.

YMMV. But this is what worked for me after scouring the web and finding precious little on the subject.
whatshisname
 
Posts: 19
Joined: Sat Sep 29, 2012 5:45 pm

Return to Community Guides

Who is online

Users browsing this forum: No registered users and 4 guests