9

I want to make my RasPi act as a little print and file server in a small home network consisting of three Linux clients. Unfortunately, Brother provides only binary drivers for x86, so I cannot run my Brother printer on the RasPi. However, I found a blog entry proposing to create a raw queue on the RasPi's CUPS install and access this queue from the clients using binary drivers installed on them. Here is the blog entry: http://chemdroid.net/en/raspberry-pi/36-raspberry-pi-as-print-server

Unfortunately, the author doesn't describe in much details how to create a raw queue on the RasPi and how to access it from the clients, instead he concentrates on describing the installation of a non-standard CUPS version on the RasPi.

I found a similar question here: CUPS bypassing interface However, I don't fully understand the answer. Does the "How to setup CUPS 'raw' queues" section in the answer there refer to the host (the RasPi)? If so, what is the socket/port that I have to specify? The printer is a Brother HL-2030, connected through USB.

When accessing the printer from the clients, the answer says how to edit the 'lp' command, however I want to use the shared printer through CUPS, so how do I proceed here?

Thanks for any input!

Photon

Photon
  • 287
  • 1
  • 2
  • 11

2 Answers2

12

[...] how to create a raw queue on the RasPi

  1. From the Pi (or an SSH/Putty session) add yourself to the lpadmin group

    sudo adduser $USER lpadmin

  2. Enable remote administration (or manually)

    sudo cupsctl --remote-admin

  3. Cycle CUPS to make sure it likes you

    sudo service cups restart -- OR -- sudo /etc/init.d/cups restart

  4. Navigate to http://localhost:631 (of if you don't have keyboard access: http://<ip_address_of_pi>:631 from another machine)

  5. Navigate to Administration, Add Printer

    a. When prompted to login, use your standard username and password.

    b. Note: If the password doesn't work, sudo reboot, try again.

  6. AppSocket/HP JetDirect, then:

    a. Network Attached: socket://<ip_of_printer>:9100

    b. USB Attached: socket://<usb_handle> find using lpinfo -v |grep usb:, you don't need the "? location=1a200000" information. Assumes proper driver is installed first. Note, if your device driver isn't offered for ARM architecture, see this article.

  7. Make: Raw (NOT Generic)

  8. Name It, Share It, Continue
  9. Go back to CUPS Administration page at http://localhost:631 a. Enable printer sharing via:

    .[X] Share printers connected to this system

    . [X] Allow printing from the internet

[...] how to access it from the clients

This varies greatly between platforms.

  1. The general URL format is: http://<ip_of_pi>:631/printers/<name_used_in_step_8_above>

    a. Windows: Devices and Printers, Add Printer (NOT Add Device, it's in the toolbar), Manually Select/Not Listed, Local or Network Printer with Manual Settings, Create a new port, Standard TCP/IP Port

    b. MacOS: Enable, then use the CUPS web interface. The GUI can't do it. You'll need to be in admin group and know your user id (e.g. echo $USER)

    c. Linux: Using the GUI or CUPS, Network Printer, AppSocket/HP JetDirect

tresf
  • 7,103
  • 6
  • 40
  • 101
  • Thanks for the reply! In the mean time I solved the problem by using this howto: https://www.lhinderberger.de/pi/2016/01/27/raspberry-pi-binary-x86-drivers.html – Photon Aug 16 '16 at 20:14
  • @Photon Thanks for the followup. I've added your link to the driver section. – tresf Aug 18 '16 at 01:55
  • 3
    Many Thanks For "Make: Raw (NOT Generic)" – 5f0f5 Dec 19 '16 at 16:45
  • Bad news - Michael Sweet (CUPS [Apple] developer) has stated that RAW printer support will be removed in a future version, as well as support for PPD files. He's only wanting to support printers newer than 2010. If your printer doesn't support IPP v2.0, you'll need to write your own IPP v2.0 to RAW shim for it. Source: https://github.com/apple/cups/issues/5271 – The Dude Dec 21 '18 at 20:18
  • 1
    @TheDude thanks for sharing. I've been actively engaging with Michael Sweet on that same thread and the end solution/replacement for RAW on Linux/Unix hasn't yet been announced. – tresf Dec 22 '18 at 03:55
  • 1
    @tresf Thank you. I hope that something can be worked out. I've happily been using RAW printers on CUPS since the late 90s. – The Dude Dec 28 '18 at 16:25
0

I know it is a bit outdated, but I tried the same thing and ran into a problem: What is said above is correct, but I found out that the HL-2030 did not work in my setup with the Gutenprint driver. I needed to install the foomatic drivers

sudo apt-get install foomatic-filters foomatic-db-engine

Then choose the

Brother HL-2030 Foomatic/hl1250 (recommended)

from the list of printers in the web interface. And everything worked fine.

MiB_Coder
  • 865
  • 1
  • 7
  • 20
  • Looks like Brother offers binary drivers for ARM architectures now, so no hacks like running the driver from the client are necessary. At least it works for the Brother HL-L2300D, don't know about older models like the HL-2030. – Photon Mar 26 '19 at 11:41