找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 13698|回复: 29

pandoraBox刷入cups+airprint,手机和平板无法打印,打印机没反应

[复制链接]
本帖最后由 BrainZ 于 2020-9-2 19:50 编辑

参考链接:
https://www.right.com.cn/forum/thread-172494-1-1.html
https://github.com/TheMMcOfficial/cups-for-openwrt
https://www.right.com.cn/forum/thread-4009734-1-1.html

设备:小米路由器mini

固件:pandoraBox19.01

打印机:惠普hp1020plus(hp1020)

    一番折腾,成功给路由器刷入了cups,并根据第二个参考链接配置了airprint,由于打印机是GDI打印机,在驱动问题上折腾了很久,后来发现是第三个链接中第五部分安装插件时,我遗漏了两项,进而导致虽然有cups反应,但是无法传送驱动所以打印机没有任何反应。

    在重新刷了潘多拉之后,重头一步一步的安装,安装成功后,windows电脑可以正常打印,并且重启打印机或者重启路由器都没有问题。

    但是airprint功能依旧无法使用,在Android手机、苹果手机和IPAD上都能搜到airprint打印机,发送打印任务也是成功,cups的页面显示“Processing - "Sending data to printer."”,然后显示“Idle - "Sending data to printer."”,打印机没有任何反应。
    怀疑airprint功能没有成功加载打印机驱动(打印机驱动在printer-firmware里包含,windows电脑打印时打印机能够正常打印,电脑是直接用的 ip+端口+名称 连接的打印机)。


  希望大神能够帮忙!非常感谢!





附录:安装成cups后,在cups上安装airprint部分内容
https://github.com/TheMMcOfficial/cups-for-openwrt#step-6
Step 6
Configure airprint!

create the following file
  1. vi /etc/avahi/services/AirPrint-YOUR_PRINTER.service
复制代码
And paste this. Replace all the "YOUR_PRINTER" by the name gave in the cups configuration.
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
  3. <service-group>
  4. <name replace-wildcards="yes">AirPrint YOUR_PRINTER [url=home.php?mod=space&uid=162986]@[/url] %h</name>
  5. <service>
  6.        <type>_ipp._tcp</type>
  7.        <!-- This is key for AirPrint -->
  8.        <subtype>_universal._sub._ipp._tcp</subtype>
  9.        <port>631</port>
  10.        <!-- These are copied from the txt portion of the above output -->
  11.        <txt-record>txtvers=1</txt-record>
  12.        <txt-record>qtotal=1</txt-record>
  13.        <txt-record>rp=printers/YOUR_PRINTER</txt-record>
  14.        <txt-record>ty=I make the printer Go</txt-record>
  15.        <!-- This is visible in iPhone UI -->
  16.        <txt-record>note=I am an AirPrint Printer</txt-record>
  17.        <txt-record>product=(GPL Ghostscript)</txt-record>
  18.        <txt-record>printer-state=3</txt-record>
  19.        <txt-record>printer-type=0x3006</txt-record>
  20.        <txt-record>Binary=T</txt-record>
  21.        <txt-record>Transparent=T</txt-record>
  22.        <txt-record>URF=DM3</txt-record>
  23.        <txt-record>pdl=application/octet-stream,application/pdf,application/postscript,application/vnd.cups-raster,image/gif,image/jpeg,image/png,image/tiff,image/urf,text/html,text/plain,application/vnd.adobe-reader-postscript,application/vnd.cups-pdf</txt-record>
  24. </service>
  25. </service-group>
复制代码
restart avahi
  1. /etc/init.d/avahi-daemon restart
复制代码
I don't know if the last two file are required but I have create them.
  1. vi /usr/share/cups/mime/airprint.convs
复制代码
  1. more airprint.convs
  2. #
  3. # "$Id: [        DISCUZ_CODE_4        ]quot;
  4. #
  5. # AirPrint
  6. # Updated list with minimal set 25 Sept
  7. image/urf application/pdf 100 pdftoraster
  8. #
  9. # End of "$Id: [        DISCUZ_CODE_4        ]quot;.
  10. #
复制代码
  1. /usr/share/cups/mime/airprint.types
复制代码
  1. airprint.types
  2. #
  3. # "$Id: [        DISCUZ_CODE_6        ]quot;
  4. #
  5. # AirPrint type
  6. image/urf urf string(0,UNIRAST<00>)
  7. #
  8. # End of "$Id: [        DISCUZ_CODE_6        ]quot;.
  9. #
复制代码
To make cups and avahi-demon start at boot
  1. /etc/init.d/cupsd enable
复制代码
  1. /etc/init.d/avahi-daemon enable
复制代码


(4楼、5楼有问题补充)

