General Topics :  foo2zjs - foo2hp - foo2xqx - foo2lava - foo2qpdl - foo2oak
Support for linux printer drivers
The fastest message board... ever.
 
HOW TO: Raspberry Pi Zero W
Posted by: rickrich ()
Date: September 27, 2020 11:20AM

Raspberry Pi Zero W

Hardware (about $30):
CanaKit Raspberry Pi Zero W (Wireless) with Official Case and Power Supply
USB 2.0 Micro USB Male to USB Female OTG Adapter
Kingston 16GB Micro SD card

Download:
https://www.raspberrypi.org/downloads/raspberry-pi-os/

I used Raspberry Pi OS (32-bit) Lite:
https://downloads.raspberrypi.org/raspios_lite_armhf_latest

How to Set Up a Headless Raspberry Pi, Without Ever Attaching a Monitor
https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html

I used: Headless Wi-Fi / Ethernet

After powering up your pi:

pi@pifoo1:~ $ sudo raspi-config

2. Select Interfacing Options (number 5 on the list)

3. Select P2 SSH (number 2 on the menu)

4. Select Yes.

That will make the ssh permanent.

Install HP Laserjet 1018 on Raspbian
https://www.brainbytez.nl/applications/raspberry-pi/install-hp-laserjet-1018-on-raspbian/

I used HP Laserjet P1005 and ./getweb P1005
$ ssh -l pi 192.168.1.128
pi@192.168.1.128's password: 
Linux pifoo1 5.4.51+ #1333 Mon Aug 10 16:38:02 BST 2020 armv6l
Last login: Sun Sep 27 01:17:48 2020 from 192.168.1.96

pi@pifoo1:~ $ # 1. Install pre-requisite packages:

pi@pifoo1:~ $ sudo apt-get update
pi@pifoo1:~ $ sudo apt-get install tix groff cups cups-bsd vim

pi@pifoo1:~ $ # 2. Add user pi to lpadmin group:

pi@pifoo1:~ $ sudo usermod -a -G lpadmin pi

pi@pifoo1:~ $ # 3. Download and build foo2zjs:

pi@pifoo1:~ $ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
pi@pifoo1:~ $ tar zxf foo2zjs.tar.gz
pi@pifoo1:~ $ cd foo2zjs
pi@pifoo1:~ $ make

pi@pifoo1:~ $ # 4. Get the printer firmware:

pi@pifoo1:~ $ ./getweb P1005

pi@pifoo1:~ $ # 5. Install foo2zjs and tool to download firmware to printer. Also, restart CUPS:

pi@pifoo1:~ $ sudo make install install-hotplug cups

pi@pifoo1:~ $ # 6. Plug in the HP Laserjet P1005 printer, and switch it on.

pi@pifoo1:~ $ usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Hewlett-Packard;MDL:HP LaserJet P1005;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet P1005;FWVER:20090916;

pi@pifoo1:~ $ # 7. Manually create cups printer (do not use the web interface):

pi@pifoo1:~ $ sudo lpadmin -p p1005 -v "usb://HP/LaserJet%20P1005" -E -P /usr/share/cups/model/HP-LaserJet_P1005.ppd.gz

pi@pifoo1:~ $ # 8. Set system default printer to the one we just created:

pi@pifoo1:~ $ sudo lpadmin -d p1005

pi@pifoo1:~ $ # 9. Set default page size to Letter *OR* A4:

pi@pifoo1:~ $ sudo lpoptions -o media=Letter
            -OR-
pi@pifoo1:~ $ sudo lpoptions -o media=A4

pi@pifoo1:~ $ # 10. Print testpage-ubuntu.ps:

pi@pifoo1:~ $ lp ~/foo2zjs/testpage-ubuntu.ps
request id is p1005-1 (1 file(s))

pi@pifoo1:~ $ uname -a
Linux pifoo1 5.4.51+ #1333 Mon Aug 10 16:38:02 BST 2020 armv6l GNU/Linux
pi@pifoo1:~ $

How to make an old printer a networked printer
https://medium.com/chris-opperwall/how-to-make-an-old-printer-a-networked-printer-a922250f7168

Now, if you want, you can print from other computers.

I was able to connect with this printer over OSX and Linux using the ipp://<hostname>:631/printers/<printer_name> address.

For my setup: ipp://192.168.1.128:631/printers/p1005

For IPP Client Setup Client OS and Windows:
https://www.howtoforge.com/ipp_based_print_server_cups_p3

Firefox browser https://192.168.1.128:631/printers/p1005 :



rick@quad: ~ $ system-config-printers -> p1005



rick@quad: ~ $ uname -a
Linux quad.rkkda.org 5.8.11-100.fc31.x86_64 #1 SMP Wed Sep 23 15:15:42 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

rick@quad: ~ $ lpr -P p1005 ~/testpage-cups.ps

Photo of Raspberry Pi Zero W "pifoo1" 192.168.1.128 :



Photo of HP LaserJet P1005 and Raspberry Pi Zero W "pifoo1" 192.168.1.128 :





Edited 37 time(s). Last edit at 10/10/2020 09:58AM by rickrich.

Options: ReplyQuote


Sorry, you do not have permission to post/reply in this forum.
This forum powered by Phorum.