找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888广告投放联系QQ68610888
广告投放联系QQ68610888广告投放联系QQ68610888
查看: 11718|回复: 15

玩客云安装cups、sane,hpM1005实现pc、移动设备无线打印,pc无线扫描

  [复制链接]
发表于 2022-12-13 14:04 | 显示全部楼层 |阅读模式
本帖最后由 yz0515 于 2022-12-13 14:18 编辑

一、玩客云固件采用地址,两个usb都可以用,一个查无线网卡,一个插打印机。

二、连ssh,安装cpus
  1. apt update
  2. apt-get install cups
复制代码
三、安装惠普驱动
  1. apt-get install hplip
复制代码
四、修改cupsd.conf
  1. vi /etc/cups/cupsd.conf
复制代码
这4处参考修改为
  1. # Only listen for connections from the local machine.
  2. Listen 0.0.0.0:631
  3. Listen /var/run/cups/cups.sock

  4. # Restrict access to the server...
  5. <Location />
  6.   Order allow,deny
  7.     Allow all
  8. </Location>

  9. # Restrict access to the admin pages...
  10. <Location /admin>
  11.   Order allow,deny
  12.     Allow all
  13. </Location>

  14. # Restrict access to configuration files...
  15. <Location /admin/conf>
  16.   AuthType Default
  17.   Require user @SYSTEM
  18.   Order allow,deny
  19.   Allow all
  20. </Location>

复制代码
然后重启cups
  1. service cups restart
复制代码
五、进入cups后台添加打印机
浏览器访问https://玩客云ip:631,需要输入玩客云账号密码认证,然后add print--》
Local Printers(选择打印机)--》
Sharing(打对钩)--》选对应型号驱动--》继续,配置好后发现无法打印。


我的打印机是惠普M1005,比较老旧,驱动显示需要装插件。

然后到这里
找到刚才cups管理页面驱动显示的版本号,使用wget下载
  1. wget https://developers.hp.com/sites/default/files/hplip-3.18.12-plugin.run
  2. wget https://developers.hp.com/sites/default/files/hplip-3.18.12-plugin.run.asc
