How to convert an old PC (386 or 486 or Pentium) to a Network Print Server
(based on the Linux Router Project)

g

g Dedicated server hosting

This tutorial demonstrates how to build a low cost, stand-alone, professional quality
Network Print Server
for a local area network. It uses the industry standard
Raw Socket API, a trend set by Hewlett Packard's JetDirect and JetDirectEX print servers;
also called "raw socket printing" (tcp port 9100). JetDirect is used in Hewlett Packard's, Xerox's, Lexmark's
business-grade network printers. Most business-grade network printers on the market today support the
Raw Socket (tcp port 9100) printing. Microsoft calls this "Standard TCP/IP port printing" (Windows 2000 and up).
This method of sharing a printer is much more elegant than the "Samba print sharing method"
because it can handle multiple OS, it can easily punch through routers and firewalls over wide area networks,
and it can be easily encapsulated (tunneled) under the strong cryptographic encryption of openssh or openvpn
for highly secure remote printing to remote offices.

This print server is 100% compatible with Windows 2000/XP native print facility.
(Microsoft calls it the Standard TCP/IP port for Windows 2000 and Windows XP).

g Brother 2070N and Dell 1720 printers are factory equipped with a print server ("network ready") that can handle TCP port 9100 raw socket printing! We will see more manufacturers following Brother Industry's leadership by making "affordable" printers with built-in "Ethernet network interface". g
Samsung now has an affordable "network ready" printer, they are models ML-2571N and ML-3051N
Okidata now has C3400N colour LED printer is also "network ready".
When this market segment fully matures, there is no need for this print server project.

Many printers (with parallel connections) are reported to work with this LRP Print Server.

Caveat Emptor:

g Caveat: Some very low cost printers are "Windows only" (alias Host-based Printers or GDI printers),
they do not work with any print servers. For example, HP1020 is a GDI printer which will not work with this print server.
Some Samsung Inkjet printers are GDI. Thanks to g of  Seoul, Korea Korea

g Caveat: USB printers are not supported, if you absolutely need it, install a modern Linux and tweak it.
See this page on how to make a USB print server using a standard Linux distribution.

g Caveat: On some old motherboards, the built-in LPT1 port becomes disabled if you boot up without
a monitor attached.

g Caveat: For reasons still unknown, not all motherboards will work with this Print Server.

g Caveat: For some old 486, they have the LPT port coming from the VESA board (the board length is 9 inch),
the behaviour of the LPT port under such condition is rather unpredictable and unreliable.

The Print Server presented here uses a static IP address of  192.168.1.252 (should work with popular Linksys routers)
If your internal network is not 192.168.1.xx (click here to find out your internal network numbers),
the boot floppy may take 5 minutes to boot up and apparently hangs in syslogd. g

See this page on how to assign a different IP address to the Print Server.

Thanks to g Michal Fraszek of Poland who contributed to a patch in /etc/init.d/syslogd which solved the 5 minutes apparent hang problem.
The fix is to edit  /etc/init.d/sysklogd:
RCDLINKS="0,K16 1,K16 2,S00 3,S00 4,S00 5,S00 6,K16" becomes
RCDLINKS="0,K16 1,K16 S,S00 6,K16"

If the PC has more than one LPT port, this Print Server software can handle up to a maximum
of  3 parallel printers. In practice, it is more practical to use 2 LPT ports, since it is easy to find
an old computer already with a built-in LPT1 port and add an abandoned "multi-IO" card and configure
the abandoned multi-IO card's printer port as LPT2 port.

This implementation operates in bi-directional mode,
i.e., the printer status is sent back to the client printer driver.

This Print Server is practically free.
For example, if you are planning to buy a HP4100N network printer for use in a SOHO network,
you can buy a cheaper HP4100 instead. Add a Print Sever to make the HP4100 "network capable"
and achieve a savings of US $400. See this diagram.

However, if you work for large corporations, or VC-backed firms, or governments,
don't try to build something useful like these to save money.
Your job is to spend lots of money to make you look important.

Naturally, the client computers should have the TCP/IP protocol. Commercial print servers can handle
LPD (RFC1179), IPX/SPX, DLC/LLC, LAT, Ethertalk, Appletalk, NETBEUI, NETBIOS and
applications like telnet, ftp tftp, http and flash ROM upgrade.
Unless you work in a legacy, heavy-iron mainframe IT shop, do you really want or need all these legacy protocols?

