简体   繁体   English

在Yocto上使用打印机

[英]Using printers on Yocto

Some days ago I decided to us Yocto for running my custom photo booth application on a Raspberry Pi. 几天前,我决定委托我们Yocto在Raspberry Pi上运行我的自定义照相亭应用程序。 Main reason why choosing Yocto was the lack of a recent QT version on Raspbian which was needed by some features. 选择Yocto的主要原因是缺少Raspbian上的最新QT版本,某些功能需要该版本。 Other solution didn't offer a hardware acceleration. 其他解决方案没有提供硬件加速。

After getting the most features running, I stopped at the problem getting the printer configured and running. 在运行了大多数功能之后,我停止了配置和运行打印机的问题。 Cups seems to be sane and running corrently. 杯子似乎很理智,并且运行顺畅。

My goal was, that the printer is set up at first login by a profile.d-script. 我的目标是,通过profile.d-script在首次登录时设置打印机。 I'm using the lpadmin command: 我正在使用lpadmin命令:

# Check to see if the printer is already installed
if [ `lpstat -p 2>&1 | grep -E 'CP910' -c || true` = "0" ]
then
    echo "Installing CP910"
    lpadmin -p CP910 -E -m /usr/share/cups/ppd/Canon_CP910.ppd -v usb://Canon/CP910?serial=C91xxxxxxx
    lpadmin -d CP910
    cupsenable
fi

I copied the PPD file from my Ubuntu computer. 我从Ubuntu计算机复制了PPD文件。 lpadmin issues no error. lpadmin不会发出错误。 lpstat -v lists my added printer. lpstat -v列出我添加的打印机。 The output of lpstat -v looks on both Ubuntu and Yocto the same. lpstat -v的输出在Ubuntu和Yocto上看起来相同。

When trying to print any file, the state stays at "sending data" and nothing happens. 当尝试打印任何文件时,状态停留在“正在发送数据”,并且什么也没有发生。

I have seen that there are cups-filters and drivers. 我已经看到有杯子过滤器和驱动器。 I haven't found any recipes for filters and drivers for Yocto. 我还没有找到Yocto过滤器和驱动程序的任何秘诀。 So I assume that everything is shipped with the CUPS recipt? 因此,我认为所有内容都随CUPS食谱一起运送了吗?

Besides CUPS also Gutenprint is needed. 除了CUPS,还需要Gutenprint。 Gutenprint provides the printer drivers. Gutenprint提供打印机驱动程序。 Without Gutenprint, CUPS can not connect to the printer. 没有Gutenprint,CUPS无法连接到打印机。 Yocto currently has no recipe for Gutenprint. Yocto目前没有Gutenprint的配方。 Maybe you are lucky and someone will write a recipe soon. 也许您很幸运,很快有人会写食谱。

The CP910 can print via Wifi. CP910可以通过Wifi打印。 Fortunately, there is a program that can start printing jobs via Wifi: https://github.com/saeugetier/go-selphy-cp 幸运的是,有一个程序可以通过Wifi开始打印作业: https : //github.com/saeugetier/go-selphy-cp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM