HP Deskjet 1210安装 驱动 + CUPS + raspberrypi 树莓派
因暑期写作业需要,新购买了一台HP喷墨打印机。HP Deskjet 1210 为HP廉价打印机,只提供USB连接方式,和主流支持WIFI打印不同,使用不够方便。故利用家里raspberrypi树莓派作为打印机服务器,为手机、PC、MAC、PAD提供打印服务。
软件安装过程如下:
-
16G存储卡TF,从raspberrypi.org网站下载raspberry pi imager。将TF卡插入读卡器,插到PC usb端口,写入raspbian image。
-
把准备好的TF插入raspberry pi,上电。启动操作系统。安装cups服务和hplip服务
sudo apt update
sudo apt install cups hplip
sudo usermod -a -G lpadmin pi
- 修改/etc/cups/cupsd.conf 文件
sudo nano /etc/cups/cupsd.conf
Listen localhost:631 改成 Listen 0.0.0.0:631
或者注释掉 Listen localhost:631 加上 Port:631
# Restrict access to the server…
<Location />
Order allow,deny
Allow @Local //添加此项
</Location>
# Restrict access to the admin pages…
<Location /admin>
Order allow,deny
Allow @Local //添加此项
</Location>
# Restrict access to configuration files…
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow @Local //添加此项
</Location>
- 重启cups
sudo service cups restart
- 配置cups
浏览器输入:https://树莓派IP:631,即可成功访问cups
设置server settings
点击AddPrinter,注意选Share This Printer
cups没有没有hp deskjet 1210 model,选择2510