JetDirectServer
1. Introduction
2. p910nd
2.1 Identify the printer device
2.2 Install p910d
2.3 Configure p910nd
3. Client Setup
Introduction
I have an NSLU2 running Ubuntu Jaunty 9.04, it is responsible for serving DHCP and DNS in the house. I also wanted to turn it into a printer server but CUPS and LPRng RAM requirements are too much for the little NSLU2. However, I recently found p910nd and print serving utopia was just around the corner.p910nd
p910nd is a small printer daemon that does not spool to disk but passes the job directly to the printer. It is particularly useful for disk less Linux workstations and embedded devices that have a printer hanging off them. Sounds ideal for my NSLU2 :-) 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). Common Unix Printing System (CUPS) supports this protocol, it's called the AppSocket protocol and has the scheme socket://. LPRng also supports this protocol. I believe this protocol is also known as HP JetDirect in some circles ;-)Identify the printer device
Plug the printer into one of the NSLU2 USB ports and then query 'dmesg' to find out which device the printer is connected via.dmesg | grep usblpYou'll get output something like this.
usblp0: USB Bidirectional printer dev 3 if 1 alt 0 proto 2 vid 0x04B8 pid 0x0803 usbcore: registered new interface driver usblpSo my printer is on device 'usblp0' which corresponds to '/dev/usb/lp0'.
Install p910d
Packages for p910nd don't exist for Ubuntu version prior to Ubuntu Karmic 9.10. But I have used the Karmic armel build of p910nd on my NLSU2 running Ubuntu Jaunty 9.04 without issue. Download and install the p910nd package.wget -c https://launchpad.net/ubuntu/+source/p910nd/0.93-1/+build/978744/+files/p910nd_0.93-1_armel.deb sudo dpkg -i p910nd_0.93-1_armel.deb sudo mkdir -p /var/lock/p910nd
Configure p910nd
By default p910nd will look for the printer devices under '/dev', but the NSLU2 (obviously) has them under '/dev/usb'. Take a look.ls -l /dev/usbEdit the p910nd default settings.
nano /etc/default/p910ndFind the following...
P910ND_OPTS=""...and chane it to...
P910ND_OPTS="-f /dev/usb/lp0"By default the p910nd daemon is set to not start via the init script, lets change that. Find the following...
P910ND_START=0...and change it to...
P910ND_START=1Now start the p910nd daemon.
sudo /etc/init.d/p910nd startThat's it p910nd is ready to receive print jobs.
Client Setup
Configuration of clients is straightforward. From a Ubuntu workstation, printer configuration uses a device URI of:- socket://yourserver:9100
$Id: JetDirectServer,v 1.3 2009/12/19 11:27:16 martin Exp $
Wiki Index All Recent Edit Top


