!DOCTYPE html>
Update on 10/22/2023.
I wanted to send print jobs wirelessly to my printer from my Windows PC, Linux Desktop PC (x86), Raspberry Pi (Arm), Apple Laptop, iPad, and iPhone, and I did not want to install printer drivers in each of these devices. To accomplish this, I decided to use the USB port on Raspberry Pi Zero 2-W to control the printer, and the built in Wi-Fi for wireless communications. That is, I wanted to turn a non-AirPrint printer into an AirPrint Printer with a Pi Zero 2-W ($15).
Dell does not provide any Linux printer drivers for the C1760nw printer. The Dell 1760nw is a rebadged Xerox Phasor 6000B. Xerox does have Linux printer drivers. However, they are compiled for the Intel/AMD architecture (amd64). They will not run on a Raspberry Pi with an ARM processor.
The Dell C1760nw uses version 1 of the Host Based Printer Lauguage (HBPLv1). A very poplular open-source printer driver, foo2zjs.rkkda.com, already had support for version 2 of HBPL. In 2014 David Coffin and Rick Richarson, added a driver and wrapper files to upport HBPLv1 printers, but a bug prevented it working.
In 2016, Mark Nicholson, found and fixed the bug, and he added the HBPLv1 driver to Debian's foo2zjs package. He only produced i368 and amd64 (x86) packages. However, in same year, a Canandian that had a Raspberry Pi 3, Cees de Groot, used Nicholson's source and patch code, and he produced an armhf (32-bit) package. His website is now dead, but the packages can still be downloaded via the Way Back Machine:
https://web.archive.org/web/20220113164134/http://evrl.com/linux/2016/07/22/c1660w-rpi.html
or more directly,
The common package is architecture independent. The last package modifies the first two packages to provide support for hbplv1 and Dell printers 1205c, 1660 and 1760.
This is a 32-bit driver and should be installed on a 32-bit OS.
They are also available on my website here:
The name of this driver has significance:
Host Based Printer Languages (HBPLs) requires that the host computer generate all of the half-tones before sending any data to the printer. This considerable reduces the amount of work that the printer has to do.
The order that you install these packages is important. One of the drivers depends on the package liblcms2-utils so installed it first, then the next two packages. That is:
sudo apt install liblcms2-utils
sudo dpkg -i printer-driver-foo2zjs-common_20160407dfsg0-1_all.deb
sudo dpkg -i printer-driver-foo2zjs_20160407dfsg0-1_armhf.deb
If you were to log into CUPS' embedded web server, you would see printer drivers for some Apollo, DYMO, Epson, Fuji-Xero, HP, Intellietch, Oki, and Generic printers, but you would see nothing for Dell printers. These printers use HBPLv2 (version 2).
Now install the last package:
sudo dpkg -i printer-driver-foo2zjs-hbpl1_20160407dfsg0-1_armhf.deb
Now, if you were to log into CUPS' embedded web server, you would only see three printer drivers: Dell 1250c, Dell 1660 and Dell 1760. These printers use HBPLv1 (version 1).
Now every time you run:
sudo apt update
You will be informed that foo2zjs-common and foo2zjs (armhf) can be updated with 2020/05/05 packages. Do not install these updates, until after you have completed installing the printer (driver) into CUPS (Common Unix Printing System).
To install the printer in CUPS, you have to be a member of the line printer administers group. Add yourself to the lpadmin group:
sudo gpasswd -a your_user_name lpadmin
The easies way to add a printer to CUPS is to use CUPS' embedded web server. If you are doing this on a computer that has a GUI, get your_IP_Addres:
ip addr
Open a web browser and enter the following in the url, then hit return.
http://your_Ip_adress:631
If you are doing this from a computer that does not have a GUI and/or a web browser, you have to enable remote administration of CUPS:
cupsctl --remote-admin --remote-any
Now you can log into CUPS' embedded web server remotely, but to find. it you have to know the name or IP address of the computer with CUPS. Execute the following command:
ip addr
Write down the MAC address (xx.xx.xx.xx.xx.xx) of the interface you will use to login into. Go to your router, and assign the MAC address a static IP address.
Go to a any computer (Windows, macOS, or Linux) with a GUI, open a web browser, and enter the following in the url:
http://Static_IP_Address_of_CUPS_Embedded_Server:631
When the CUPS embedded web server appears, click on "Administration", then click on "Add Printer". You will be prompted for your user_name and password of the computer with cups. Enter the user_name and password.
Select Your Printer.Go to Maintenance and print a test page.
This section is explanatory and optional.
There are currently four driverless printer standards. They all work over the Internet Printing Protocol (IPP). They only differ in which PDLs are supported.
To meet one of driverless printer standards, the printer does not have to natively implement all of the PDLs in the standard. it just has to implement the failback PDL. That is, a printer could implement one of the raster PLDs and meet the standard.
Most modern driverless printers meet more than one of these standards.
If want to you see what driverless printer standards and the PDLs the Dell C1760nw supports, enter the following Linux command:sudo cupsctl --share-printers sudo avahi-browse -rt _ipp._tcp
There will not be any line breaks in the output. For clarity, I added them. The output should be similar to:
port = [631]
txt = [
"printer-type=0x80900E"
"printer-state=3"
"Color=T"
"TLS=1.2"
"UUID=cb52f98b-d756-3553-4a74-fa9ac2a9a3af"
"URF=DM3"
"pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster,image/urf"
"product=(C1760)"
"priority=0"
"note="
"adminurl=https://NZ2.local.:631/printers/Dell_C1760nw_Color_Printer"
"ty=Dell C1760 Foomatic/foo2hbpl1 (recommended)"
"rp=printers/Dell_C1760nw_Color_Printer"
"qtotal=1"
"txtvers=1"
]
The first highlighted line indicated that it is an AirPrint Printer. The second highlighted line shows the Page Description Languages (PDLs) that the printer supports. Unfortunately, it currently does not support Mopria, which is used in Microsoft Windows. However, the upcoming CUPS 2.4 (expected mid 2023) will expand support for both AirPrint and Mopria.
CUPS is the standard client printer driver for Linux and macOS. However, it can also be print server. If it is a remote print server then you will want to administer to it wirelessly using CUPS's embedded web server. The following will modify the CUPS configuration file, /etc/cups/cupsd.conf, and enable both of these features.
You can access the CUPS embedded web server with a web browser by entering the url: http://Static IP_Address_of the PI:631/printers.
You will also want to enable SSH so you can made additional changes.
You should now be able to Print to this sever via Apple AirPrint from all you Apple devices (iPhone, iPad, macOS) without installing a local driver.
Apple's AirPrint is preparatory; it is not an open standard. So, what did Microsoft do? They chose to support another driverless printer standard, Mopria, which is also preparatory and not an open standard. Hence, Microsoft's Windows is not compatibility with Apple's AirPrint.
However, you can get this driver to work wirelessly with Microsoft's Windows without install Dell printer drivers:
Using the same procedure for my older HP 1320nw laser printer was a lot easier. I did not have download a driver. CUPS found and installed a driver for it. Microsoft Windows found the printer and installed a Microsoft' IPP Class Driver for it. It did the later, because for some reason, this printer, with CUPS, responded that is was Mopria 1.3 certified. The Raspberry Pi Zero 2-W upgraded the Wi-Fi from IEEE 802.11b, which is obsolete, to IEEE 802.11n.
Most Linux distributions have a printer driver package, called foo2zjs. It relies on a configurable printing filter called Foomatic, and it uses the Zenographic ZjStream wire protocl.
In foo2zjs, are the following drviers: foo2hblp2, foo2hiperc, foo2hp, foo2lava, foo2oak, foo2qpdl, foo2slx, foo2xqx, foo2zjs . These drivers are for different printers: foo2hp and foo2xqx are for hp printers; foo2qpdl is for Samsung printers; foo2hiperc is for OKI printer, etc.
foo2hbpl2 is for printers that use version 2 of Host Based Printer Language (HBPLv2). These include Dell, Xerox and Fuji-Xero.
There appears to have also been plans to support printers that used version 1 of the HBPL protocol. However, it did not get incorporated into foo2zjs because of a bug in the foo2hbpl1 driver.
The bug was in a case statement that was expecting a string value, and instead it received a number value. The fix for this bug is to included an OR operator in 11 lines of the case statement that modified them to accept a string OR a number value. More precisely, the code for the fix.
Printers that use the HBPLv1 protocol are Dell models 1250c, C1660, C1760, Expson-AcuLaser-C1700 and Fuji-Xerox DocuPrint CP105.
It is now possible to inclued support for these printers in the foo2zjs printer driver, but so for none of the Linux distros have chosen to do it. However, it has been done on GitHub. There was one GitHub repository that included version 1 of HBPL even before the bug was fixed. It's now fixed. the link is below:
GitHub Source foo2zjs with HBPLv1 support - Mike Redrobe
To download the repository, click on the code button.
To extact the zip files:
unzip foo2zjs-master.zip
The problem with this repository is that it is not very active. It does not include newer bug fixes, and it is maintained by an individual.
Debian's version of foo2zjs is foo2zjs (20200505dfsg0-1). It is up to date, and it is maintained by the Debian Printer Team. Changes can be tracked at: https://tracker.debian.org/pkg/foo2zjs.
The source code is available at:
https://salsa.debian.org/printing-team/foo2zjs.To download the repository, click on the download icon button.
To extract foo2zjs-debian-main.tar.gz:
tar -cvf foo2zjs-debian-main.tar.gz
It has a Makefile and an INSTALL file. With them, it only takes two simple commands to compile and install the driver.
I decided to use Debian's code as my base, and to add support for version 1 of the HBPL using the previous referenced GitHub repository.
The following files were copied into the main directory:
The following files were copied into the PPD directory:
The hardest part was comparing to two MakeFile and adding support for version 1 of HBPL into Debian's Makefile.
In order to compile it using a Raspberry Pi 4B, I had to install one package:
sudo apt instal libjbig-dev
The two instructions for compling the and installing the driver are:
sudo make -B
sudo make install
All you have to do now is add the printer in CUPS. The usually way of doing this is to use the enbedded web sever in CUPS. However, it is a good pratice to first restart CUPS and it printer spooler:
sudo systemctl restart cups
To bring up CUPS' embedded web server, open a web browser and enter the following url:
http://localhost:631
Click on Administrator, then click on Add printer.
It should prompt you for your user id and password. Enter them. If necessary, click on Add printer again.
Click on the approcate radio button to select your printer. On the next page, select your printer driver from the list. Afterwards, click on Maintance and print out a test page.
Stop CUPS:
sudo systemctl stop cups
Remove CUPS:
sudo apt-get purge -y cups cups-common && apt-get autoremove -y
reboot
Reinstall Cups:
sudo apt install cups
The cups commmon will automaticly be install when you install cups.
Updated on 10-18-23
On 10-10-23, the Bookworm (Debian 12) edition of the Raspberry Pi OS was released. The 64-bit version is listed as being compatible with the Pi 3/4/400/5. The Pi ZERO 2W is essentially a slower RPi 3 (1.2 vs 1.0 GHz) with only 512 MB of SDRAM memory. Both are quad-core, ARM A53. Because of the small amount of SDRAM memory, it can not run a web browser.
With the new OS, came CUPS 2.4.2-2. There is warning message in CUPS 2.4.2 that printer drivers have been depreciated, and that sometime in future, they will be removed from CUPS. However, CUPS 2.4.2 has more support for AirPrint and Mopria (which Microsoft uses). Although, at the president, I have not been able to get this to work, the foo2zjs driver now appears to be Mopria 1.3 compatible.
Presently, I am not sure about the compatible of the RPi Zero 2W and the 64-bit edition of Bookworm. On 10/17/23, upgrading consistantly hung at "apt-listchanges: Reading ChangeLogs...". I moved the SD card to a RPi Pi 4B, and I was able to SSH into it and successfully upgraded. I then moved the SD card back to RPi Zero 2W, and everything worked as before including new upgrades.
Although, the RPI Zero 2W does not have enough memory to run a web browser, there are advantages to running the Desktop OS over the Command Line OS. One of the them, is being able to make backup images of the SD Card with the Image Copier utility. Hence, I have decided to use the desktop OS even though it will be running headless when connected to the printer.
Use a Raspberry PI 4 or 5 and the OS Imager to install the OS on a SD Card. After, the OS is installed on a new SD card, the new card can be placed in either a RPI 4, 5 or ZERO 2W and the OS setup. The SD card can later be moved to the target RPI Zero 2W. However, make sure that the RPI will connect to the wireless network with the Ethernet cable unplugged (I had a problem here).
To setup the Pi use:
sudo raspi-config
Enable SSH: 3-Interface Options > I1-Enable/Disable SSH.
Change Host Name: 1-System Options > S4-Hostname
Allow the CUPS Server to be controlled remotely:
cupsctl --remote-admin --remote-any
Complied on 4/1/2023
To install the drivers, they must be on the target SD card. If you downloaded them with a Pi 4 or 5 and then they should be in download directory.
If you are running the lite command-line OS, then either:
The order that you install these packages is important. One of the drivers depends on the package liblcms2-utils so installed it first, then the next two packages. That is:
sudo apt install liblcms2-utils
Change to the directory where the drivers are located and install them
sudo dpkg -i printer-driver-foo2zjs-common_20200505dfsg0-2_all.deb
sudo dpkg -i printer-driver-foo2zjs_20200505dfsg0-2_arm64.deb
Now install the last package:
sudo dpkg -i printer-driver-foo2zjs-hbpl1_20200505dfsg0-2_arm64.deb
Now every time you run:
sudo apt update
You will be informed that foo2zjs-common and foo2zjs (armhf) can be updated with 2020/05/05 packages. Do not install these updates, until after you have completed installing the printer (driver) into CUPS (Common Unix Printing System).
To prevent the OS from upgrading these packages:
sudo apt-mark hold printer-driver-foo2zjs-common
sudo apt-mark hold printer-driver-foo2zjs
I am not sure why the extended name of these package are not used her.
Connect the USB Type B port on the printer to one of the USB ports on the Raspberry Pi. Cut the printer on.
Go to a any computer (Windows, macOS, or Linux) with a GUI, open a web browser, and enter the following in the url:
http://Static_IP_Address_of_CUPS_Embedded_Server:631
When the CUPS embedded web server appears, click on "Administration", then click on "Add Printer". If you recieve the message: "Warning Potential Security Risk ahead", click on the Advance Button, and then click on the "Accept the Risk and Continue" Button. You will be prompted for your user_name and password of the computer with CUPS. Enter the user_name and password. This will bring you back to the orignal page. Click on the "Add Printer Button" for the seond time. The Dell C1760nw should be listed under local printers. Select it via its Radio Button, and click the "Continue" Button. On the next screen (near the bottom), check the box "Share This Printer", and then the "Continue" Button. On the next page, select your model: "Dell 1760 Foomatic/foo2hbpl1", and click on the "Add Printer" Button (at the bottom). You should receive the followibg two messages: (1) Printer Dell_C_1760nw_Color_Printer has been added sucessully, and (2) Note: Printer drivers and raw queues are deprecated and will stop working in a future version of CUPS. Click on the "Set Printer Options" Button. Change the Page Size to Letter, then click on the "Set Default Options" Button. Next click on Maintenance > Print Test Page. If the test page printed successully, the wireless printer is setup.
If you have an Apple iPhone, iPad, or Mac, see if you can AirPrint to the Dell C1760nw. On an iPhone or iPad, hit print and select the printer. If successful, the driver is installed correctly. Any problems you have printing from Linux or Windows is with the local PC and NOT the RPi that is directly connected to the USB port of the printer.
It should be just as staight forward on a Linux PC. That is, all you should have to do is select the printer from any application that has printing capability.
Note, I had major problems keeping the locai Linux PC connected to the RPi which was directly conneted to Dell C1760nw printer. It is believed that the problem was that the RPi Zero 2 W only has a 2.4 GHz radio and is WiFi "g" compliant. The Apple Extreme Router (WiFi ac) that I was using, has both a 5 GHz radio and a 2.4 GHz radio, but not a WiFi certification that uses both bands (it's ad hoc). WiFi 6 is certified for both bands.
The above did not solve the problem of the printer disappearing. What is below did:
Go to Preferences > Printer Settings
Select Add Printer, you make have to unlock the system and supply a user name and password. After Add Printer, even if your printer is listed, select Network Printer > Find Netowrk Printer. Enter the Host IP Address and hit the Find Button. A pop up box will show up stating: "You must log in to acess 192.168.xxx.xxx". No matter what you put in the pop up box, it will say failed, the password may be incorrect. Hit the Cannel Button (this only cancels loging in). Hit the Forward Button. Enter a "short name" for the Printer. This is the name that you will use to select this printer. Hit Apply. Go back Preferences & Printer Settings, and select the short name printer as the default printer. I believe that you are now using this printer as an IPP everywhere printer rather than an Apple AirPrinter. The Apple AirPrinter still works perfectly with my iPhone and iPad, it just comes as goes with Debian and the Raspberry Pi OS.
By unstalling and reinstalling CUPS on the local PC, I could get this to "sometimes" work.
My solution was to give up on Rpi Zero 2W (since it was the only 2.4 GHz device on the network) and use a RPi 4B and the 5 GHz radio for the Wireless printer.
Hopefully, the following will not be necessary, but just in case:
Uninstalling cups:
sudo systemctl stop cups-browsed
sudo systemctl stop cups
sudo apt-get purge -y cups cups-common cups-browsed && sudo apt-get autoremove -y
sudo reboot now
Reinstall Cups:
sudo apt update
sudo apt install cups
Cups-common and cups-browsed will automaticly be install when you install cups. A reboot is required after reinstalling cups.
sudo reboot now
sudo apt remove system-config-printer
sudo apt autoclean && sudo apt autoremove
sudo reboot now
sudo apt update
sudo apt install system-config-printer