复制代码
然后安装插件

  1. root@arm:~#hp-setup -i

  2. HP Linux Imaging and Printing System (ver. 3.18.12)
  3. Printer/Fax Setup Utility ver. 9.0

  4. Copyright (c) 2001-15 HP Development Company, LP
  5. This software comes with ABSOLUTELY NO WARRANTY.
  6. This is free software, and you are welcome to distribute it
  7. under certain conditions. See COPYING file for more details.

  8. (Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


  9. --------------------------------
  10. | SELECT CONNECTION (I/O) TYPE |
  11. --------------------------------

  12.   Num       Connection  Description
  13.             Type
  14.   --------  ----------  ----------------------------------------------------------
  15.   0*        usb         Universal Serial Bus (USB)
  16.   1         net         Network/Ethernet/Wireless (direct connection or JetDirect)

  17. Enter number 0...1 for connection type (q=quit, enter=usb*) ?

  18. Using connection type: usb


  19. Setting up device: hp:/usb/HP_LaserJet_M1005?serial=KJ4HDNA



  20. ------------------------
  21. | PLUG-IN INSTALLATION |
  22. ------------------------


  23. HP Linux Imaging and Printing System (ver. 3.18.12)
  24. Plugin Download and Install Utility ver. 2.1

  25. Copyright (c) 2001-15 HP Development Company, LP
  26. This software comes with ABSOLUTELY NO WARRANTY.
  27. This is free software, and you are welcome to distribute it
  28. under certain conditions. See COPYING file for more details.

  29. warning: It is not recommended to run 'hp-plugin' in a root mode.

  30. HP Linux Imaging and Printing System (ver. 3.18.12)
  31. Plugin Download and Install Utility ver. 2.1

  32. Copyright (c) 2001-15 HP Development Company, LP
  33. This software comes with ABSOLUTELY NO WARRANTY.
  34. This is free software, and you are welcome to distribute it
  35. under certain conditions. See COPYING file for more details.

  36. error: PolicyKit support requires DBUS or PolicyKit support files missing
  37. (Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


  38. ------------------------------------------
  39. | PLUG-IN INSTALLATION FOR HPLIP 3.18.12 |
  40. ------------------------------------------

  41.   Option      Description
  42.   ----------  --------------------------------------------------
  43.   d           Download plug-in from HP (recommended)
  44.   p           Specify a path to the plug-in (advanced)
  45.   q           Quit hp-plugin (skip installation)

  46. Enter option (d=download*, p=specify path, q=quit) ? p #选择p,指定目录刚才wget的目录,否则无法下载
  47. Enter the path to the 'hplip-3.18.12-plugin.run' file (q=quit) : /root/

  48. ---------------
  49. | COPY PLUGIN |
  50. ---------------

  51. Downloading plug-in from: file:///root/hplip-3.18.12-plugin.run
  52. Downloading plug-in: [\                                                                           ] 0%  1100%Receiving digital keys: /usr/bin/gpg --homedir /root/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9

  53. error: Unable to recieve key from keyserver
  54. Do you still want to install the plug-in? (y=yes, n=no*, q=quit) ? y #选择y,不效验加密

  55. ----------------------
  56. | INSTALLING PLUG-IN |
  57. ----------------------

  58. Creating directory plugin_tmp
  59. Verifying archive integrity... All good.
  60. Uncompressing HPLIP 3.18.12 Plugin Self Extracting Archive.........................................................

  61. HP Linux Imaging and Printing System (ver. 3.18.12)
  62. Plugin Installer ver. 3.0

  63. Copyright (c) 2001-15 HP Development Company, LP
  64. This software comes with ABSOLUTELY NO WARRANTY.
  65. This is free software, and you are welcome to distribute it
  66. under certain conditions. See COPYING file for more details.

  67. Plug-in version: 3.18.12
  68. Installed HPLIP version: 3.18.12
  69. Number of files to install: 55

  70. You must agree to the license terms before installing the plug-in:

  71. LICENSE TERMS FOR HP Linux Imaging and Printing (HPLIP) Driver Plug-in


  72. These License Terms govern your Use of the HPLIP Driver Plug-in Software (the "Software"). USE OF THE SOFTWARE
  73. INCLUDING, WITHOUT LIMITATION, ANY DOCUMENTATION, IS SUBJECT TO THESE LICENSE TERMS AND THE APPLICABLE AS-IS WARRANTY
  74. STATEMENT. BY DOWNLOADING AND INSTALLING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THESE TERMS. IF YOU DO NOT AGREE
  75. TO ALL OF THESE TERMS, DO NOT DOWNLOAD AND INSTALL THE SOFTWARE ON YOUR SYSTEM.


  76. 1. License Grant. HP grants you a license to Use one copy of the Software with HP printing products only. "Use" includesusing, storing, loading, installing, executing, and displaying the Software. You may not modify the Software or disable
  77. any licensing or control features of the Software.


  78. 2. Ownership. The Software is owned and copyrighted by HP or its third party suppliers. Your license confers no title
  79. to, or ownership in, the Software and is not a sale of any rights in the Software. HP's third party suppliers may
  80. protect their rights in the Software in the event of any violation of these license terms.


  81. 3. Copies and Adaptations. You may only make copies or adaptations of the Software for archival purposes or when copyingor adaptation is an essential step in the authorized Use of the Software. You must reproduce all copyright notices in
  82. the original Software on all copies or adaptations. You may not copy the Software onto any public network.


  83. 4. No Disassembly. You may not Disassemble the Software unless HP's prior written consent is obtained. "Disassemble"
  84. includes disassembling, decompiling, decrypting, and reverse engineering. In some jurisdictions, HP's consent may not berequired for limited Disassembly. Upon request, you will provide HP with reasonably detailed information regarding any
  85. Disassembly.


  86. 5. No Transfer. You may not assign, sublicense or otherwise transfer all or any part of these License Terms or the
  87. Software.


  88. 6. Termination. HP may terminate your license, upon notice, for failure to comply with any of these License Terms. Upon
  89. termination, you must immediately destroy the Software, together with all copies, adaptations and merged portions in anyform.


  90. 7. Export Requirements. You may not export or re-export the Software or any copy or adaptation in violation of any
  91. applicable laws or regulations.


  92. 8. U.S. Government Restricted Rights. The Software has been developed entirely at private expense. It is delivered and
  93. licensed, as defined in any applicable DFARS, FARS, or other equivalent federal agency regulation or contract clause, aseither "commercial computer software" or "restricted computer software", whichever is applicable. You have only those
  94. rights provided for such Software by the applicable clause or regulation or by these License Terms.


  95. 9. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, HP AND ITS SUPPLIERS PROVIDE THE
  96. SOFTWARE "AS IS" AND WITH ALL FAULTS, AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED,
  97. OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE AND NON-INFRINGEMENT, ANY IMPLIED WARRANTIES, DUTIES ORCONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, AND OF LACK OF VIRUSES ALL WITH REGARD TO THE
  98. SOFTWARE. Some states/jurisdictions do not allow exclusion of implied warranties or limitations on the duration of
  99. implied warranties, so the above disclaimer may not apply to you in its entirety.


  100. 10. LIMITATION OF LIABILITY. Notwithstanding any damages that you might incur, the entire liability of HP and any of itssuppliers under any provision of this agreement and your exclusive remedy for all of the foregoing shall be limited to
  101. the greater of the amount actually paid by you separately for the Software or U.S. $5.00. TO THE MAXIMUM EXTENT
  102. PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL HP OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  103. INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS OR
  104. CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY ARISING OUT OF ORIN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, OR OTHERWISE IN CONNECTION WITH ANY PROVISION OF THISAGREEMENT, EVEN IF HP OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF THE REMEDY FAILS
  105. OF ITS ESSENTIAL PURPOSE. Some states/jurisdictions do not allow the exclusion or limitation of incidental or
  106. consequential damages, so the above limitation or exclusion may not apply to you.

  107. Do you accept the license terms for the plug-in (y=yes*, n=no, q=quit) ? y

  108. Done.

  109. Done.

  110. ---------------------
  111. | PRINT QUEUE SETUP |
  112. ---------------------


  113. Please enter a name for this print queue (m=use model name:'HP_LaserJet_M1005'*, q=quit) ?
  114. Using queue name: HP_LaserJet_M1005
  115. Locating PPD file... Please wait.

  116. Found PPD file: drv:///hpcups.drv/hp-laserjet_m1005.ppd
  117. Description:

  118. Note: The model number may vary slightly from the actual model number on the device.

  119. Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
  120. Enter a location description for this printer (q=quit) ?
  121. Enter additonal information or notes for this printer (q=quit) ?

  122. Adding print queue to CUPS:
  123. Device URI: hp:/usb/HP_LaserJet_M1005?serial=KJ4HDNA
  124. Queue name: HP_LaserJet_M1005
  125. PPD file: drv:///hpcups.drv/hp-laserjet_m1005.ppd
  126. Location:
  127. Information:


  128. ---------------------
  129. | PRINTER TEST PAGE |
  130. ---------------------


  131. Would you like to print a test page (y=yes*, n=no, q=quit) ? y #打印测试页
  132. warning: hp-testpage should not be run as root/superuser.

  133. HP Linux Imaging and Printing System (ver. 3.18.12)
  134. Testpage Print Utility ver. 6.0

  135. Copyright (c) 2001-15 HP Development Company, LP
  136. This software comes with ABSOLUTELY NO WARRANTY.
  137. This is free software, and you are welcome to distribute it
  138. under certain conditions. See COPYING file for more details.

  139. Printing test page to printer HP_LaserJet_M1005...
  140. request id is HP_LaserJet_M1005-3 (1 file(s))
  141. Test page has been sent to printer.

  142. note: If an error occured, or the test page failed to print, refer to the HPLIP website
  143. note: at: http://hplip.sourceforge.net for troubleshooting and support.


  144. Done.

  145. Done.
复制代码
没意外应该可以正常使用了,但目前ios无法airprint。
安装
  1. apt-get -y install avahi-daemon avahi-discover libnss-mdns
复制代码
目前打印功能应该正常使用了。然后配置扫描。
六、安装sane
  1. apt-get install sane sane-utils
复制代码
查看是否挂载
  1. sudo scanimage -L
复制代码
测试一下
  1. sudo scanimage -d hpljm1005:libusb:002:003 >/tmp/test.pnm
复制代码
正常后开始配置,

  1. vi /etc/sane.d/saned.conf
复制代码
根据情况添加一行
  1. 192.168.1.0/24
复制代码

然后
  1. vi /etc/services
复制代码
  1. sane-port 6566/tcp # SANE network scanner daemon
复制代码
没有添加


再设置守护
我这边使用的是xinetd,没有的话安装
  1. apt-get install xinetd
复制代码
使用inetd也行,但我的安装不了。参考这里
配置xinetd
  1. vi /etc/xinetd.d/sane-port
  2. #内容参考以下
  3.             service sane-port
  4.             {
  5.               socket_type = stream
  6.               server = /usr/local/sbin/saned
  7.               protocol = tcp
  8.               user = saned
  9.               group = saned
  10.               wait = no
  11.               disable = no
  12.             }
复制代码
然后
  1. service xinetd restart
  2. #再查看状态
  3. service xinetd status
  4. #如果报错,重新启动试下
  5. shutdown -r now
复制代码
重启后登录ssh,查看xinetd状态。
  1. service xinetd status
  2. #正常的话有以下内容
  3. /etc/xinetd.d/sane-port [file=/etc/xinetd.d/sane-port]
  4. #或者查看端口
  5. lsof -i:6566
复制代码
七、PC端设置
打印:添加页面会直接搜索到,通过共享地址填写也行。
扫描:下载,然后安装,添加玩客云ip。通过系统的扫描与传真软件扫描。




本帖子中包含更多资源

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

×

评分

参与人数 3恩山币 +3 收起 理由
潮流数码 + 1 非常感谢,折腾了一天用你的驱动代码几分钟 ...
zqc_21 + 1 感谢你的分享,无论怎样,你都是最无私的人.
zlfpass + 1 让我们一起面朝大海、花开花落…….

查看全部评分

只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
发表于 2022-12-13 14:30 | 显示全部楼层
关键看有没有驱动,很多打印机都找不到驱动,后面就不用搞了
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2022-12-13 14:43 | 显示全部楼层
使用cups的目的就是要ios ariprint能用啊 还缺了什么?
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2022-12-13 16:09 | 显示全部楼层
爱普生的L3100驱动有吗?
我现在用的优酷路由器,可以打印,但是不能手机打印,不能扫描
手机打印的时候,打印一般就报错。不清楚是什么原因。现在电脑可以打印。
扫描一直没搞定。
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2022-12-29 18:30 | 显示全部楼层

root@onecloud6681:~# service xinetd status
● xinetd.service - LSB: Starts or stops the xinetd daemon.
     Loaded: loaded (/etc/init.d/xinetd; generated)
     Active: active (running) since Tue 2022-12-27 15:50:12 CST; 2 days ago
       Docs: man:systemd-sysv-generator(8)
    Process: 3776 ExecStart=/etc/init.d/xinetd start (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 2190)
     Memory: 2.8M
        CPU: 299ms
     CGroup: /system.slice/xinetd.service
             └─3786 /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6

12月 27 15:50:13 onecloud6681 xinetd[3786]: [63B blob data]
12月 27 15:50:13 onecloud6681 xinetd[3786]: Error parsing attribute wait - DISABLING SERVICE [file=/etc/xinetd.d/sane-port] [line=8]
12月 27 15:50:13 onecloud6681 xinetd[3786]: [54B blob data]
12月 27 15:50:13 onecloud6681 xinetd[3786]: Error parsing attribute disable - DISABLING SERVICE [file=/etc/xinetd.d/sane-port] [line=9]
12月 27 15:50:13 onecloud6681 xinetd[3786]: Reading included configuration file: /etc/xinetd.d/servers [file=/etc/xinetd.d/servers] [line=10]
12月 27 15:50:13 onecloud6681 xinetd[3786]: Reading included configuration file: /etc/xinetd.d/services [file=/etc/xinetd.d/services] [line=13]
12月 27 15:50:13 onecloud6681 xinetd[3786]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=13]
12月 27 15:50:13 onecloud6681 xinetd[3786]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=28]
12月 27 15:50:13 onecloud6681 xinetd[3786]: 2.3.15.3 started with libwrap loadavg labeled-networking options compiled in.
12月 27 15:50:13 onecloud6681 xinetd[3786]: Started working: 0 available services


