
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).
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".
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:
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
of Seoul, Korea
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.
Caveat: On some old motherboards, the built-in
LPT1 port becomes disabled if you boot up without
a monitor attached.
Caveat: For reasons still unknown, not all
motherboards will work with this Print Server.
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. ![]()
See this page on how to assign a different IP address to the Print Server.
Thanks to
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?
|
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 |
|
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. |
| 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: |
Create a boot
floppy
for
the Print Server:
|
|
(1) Install winzip
and winimage on your PC.
(2) For most users, download and
save this
image. (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. If you use 3C503
[IO set to 300, mem set
to
C800, IRQ=3], 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. (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. (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. (8) Trouble shooting
guide for LRP
Print Server, hopefully you don't even need it. |
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. Thanks to Darko Separovic of University of BC, Vancouver, Canada for the Vista driver tip.
Darko Separovic of Vancouver, BC Canada
When you meet the 5 conditions (LPRng, magicfilter,
printcap,
/var/spool/lpd/raw, /etc/lpd.conf), 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. Mac OS X:
Novell iPrint on Netware 6.5 works with print to port
9100. 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. Thanks to Michel Gutlich of Hogeschool Brabant in Netherlands on the Novell NDPS tips. ACORN
Computers with ARMS
processors and RiscOS: use JetDirectFS. |
Optional Advanced - 3 printers:
![]()
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.
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.
There is a security risk due to the unencrypted print
stream traffic passing
through the Internet.

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
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
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 ![]()
Last revision date: March 5, 2010
Added telnet server, ping,
reboot, and now responds to Ctrl-Alt-Del, also enabled bi-directional
mode.