我的恩山、我的无线 The best wifi forum is right here.
 楼主| | 显示全部楼层
补充:
在ipad上发送打印任务后,在cups的页面里的Job页面,是这样显示的


也就是显示是成功打印了,但是打印机并没有反应。
我用了一个非GDI打印机测试,发现airprint功能可以使用。
应该可以确定是因为用airprint时驱动没有成功的传送给打印机?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
有一个想法是,在cups里,通过administration里add printer添加的打印机,在添加后printers里hp1020打印机详情页connection写的是Connection:        usb://HP/LaserJet%201020?serial=

而printers页里还有一个LP和USB
USB的connection写的是Connection:        usb:/dev/usb/lp0
通过第一个hp1020项用电脑能打印,通过USB那项用电脑是不能打印的
所以打印机应该是没挂载在/dev/usb/lp0?
然而我cat /etc/sihp1020.dl >>/dev/usb/lp0 传送了一下驱动,打印机是有反应的
只不过cups并没有将打印机与/dev/usb/lp0关联起来?
所以请问有人知道如何在cups里将打印机与/dev/usb/lp0关联起来吗?
万一这样关联起来之后airprint可以使用呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

你试试putty输入这个命令:
chmod -R 777 /dev/bus/usb/002/

点评

试了一下,没有作用。我用了一个新款打印机非GDI打印机试了一下,发现airprint可以用。应该就是在airprint下发送打印任务时打印机驱动无法传送给打印机(′_`)  详情 回复 发表于 2020-9-2 18:38
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
gforce10 发表于 2020-9-2 14:15
你试试putty输入这个命令:
chmod -R 777 /dev/bus/usb/002/

试了一下,没有作用。我用了一个新款打印机非GDI打印机试了一下,发现airprint可以用。应该就是在airprint下发送打印任务时打印机驱动无法传送给打印机(′_`)

点评

哦哦哦,我知道了,你试试安装printer-firmware这个软件包,opkg install printer-firmware # 安装1020,1005,hp1000,hp1018,hpP1005,hpP1006,hpP1007,hpP1008,hpP1505等常见打印驱动。  详情 回复 发表于 2020-9-2 22:37
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

BrainZ 发表于 2020-9-2 18:38
试了一下,没有作用。我用了一个新款打印机非GDI打印机试了一下,发现airprint可以用。应该就是在airprin ...

哦哦哦,我知道了,你试试安装printer-firmware这个软件包,opkg install printer-firmware # 安装1020,1005,hp1000,hp1018,hpP1005,hpP1006,hpP1007,hpP1008,hpP1505等常见打印驱动。

点评

这个包安装过了,电脑是可以正常打印的╰[ ⁰﹏⁰ ]╯,可能是cups 的airprint设置里没有关于GDI打印机驱动的东西。 我安装了这些东西,还有这些东西的关联的包。 opkg install kmod-usb-core opkg i  详情 回复 发表于 2020-9-3 13:20
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
本帖最后由 BrainZ 于 2020-9-3 14:20 编辑
gforce10 发表于 2020-9-2 22:37
哦哦哦,我知道了,你试试安装printer-firmware这个软件包,opkg install printer-firmware # 安装1020, ...

这个包安装过了,电脑是可以正常打印的O_O,可能是cups 的airprint设置里没有关于GDI打印机驱动的东西。
我安装了这些东西,还有这些东西的关联的包。

opkg update
opkg install kmod-usb-core
opkg install kmod-usb-storage
opkg install kmod-usb-printer #USB口打印机支持

4.2、安装CUPS 软件包
opkg install cups
opkg install libcupsdriver      ##注意libcupsdriver不会默认安装,需要手工安装,否则认不到打印机
opkg install cups-locale-zh  #可选,这个中文知识部分中文,意义不大。
opkg install printer-firmware # 安装1020,1005,hp1000,hp1018,hpP1005,hpP1006,hpP1007,hpP1008,hpP1505等常见打印驱动





点评

好吧,难搞......  详情 回复 发表于 2020-9-3 14:14
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

BrainZ 发表于 2020-9-3 13:20
这个包安装过了,电脑是可以正常打印的O_O,可能是cups 的airprint设置里没有关于GDI打印机驱动的东西。
...

好吧,难搞......
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

手机安了安卓cups,能发现打印机,但是打印不了,电脑可以。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

openwrt里面avahi怎么安装

点评

到对应的软件库里下载安装  详情 回复 发表于 2020-12-14 14:36
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
宏杰电脑 发表于 2020-12-13 22:13
openwrt里面avahi怎么安装

到对应的软件库里下载安装
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

有佳能ip1188的驱动吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

解决了吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

跟着楼主学习下,我也在折腾
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
1020plus完美吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-28 22:20

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表