|
本帖最后由 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 - vi /etc/avahi/services/AirPrint-YOUR_PRINTER.service
复制代码And paste this. Replace all the "YOUR_PRINTER" by the name gave in the cups configuration. - <?xml version="1.0" encoding='UTF-8'?>
- <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
- <service-group>
- <name replace-wildcards="yes">AirPrint YOUR_PRINTER [url=home.php?mod=space&uid=162986]@[/url] %h</name>
- <service>
- <type>_ipp._tcp</type>
- <!-- This is key for AirPrint -->
- <subtype>_universal._sub._ipp._tcp</subtype>
- <port>631</port>
- <!-- These are copied from the txt portion of the above output -->
- <txt-record>txtvers=1</txt-record>
- <txt-record>qtotal=1</txt-record>
- <txt-record>rp=printers/YOUR_PRINTER</txt-record>
- <txt-record>ty=I make the printer Go</txt-record>
- <!-- This is visible in iPhone UI -->
- <txt-record>note=I am an AirPrint Printer</txt-record>
- <txt-record>product=(GPL Ghostscript)</txt-record>
- <txt-record>printer-state=3</txt-record>
- <txt-record>printer-type=0x3006</txt-record>
- <txt-record>Binary=T</txt-record>
- <txt-record>Transparent=T</txt-record>
- <txt-record>URF=DM3</txt-record>
- <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>
- </service>
- </service-group>
复制代码- /etc/init.d/avahi-daemon restart
复制代码I don't know if the last two file are required but I have create them. - vi /usr/share/cups/mime/airprint.convs
复制代码- more airprint.convs
- #
- # "$Id: [ DISCUZ_CODE_4 ]quot;
- #
- # AirPrint
- # Updated list with minimal set 25 Sept
- image/urf application/pdf 100 pdftoraster
- #
- # End of "$Id: [ DISCUZ_CODE_4 ]quot;.
- #
复制代码- /usr/share/cups/mime/airprint.types
复制代码- airprint.types
- #
- # "$Id: [ DISCUZ_CODE_6 ]quot;
- #
- # AirPrint type
- image/urf urf string(0,UNIRAST<00>)
- #
- # End of "$Id: [ DISCUZ_CODE_6 ]quot;.
- #
复制代码To make cups and avahi-demon start at boot - /etc/init.d/avahi-daemon enable
复制代码
(4楼、5楼有问题补充)
|
|