Disclaimer

g Hardware:
A 386 or 486 or Pentium PC with 8 meg RAM and one or more parallel ports.
This Print Server runs entirely on a g floppy disk, hard disk is not needed.
g Ethernet network adapter card
An old, obsolete, abandoned, 10 Mbps network card is perfect for this project.
e.g. an abandoned 3COM 3c509 or 3c905 or an old version Realtek 8139 chipset card is perfect for this project. g
 
Preparation Step:
If you use PCI card, you can skip this preparation step and jump to here.
If you use ISA card, you need to set up your network card
ISA network
card

ISA network card setup:

See this page on how to set up ISA network card:

http://pigtail.net/LRP/index.html#isa-card
 

Create a boot floppy g for the Print Server:

g

(1) Install winzip and winimage on your PC.

(2) For most users, download and save this image.
(2a) If you want the print server to be accessible by users from outside your home network, add port-forwarding at the home firewall to port forward TCP port 9100 to the IP address of the print server. (D-Link calls port-forwarding "virtual servers")
(2b) If you have a 486SX CPU which lacks a math co-processor, download and save this image
(2c) If you have a 386DX-40 CPU, download and save this image. Thanks to Piotr Madanecki of Gdansk, Poland for confirming this image works. See his setup.

(3a) Download the appropriate network card driver [called modules.lrp]:

