Filosoft (Filodej's sandpit) home

WMU-6500FS - Print server installation

Note: this is just a slightly modified version of my original BlogSpot post. I have copied it here just to have some content to experiment with (test the rewrite from raw HTML to MarkDown).

Introduction

Since I have one LPT printer and several computers at home I considered buing a print server for a long time. What reliably discouraged me however was the price - for example HP print server price starts at around $140.

Unfortunately I haven't bought a router with USB ports like Asus WL-500W, but rather Linksys WRT54GL and so the printer sharing as described at DD-WRT wiki was not applicable in my case.

Then I noticed that there is a p910nd print daemon package available at the JoKer's site.

There was not much information about the installation on the Web and so I was pretty unsure but I decided to give it a try.

Note: Before you follow the steps I describe here, please, make sure your printer is compliant with the JetDirect technology.

Hardware installation

My HP LaserJet 1100 printer is not USB but LPT, so there is some USB to LPT reduction necessary.

I also realized that there is not a standard printer cable but rather a Mini Centronics cable used for the printer connection.

So it seemed that besides something like the USB to Parallel port adapter ($14) also another reduction like Centronics to Mini Centronics adapter ($11) was necessary (there is also a combo for $24 so you can spare a buck ;).

Since I already had a standard printer cable the best choice for me was the ST Lab U-370 Dongle. For only $11 does the job very well.

So that's it regarding to hardware installation.

Software installation

We download and install the p910nd print daemon (I use the 0.92 version as I had no luck with the latest version 0.93, I got a /var/lock/subsys/p9100d file not found error.

Edit: now the problem with 0.93 is solved, see the discussion below

box# cd /mnt/C
box# wget http://mgb111.pradnik.net/addons/servers-print/p910nd-0.92-081017.tar
box# tar xvf p910nd-0.92-081017.tar
./sys/
./sys/etc/
./sys/man/
./sys/man/man8/
./sys/man/man8/p910nd.8
./sys/sbin/
./sys/sbin/p910nd

Now we are ready to plug the printer to USB port (suppose you use the USB1 port specifically) and run the daemon:

box# /mnt/C/sys/sbin/p910nd -b -f /dev/usblp0

We can see that the process is now up and running. The fact that it is named p9100d (instead of original p910nd) means that it is listening at port 9100.

box# ps | grep p910
  271 root        284 S   /mnt/C/sys/sbin/p9100d -b -f /dev/usblp0
 1863 root        216 S   grep p910

We can make sure it is actually listening at the port; when we run the network statistics to list all the ports all the processes are are listening for, newly we can see the jetdirect port.

box# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
...
tcp        0      0 *:jetdirect             *:*                     LISTEN      
...

We can also look at the system log (with help of the dmesg command ). There we can find something similar to the following:

box# dmesg
...
hub.c: new USB device 00:0a.0-2, assigned address 2
printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
...

When we retrieve the description string of the USB device, we get that there is a IEEE-1284 (parallel communication) controller made by the Prolific Technology Inc..

box# cat /proc/printer/usblp0
Prolific Technology Inc. IEEE-1284 Controller
0x18

Note that in case you have a USB printer you should probably expect somewhat more meaningful string like

Hewlett-Packard HP LaserJet 1005 series

Now we are ready to try some printing:

box# echo "printer test" > /dev/usblp0 
...

Initially I got the following error message:

bash: /dev/usblp0: Device or resource busy

... then I realized that there is a mini-lpd process running holding the device.

mini-lpd is a small, non-queueing LPD implementation. I do not know why there is mini-lpd active on the box, I have not tried to make it work, I just killed it and used p910nd daemon instead:

box# killall mini-lpd

After that everything started to work.

To make the changes permanent, I have added add the following lines:

### printserv
killall mini-lpd
/mnt/C/sys/sbin/p910nd -b -f /dev/usblp0 &

to the /mnt/C/sys/etc/rc-local file.

Ok, that's it on the server side, let's look at the clients...

Client installation

Now it is time to install the print clients:

Windows XP

I presume you already have the printer installed locally, and so the only thing you need is to create a new port and set it up as a Standard TCP/IP Port:

Now you select the box IP or network name:

As a device type you choose the Hewlett Pacjkard Jet Direct:

Here is a result page (SNMP not supported, RAW protocol, port 9100):

Here we see the newly created port:

And finally we are ready to print test page:

Ubuntu 9.10

In menu System/Administration/Printing we choose to create a new printer and in device selection choose Network Printer and AppSocket/HP JetDirect. In Host and Port fields we fill the box IP or network name and as port we use 9100:

The next step is the Printer model and driver selection:

Now we can specify the printer name and description:

And finally we are ready to print test page:

Links

Fork me on GitHub