电视盒子安装了ubuntu系统,WiFi工作也正常,配置CUPS连接打印机,实现Airprint无线打印。
一、安装并配置CUPS
sudo apt update -y
sudo apt install cups -y
编辑CPUS的配置文件
vim /etc/cups/cupsd.conf
重启CUPS 服务
systemctl restart cups
二、安装hplip软件包,同时自动安装了依赖包avahi-daemon,前者包含打印机驱动,后者支持无线打印
sudo apt install hplip -y
hplip 软件包简介
Description: HP Linux Printing and Imaging System (HPLIP)
The HP Linux Printing and Imaging System provides full support for
printing on most HP SFP (single function peripheral) inkjets and many
LaserJets, and for scanning, sending faxes and for photo-card access on
most HP MFP (multi-function peripheral) printers.
.
HPLIP is composed of:
* System services to handle communications with the printers
* HP CUPS backend driver (hp:) with bi-directional communication with
HP printers (provides printer status feedback to CUPS and enhanced
HPIJS functionality such as 4-side full-bleed printing support)
* HP CUPS backend driver for sending faxes (hpfax:)
* hpcups CUPS Raster driver to turn rasterized input from the CUPS
filter chain into the printer's native format (PCL, LIDIL, ...).
(hpcups is shipped in a separate package)
* HPIJS Ghostscript IJS driver to rasterize output from PostScript(tm)
files or from any other input format supported by Ghostscript, and
also for PostScript(tm) to fax conversion support
(HPIJS is shipped in a separate package)
* Command line utilities to perform printer maintenance, such as
ink-level monitoring or pen cleaning and calibration
* GUI and command line utility to download data from the photo card
interfaces in MFP devices
* GUI and command line utilities to interface with the fax functions
* A GUI toolbox to access all these functions in a friendly way
* HPAIO SANE backend (hpaio) for flatbed and Automatic Document Feeder
(ADF) scanning using MFP devices
.
USB and JetDirect (network) devices are supported.
avahi-daemon 软件包简介
Description: Avahi mDNS/DNS-SD daemon
Avahi is a fully LGPL framework for Multicast DNS Service Discovery.
It allows programs to publish and discover services and hosts
running on a local network with no specific configuration. For
example you can plug into a network and instantly find printers to
print to, files to look at and people to talk to.
.
This package contains the Avahi Daemon which represents your machine
on the network and allows other applications to publish and resolve
mDNS/DNS-SD records.
三、登录CUPS管理页面,添加打印机,设置打印机驱动为 HP Deskjet 1110 series
3.1 添加打印机
3.2 选择打印机,打印机名称应与lsusb显示设备名一致
lsusb显示设备名
3.3 选择共享打印机
3.4 选择设备驱动型号,真实打印机型号为HP DeskJet 1212,但Model中没有该设备,尝试选择名字接近的HP DeskJet 1200c,打印机不工作。最后在linuxmint论坛看到有人反馈:use the HP1110 CPUS driver,随意选择了一个HP Deskjet 1110的驱动,打印机就可以工作。
3.5 确认添加好的打印机的状态
现在可以用Iphone 直接打印了