Note: the following modules.lrp are similar to, but not the same as those used in the LRP firewall.
(The difference is that all ip_masq modules are deleted. You don't need ip_masq functionality in a print server).

If you use 3C503 [IO set to 300, mem set to C800, IRQ=3], download and save this file.
If you use 3C507, download and save this file.
If you use 3C509 (ISA), g download and save this file.
If you use 3C515 (ISA), try this. 3C515 is not suitable for this project.
If you use 3C590 or 3C900 or 3C905 (PCI) g, download and save this file.
If you use AMD PCNet32 g (typically found on Compaq Deskpro motherboards), download and save this file.
If you use NE2000 (ISA) clones, download and save this file.
If you use NE2000 (PCI) clones, download and save this file.
If you use Realtek 8029 based PCI cards, download and save this file.
If you use Realtek 8019-based ISA cards, download and save this file.
If you use Intel ISA EtherExpress 16, download and save this file.
If you use Intel Pro/10 or Pro/10+ ISA, download and save this file.
If you use Intel Pro/10 PCI, download and save this file.
If you use Intel Pro/100, Pro/10+ PCI, download and save this file
If you use Intel Pro/1000 (gige), download and save this file.
If you use Realtek 8139 based cards, g download and save this file.
Recent versions of Realtek 8139D chipset will not work here.
There are no Linux 2.2 kernel drivers for Realtek 8139D chipset.
If you use Kingston KNE120, download and save this file.
If you use CNET Pro200 Davicom DM9100 chipset, download and save this file
If you use SMC 1211TX or SMC 1244 TX, download and save this file.
If you use D-Link DFE-530TX (via-rhine chipset), download and save this file.
If you use D-Link DFE-THX530+ (8139 chipset), download and save this file.
If you use Linksys LNE100TX, download and save this file.
If you use card with Tulip chipset, download and save this file.
If you use card with old Tulip chipset, download and save this file.
If you use Kingston KNE40 or KNE100, download and save this file.
If you use US Robotics USR7900 card, download and save this file.
If you use Broadcom 4401 chipset, download and save this file
If you use Sohoware SFA110 card, download and save this file.
If you use SMC EtherPower SMC 8432, download and save this file.
If you use D-Link DFE-550TX (Sundance chip), download and save this file.
If you use SMC EtherEZ SMC 8416, download and save this file.
If you use SMC EtherPower II (SMC 9432), download and save this file.
If you use Asound Myson 800 (mtd803, mtd891), download and save this.
If you use Netgear FA311 [National Semi DP83815 chip], download this file.
If you use Netgear FA311 [Realtek 8139 chip], download and save this file.
If you use Netgear FA310 TX g [Tulip chipset], download and save this file.
If you use Western Digital 8003/8013 (SMC 8013), download and save this file.
If you use NE2100, download and save this file.
If you use cards that use National Semiconductor DP83820, download and save this file.
If you use Realtek RTL8169 chipset (gige), download and save this file.

(3b) Invoke winimage, drag and drop the printsrv image in it. Then drag and drop the correct modules.lrp into the winimage window. The winimage windows should look like this. Save your newly assembled image [click File Save].

(3c) If your network is not 192.168.1.x, then you need to replace etc.lrp on the floppy. See this page on how to replace etc.lrp

(4) Insert a new, high-quality floppy disk in drive A.
Click Disk...Write to create a Print Server boot-floppy.
The floppy generated is in a standard 1.4M format.

(5) Connect a parallel printer cable to the parallel port of the PC. Do not use a parallel cable longer than 6 ft. (2 meters) or you might run into troubles.
Connect a network cable from print server to the hub/switch of your local area network.
Insert the Print Server floppy g

(6) Power up the print server. At the end of the boot up sequence, the print server will beep 3 times to let you know it is ready to accept print jobs.

(7) Now everyone on your local area network [and around the world, if you choose to] can send print jobs to your printer. g  g 

(8) g If you want to change the settings of the print server, you can login as root (using keyboard or telnet).
Where to find telnet client:
Windows users please download and use putty as your telnet client,
or you can use Windows' built-in telnet client:
click Start....Run... telnet   -t   vt100   192.168.1.252

Disclaimer

Trouble shooting guide for LRP Print Server, hopefully you don't even need it.

  g If you want the print server to boot from a hard disk, see this page.

There are two modes of network printing (both work equally well,  see this diagram).
(1) "peer-to-peer mode", suitable for small offices where there are no servers.
(2) "client-server mode", where a server talks to the print server on port 9100,
the PC users talk to the server using the "normal" Windows network printing method.
(the very familiar Add... Printer...Network Printer routine).

If you want to send (dump) a print file or plot file directly to the network printer without going
through any Windows program or Windows driver or Windows print monitor, see this page.

How to setup a client PC to talk to a Print Server.
Have the appropriate "printer driver" ready, either on a floppy, or on a hard disk, or on a network shared drive. If your printer model is not included in Windows' default list, use the "Have Disk" method. In some situations, you may have to install the printer driver first as if it were hooked up directly to a LPT port.

g Windows Vista:
Click Start .. Control Panel, .. Printers, ..Add Printer, .. Add Local Printer, ..Create a new port, .. Standard TCP/IP port, .. Next, .. Device type TCP/IP device, Hostname or IP address = 192.168.1.252  ... port name=PrintSrv, .. check off  "Query the printer and automatically select the driver to use", wait while detecting, .. Custom, .. Settings, .. Raw, .. Port 9100, .. Next, .. select the driver, .. Next, .. Print a test page.

Thanks to Darko Separovic of University of BC, Vancouver, Canada for the Vista driver tip.

gWindows XP:
Click Start.. (Control Panel).. Printers and Faxes...Add Printer...Local Printer...(check off Auto Detect PnP)...Next....Create new port...Standard TCP/IP port...
IP address = 192.168.1.252, port name=PrintSrv, Custom, Settings.. Raw.. Port 9100

g Windows 2000 (method A)
Click Start...Settings, Printers, Add Printers, Local Printer, Create New Port,
Choose Standard TCP/IP port,
IP address = 192.168.1.252, port name=PrintSrv, Custom, Settings.. Raw.. Port 9100

g Windows 2000 (method B)
First, install AXIS Print Monitor.
Click Start...Settings, Printers, Add Printers, Local Printer, Create New Port,
Choose AXIS port, choose RAW TCP/IP port,
IP address = 192.168.1.252, port number = 9100

g Windows 2000 quirks
Sometimes the printer driver becomes corrupted, if that happens, delete the printer driver by re-installing the same printer driver on the LPT1 (local) port. Then repeat method A or method B above. Thanks to Hillie Sample of Ottawa, Canada g for this tips.

g Windows NT:
First, install AXIS Print Monitor.
Start...Settings, Printers, Add Printers, "My Computer", Add Port,
Choose AXIS port, choose RAW TCP/IP port, click OK,
IP address = 192.168.1.252, port number = 9100

g Windows 98/ME: (pain+)
First, install AXIS Print Monitor.
Second, click Start...Settings, Printers, Add Printers, Local Printer, choose TCP/IP AXIS port.
(Windows 98 will ask for the Windows 98 CD, unless c:\windows\options\cabs  is intact).
Third, right click on the new printer icon, choose Properties, Details, Add Port, click Other,
choose AXIS port, click OK, choose RAW (TCP/IP), click OK,
IP address = 192.168.1.252, port number = 9100, click Apply, click OK
(caution: AXIS defaults to port 9900, you must change it to port 9100)

g Windows 95 (pain++)
First, install AXIS Print Monitor.
Click Start...Settings...Printers Add Printers ... Local Printer .. install the printer driver on LPT1.
(Windows 95 will ask for the Windows 95 CD, unless c:\windows\options\cabs is intact)
Right click the Printer Icon, choose Properties, Details...Add Port,  click Other,
choose AXIS port, click OK, choose RAW (TCP/IP), click OK,
IP address = 192.168.1.252, port number = 9100
Click OK until you are back to the correct Printer Icon, right click,  Properties, Details,
At the "Print to the Following Port" drop-down box, choose
"192.168.1.250_9100 AXIS Port", click OK.

g Linux with CUPS: (easy)
Alan Lythaby of UK reported that Linux running CUPS works with this print server.
Use the Add printer "wizard", Device="Appsocket/HP JetDirect",
socket://192.168.1.252:9100

g Ubuntu using HP JetDirect and CUPS:
In System/Administration/Printing --> add new printer --> Network Printer --> HP JetDirect, enter IP address and port 9100, choose cups driver to suit.
Thanks to Grant Galbraith of Mittagong, Australia for this.

gMandrake 9.0, 9.1, 9.2 with CUPS: (easy)
Herve Delmas of Montréal, Québec Canada canada reported that he used printerdrake to configure the printer. See this screen shot.

Darko Separovic of Vancouver, BC Canada g :
Open Mandrake Control Center-System configuration tool, click on "Hardware", "Printer Drake", "Add new printer", "Network Printer TCP/Socket", OK, "Is your printer a multi-function device...", say NO, enter Name, Description, and Location info (this is information for users), OK, select the printer from a list of printers, OK, select printer default settings (letter, mode, duplex...), OK, select Yes if this is a default printer, print a test page if you want to. See these screen shots by Darko.

gLinux with lpr: (maximal pain+++)
(Assuming you have a PCL5-language printer, most laser printers are PCL5 capable)
The most painless method is upgrade your 20-year old BSD lpr to LPRng , install magicfilter
(or other suitable printcap filters), create a new entry in /etc/printcap like below, create a directory
/var/spool/lpd/raw, make sure that /etc/lpd.conf has a line called   force_localhost@

raw:
  : sd=/var/spool/lpd/raw  : lp=192.168.1.252%9100 : lpr_bounce
  : if=/etc/magicfilter/laserjet-filter  : sh   : mx#0

When you meet the 5 conditions (LPRng, magicfilter, printcap, /var/spool/lpd/raw, /etc/lpd.conf),
you can print from a Linux box to your network-enabled printer, e.g.,
lpr -Praw  sometext.txt
lpr -Praw  fancygraphics.pdf
lpr -Praw  mydoc.ps
man -t cp | lpr -Praw   (format and printout the man page 'cp') (beware, some man pages are long)

If you are absolutely stuck on using the old BSD RFC1179 printing system, use this module lpd.lrp but you have to mess with /etc/printcap and /etc/hosts.lpd on the floppy. The filter on the floppy print system is not working; if you can train the Linux desktop to use printcap's filter on-board before sending the job off to the lpd print server, then it may work.
If you have no success in messing with /etc/printcap and /etc/hosts.lpd to work with the floppy LPD print system, netcat or this perl script will send a raw file from stdin to raw port 9100

Mac OS X:
(first, install ghostscript and ppd driver available at linuxprinting.org, if necessary )
Add printer --> IP Printing --> Printer Type --> Socket/HP JetDirect, enter IP address, choose driver from list.
Thanks to Grant Galbraith of Mittagong, Australia for this.

g 

Novell iPrint on Netware 6.5 works with print to port 9100.
Thanks to Andrew Grant, Rhodes University, Grahamstown, South Africa

Novell NDPS server/broker environment - port 9100 does not work. Use lpd. Delete p9100.lrp from the floppy, add lpd.lrp, modify syslinux.cfg accordingly. For your convenience, simply use this image. Add the appropriate network card driver (modules.lrp), see above.
After the print server boots up (wait for the 3 beeps),
ae  /etc/hosts.lpd
and mention EVERY ip address g or host that needs to access this print server. ctrl-s to save the file.
ae /etc/printcap and add the following 2 lines:
:ff=:\
:sf=:\
type lrcfg and choose backup, then choose (2) etc

Thanks to Michel Gutlich of Hogeschool Brabant in Netherlands on the Novell NDPS tips.

ACORN Computers with ARMS processors and RiscOS: use JetDirectFS.
Thanks to Alan Lythaby of UK confirming that ACORN works with this print server.


Optional Advanced - 3 printers:  g

This Print Server can handle 3 parallel printers if your PC has 3 LPT ports.
PC industry calls the parallel physical ports (25-pin connectors) LPT1, LPT2 and LPT3.
If you need to add parallel ports, use Lava Computer MFG (Toronto) Lava Parallel ISA cards.
Parallel PCI cards
from Lava Computer MFG (Toronto) also work well with this print server.
  Be sure to use short printer cables because the drive current of these cards are somewhat limited.

On the users' computer, set their printers to print to
192.168.1.252 port 9100
for the printer attached to LPT1,
192.168.1.252 port 9101
for the printer attached to LPT2,
192.168.1.252 port 9102
for the printer attached to LPT3

In a typical multi-printer environment, this ultra low-cost Print Server driving 3 office printers
performs like a 3-port commercial print server costing several hundred dollars.

In an typical PC with two paralle ports,
LPT1 should be at IO=378 (IRQ=7)
LPT2 should be at IO=278 (IRQ=5)

In a fully loaded PC and properly configured (jumpered) ISA paralle port cards,
LPT1 should be at IO=3BC, (IRQ=7)
LPT2 should be at IO=378 (IRQ=7)
LPT3 should be at IO=278 (IRQ=5)

On some motherboards with strange BIOS, the built-in LPT1 port becomes disabled
if you boot up without a monitor attached. You normally want to run the print server without a monitor attached.
The "multi-function I/O" cards made in the early-90's use IO address of 378 or 278.
IRQs on the LPT ports are not important because the Linux kernel here uses "polling" method,
i.e. it ignores IRQ, it is still a good idea to avoid IRQ conflicts between LPT1 and LPT2.

Disclaimer


Optional Advanced: 
Remote Printing

If you port-forward port 9100 to 192.168.1.252 on your firewalls, and let you imaginations soar,
you can do the unthinkable: send print jobs from anywhere to any printer on the Internet.
g There is a security risk due to the unencrypted print stream traffic passing through the Internet.

Disclaimer


g
Being able to print from wherever you are in the world is great. How about being able to see what's happening at your home while you are at the office or halfway around the world? That's where a security camera system comes in to help. With the right CCTV camera system and a DVR card you can be sure of what's going on at your home, besides printing documents to your home printer.


kernel needs to be compiled with parallel port support and printer support, 
parport.o
, parport_pc.o and lp.o should be loaded in the /lib/modules directory.
See the kernel hack required.

For Bering-uClibc, use the following package since the library is different.
http://leaf.sourceforge.net/packages/uclibc-0.9/20/p9100.lrp
Thanks to Andry of London, Ontaio Canada canada for the above information.
You need to add the parport, parport_pc and lp kernel modules.
Thanks to Johan Nyberg, Södertälje, Sweden for the above information.

Disclaimer

License


References:
BSD lpr / LPD protocol RFC1179
LPRng howto
Magicfilter
Hacks that need to be done to adopt p9100 to a LRP box
How to add the 3 beeps at the boot up time.

Here is a Unix style manual of p910nd

Acknowledgements
Ken Yap of Australia is the author of the source code p910nd
his code is the critical piece of source code for this print server.
Current version of p9100 on this webpage is 0.7  
Although newer versions of p910nd are available, they won't be compiled into this print server implementation.

© 2002-2010  Nicholas Fong
Burnaby, B.C. Canada g

Last revision date: March 5, 2010
Added telnet server, ping, reboot, and now responds to Ctrl-Alt-Del, also enabled bi-directional mode.