User Tools

Site Tools


docs:guide-user:services:print_server:p910ndprinterserver

p910nd Print Server

p910nd is a small printer daemon intended for diskless platforms that does not spool to disk but passes the job directly to the printer. Normally a lpr daemon on a spooling host connects to it with a TCP connection on port 910n (where n=0, 1, or 2 for lp0, 1 and 2 respectively). p910nd is particularly useful for diskless platforms. Common Unix Printing System (CUPS) supports this protocol, it's called the AppSocket protocol and has the scheme

socket://remotehost:PORT

Windows and Mac Os X (via CUPS) also supports this protocol.

In this guide I show you how to enable printing support for HP M1120 and Canon MP480 printer.

Install software on LEDE device

  • SSH into device, e.g. ssh 192.168.1.1
  • Enter “root” as username and supply with password
  • Update OpenWrt software packages:
    root@LEDE:~# opkg update
  • Install Kernel modules for USB Printer support:
    root@LEDE:~# opkg install kmod-usb-printer
  • Install printer server:
    root@LEDE:~# opkg install p910nd luci-app-p910nd

Configure print server p910nd

  1. Check if your printer is recognized:
    root@LEDE:~# ls /dev/usb/lp*
    /dev/usb/lp0
  2. We can continue with configuring in Servicesp910nd - Printer server:

    The screenshot speaks for itself: Check enable, set Device address and check/uncheck Bidirectional mode. Bidirectional mode depends on your router. On my HP printer I leave it enabled, on my Canon I must disable, else printing is not working.
  3. You can add additional printers, but don't forget to set address of the new printer and set another port:

Configure clients

Windows

First, install drivers for your printer.

  1. Add a local printer:
  2. Create a new Standard TCP/IP port for the printer:
  3. Enter IP Address for the printer: e.g.: 192.168.1.1
  4. Specify additional information for the connection:
  5. Choose “Raw” protocol and set port number. e.g.: 9100
  6. Pick a suitable printer driver:
  7. You may try to print a test page to the printer.

Mac OS X Sierra

First, try configure your printer via System Preferences:

  1. Printers → + (Add Printer) → IP tab:

    Address: 192.168.1.1:9101 or socket://192.168.1.1:9101
    Protocol: HP Jetdirect - Socket
    Name: any name
    Use: Select Software... and select your printer.
  2. Done. Try with a test print.

This method has worked for me with a HP M1120 printer, but it failed with my Canon MP480 (Error: unable to communicate with printer). So I added manually.

Manual method

  1. Open Terminal and enable CUPS Web Interface: paste in 'cupsctl WebInterface=yes' and click enter.
  2. Now you should be able to go to http://localhost:631/:
  3. Click on Adding Printers and Classes in the center and on Add Printer. Log in with your system username/password. Select AppSocket/HP JetDirect and click on Continue.
  4. In the Connection field type
    socket://yourLEDEipaddress:9100

    (where yourLEDEipaddress is the IP address of your router and PORT is what you configured earlier). Click on Continue.

  5. On the next page type any printer name and click on Continue:
  6. On the final page select your printer's manufacturer and model. Finally, click on Add Printer.
  7. You are done, try it with a test print.
docs/guide-user/services/print_server/p910ndprinterserver.txt · Last modified: 2018/03/03 20:19 by bobafetthotmail