本帖最后由 zhaocz 于 2015-10-6 21:42 编辑
这几天有点空,手贱把当打印服务器的x86 openwrt从BB升到了CC,搞一了堆问题。。不知道ar71xx会不会也这样的情况呢。
话说我的HP M1005的一体机,打印功能在BB下是正常的,用的是p910nd的方式。升到CC后,竟然发现安装成功了,无法打印,不知道什么原因,打印机显示正在打印,就死在那里了。
无奈只得使用CUPS,不看不知道,一看吓死人,CC没有oldpackge的目录了,只能从BB里面一个个找过来,手工下载,还好硬盘空间足,随便下。
机器重启,下载的文件全丢了,这里凭记忆写一点了,希望有谁用得到。
大概是openwrt的wiki上说明的那样几个文件:http://wiki.openwrt.org/doc/howto/cups.serverRequired Packages
Server (OpenWrt)[td]Name | Version | Size in Bytes | Description | cups | 1.4.4-1 | 2 217 619 | A printer spooling system for devices with USB or LP support. | zlib | 1.2.5-1 | 39 388 | Library implementing the deflate compression method | libpthread | 0.9.32-65 | 30 717 | POSIX thread library | libpng | 1.2.44-1 | 128 723 | A PNG format files handling library | libjpeg | 6b-1 | 61 963 | The Independent JPEG Group's JPEG runtime library | libstdcpp | 4.3.3+cs-65 | 232 642 | GNU Standard C++ Library v3 | cups-bjnp | 0.5.4-1 | 11 293 | (optional) Description: CUPS backend for the canon printers using the proprietary USB over IP BJNP protocol. This backend allows Cups to print over the network to a Canon printer. It currently supports Cups 1.2 and Cups 1.3 and is designed by reverse engineering. |
另外cpus里还要手工安装几个ppd文件,这是打印机描述的文件,相当于各种打印机描述文件,还有libcupsdriver。另外这里有个坑:有个lib版本不对,提示需要0.6.2,但我们安装的是0.9了,要去lib目录下做个软链接就可以启动cups服务器。
进入cups网页后,发现刷不出打印机来还有wiki上说的几个问题USB printers notes and throubleshootingBackfire: There may be a problem interfacing with USB printers if usb-printers kernel module is also loaded. These conflict with the cups-provided USB support. There are plenty of bugs and one working solution is as follows: - Remove usblp support: opkg remove kmod-usb-printer
- Edit user and group in /etc/cups/cupsd.conf from User Nobody/Group Nogroup to User root/Group root
- Change ACL on /usr/lib/cups/backend/usb to 700 (chmod 700 /usr/lib/cups/backend/usb). This changes the behaviour of cups, which normally tries to execute the backend through a user account other than root. This forces the backend to run as root from cups.
- Finally, it should be possible to add printers through the web page http://host:631/admin or manually. The USB device name cannot be displayed through lpinfo but can instead be listed by running /usr/lib/cups/backend/usb as root.
我因为是装过p910nd的,里面也有kmod-usb-printer,除了1以外,随便把3也做了,这样如4所说,cups的后端以root运行后,肯定能刷出打印机来。
最后,终于刷出了打印机,打印测试成功!
另外sane在这台一体机上用起来不爽,虽然说是支持的很好了,可客户端太烂,另外扫描的文档,会出现黄色的位置偏移,很难受,效果根本没有自带的好。不知道USBIP能不能解决这个问题?
|