Raspberry Pi Printer Configuration

Raspberry Pi Printer Configuration

Preface:

Raspberry send end, the printer is connected through the USB port, to configure the printer, controlling the printer to print and scan functions.

This configuration of a printer uses HP

First, print a configuration

Configuration process

1. Drive OK

Since the determination using the HP printer at home, so enter HP's official website:

https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index

Query whether the printer driver supports Linux

2. Driver Installation

  • Raspberry Pi into the control window, run the following command:

sudo apt-get install hplip

China is best replaced by a mirror to download:

https://blog.csdn.net/la9998372/article/details/77886806

Note : after the change occurs the case where the source could not be installed automatically dependent package needs to be stretchreplaced buster, for example: deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpimodifydeb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi

  • Then run the command, will join pi user to the lpadmin :

sudo usermod -a -G lpadmin pi 
  • After a successful installation hplip-gui, the following command:

sudo apt-get install hplip-gui
  • After successful installation the following steps:

    • An input terminalhp-setup

    • In the pop-up window select Universal Serial Bus(USB)--->next

    • Select the printer, the printer is where I HP LaserJet MFP m227-m231choose it --->next

      • Note: If there is no printer, then plug USB cable with the printer

    • On the next screen, check Printer Setup--->Add Printer

      • Fax SetupFunction as a fax machine, do not check

    • Input box will pop up a user name and password, you can enter

    • So far success has been configured printer

  • Select the default printer, I was through 菜单栏-> Preference-> HPLIP Toolbox-> Printer Controlin the selected printer as the default printerSet as Default

    • If you do not set up successfully, restart it and then set that is

manual

  • lsusb: USB device connected View

  • CUPScommand:

    the lpstat
     - A # display reception status of the printer.
    - c # Display print classes.
    - the p-# display the print status: enabled or disabled.
    -s # displays the default printer, and one or more classes. Equivalent to -d, -c, and - V. Note that multiple options must be separated because the specified value can be a number of options.
    -s # display and printer devices.
  • lp: Print Command

    lp - P Specify the printer (if already set the default printer, you do not need to specify) file name 
    # EG: 
    lp ./Desktop/test.jpg

    More advanced instruction is not posted here

Second, the scanner configuration

install driver

  • Open a terminal run the following command:

 sudo apt-get install sane
 sudo hp-plugin

In operation sudo hp-plugincommand, prompted to enter the relevant y / n or the like;

NOTE: If circumstances arise such as the installation fails, you can go to the site to download plug-ins: https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

ps:

My installation failed, the question arises error: Unable to recieve Key from the keyserver , do not control select 'y' to continue the installation; after that accept the license, complete the installation;

Follow-up: from the table-driven websites whether HP support printing, there is Driver Plug-insuch a column, mentioned in the subsequent explanation:

8 ("Required") A downloadable driver plug-in is required for printing support. ("Optional") A downloadable driver plug-in is optional for printing support and may increase the speed, quality, or other aspect of printed output. ("No" or "None") A driver plug-in is not required nor available. Driver plug-ins are released under a proprietary (non-open) license and are not part of the HPLIP tarball release. For more information, please refer to this KB article

That is, if NO, then the driver plug-in is not required

  • Check the printer device

sudo sane- the Find - Scanner 
# information in the output, I can find such a bunch of information 
# found the USB Scanner (Vendor = 0x03f0 [the HP], Product = 0x642a [the MFP the HP LaserJet M227-M231]) AT libusb: 001 : 004

Use the command scanimage -Lto view specific scanner models

Scanned documents

# 1 plus the device name. 
Scanimage device name -d printer (available through the above-mentioned scanimage -L command)> address and the name of the output file 
# scanimage -d hpaio: / the USB / Serial HP_LaserJet_MFP_M227-M231 VNL3D12026 => ./? Desktop / test.jpg 
# -------------------------------------------- ---------------- # 
# 2 You can choose not to add the device name 
scanimage > path + filename 
# EG: scanimage > ./Desktop/scan.jpg

By scanimage --helpacquiring help change command, for example, set the scan size, format parameters

Reference Documents

print

https://blog.csdn.net/u012939880/article/details/93748342

https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index

https://blog.csdn.net/nullpointer2008/article/details/79664253

scanning

https://blog.csdn.net/wdkirchhoff/article/details/52536846

https://blog.csdn.net/wdkirchhoff/article/details/52536846

Guess you like

Origin www.cnblogs.com/zhuchengchao/p/11619790.html