ssh执行service xinetd status 有两行红色提示,电脑端提示Scanner session connect failed.
求指教谢谢!@yz0515

本帖子中包含更多资源

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

×

点评

我从新刷机后也出现这个问题了 你那解决了么  详情 回复 发表于 2025-4-11 21:47
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2023-1-8 15:08 | 显示全部楼层
本帖最后由 muttertom 于 2023-1-8 15:10 编辑

和楼主同样的armbian系统,但是安装hplip时,提示缺少depends 无法继续进行下去,请楼主帮忙看看

The following packages have unmet dependencies:
hplip : Depends: python3-pexpect but it is not going to be installed
         Depends: python3-pil but it is not going to be installed
         Depends: python3-reportlab but it is not going to be installed
         Depends: python3 (< 3.6) but 3.7.3-1 is to be installed
         Depends: libsane (>= 1.0.24) but it is not going to be installed


只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2023-1-8 15:13 | 显示全部楼层
写的特别详细,我的hp 2055d也是这样配置的
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2023-3-21 19:27 | 显示全部楼层
楼主 请教一下  PC端这块 怎么操作, 我下载下来 wiasane-master。zip 好像不知道怎么使用
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2023-9-12 06:53 | 显示全部楼层
膜拜大佬,打印已经成功,参考其他教程,在4处修改的地方,还要改一个
# Show shared printers on the local network.
Browsing On

如果不修改电脑可以打印,手机不行,也发现不了网络打印机。
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2024-8-6 17:49 | 显示全部楼层
手里有一个玩客云,正好研究刷机,当无线打印机用。感谢楼主。
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2024-10-12 16:36 | 显示全部楼层
搞了三天没搞定扫描共享,突然发现端口监听到了ipv6上,用v4地址始终找不到扫描仪。nnd 把ipv6给禁用了,反正内网用不到。。。
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2024-11-8 18:47 | 显示全部楼层
折腾了好久,看了大神的教程终于搞定非常感谢/
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2025-1-1 18:05 | 显示全部楼层

苹果手机打印的时候没有A4纸选项,怎么弄

本帖子中包含更多资源

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

×
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2025-1-16 11:52 | 显示全部楼层
相当不错。。
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

发表于 2025-4-11 21:47 | 显示全部楼层
龙飞凤舞 发表于 2022-12-29 18:30
root@onecloud6681:~# service xinetd status
● xinetd.service - LSB: Starts or stops the xinetd daem ...

我从新刷机后也出现这个问题了 你那解决了么

点评

没有,已经换打印机了  详情 回复 发表于 2025-4-12 11:32
只谈技术、莫论政事!(点击见详情) | 互相尊重、友善交流、切勿过度反应、玻璃心。胡乱输入灌水等操作将会被封禁ID。
回复

使用道具 举报

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

本版积分规则

关闭

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

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

GMT+8, 2026-8-23 19:08

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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

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