Ppf

From M1Research

(Difference between revisions)
Jump to: navigation, search
(Downloads)
 
(6 intermediate revisions not shown)
Line 13: Line 13:
=== Downloads ===
=== Downloads ===
Version 0.1-alpha:
Version 0.1-alpha:
-
*Source download: ppf-0.1-alpha.tar.bz2
+
*Source download: [{{SERVER}}/downloads/ppf/ppf-0.1-alpha.tar.bz2 ppf-0.1-alpha.tar.bz2]
-
*Precompiled binary: ppf-0.1-alpha.fc1.bz2
+
*Precompiled binary: [{{SERVER}}/downloads/ppf/ppf-0.1-alpha.fc1.bz2 ppf-0.1-alpha.fc1.bz2]
=== Installation ===
=== Installation ===
Line 76: Line 76:
*1. LTSP project - [[http://www.ltsp.org http://www.ltsp.org]]
*1. LTSP project - [[http://www.ltsp.org http://www.ltsp.org]]
-
*2. Russian LTSP project - [[http://www.ltsp.ru|http://www.ltsp.ru]]
+
*2. Russian LTSP project - [[http://www.ltsp.ru http://www.ltsp.ru]]
-
*3. General Public Licence - [[http://www.gnu.org/licenses/gpl.txt|http://www.gnu.org/licenses/gpl.txt]]
+
*3. General Public Licence - [[http://www.gnu.org/licenses/gpl.txt http://www.gnu.org/licenses/gpl.txt]]
-
*4. Bog Boss articles: [[http://www.bog.pp.ru/work/network_printer.html|network printing]]
+
*4. Bog Boss articles: [[http://www.bog.pp.ru/work/network_printer.html network printing]]
-
*5. Printer MIB - [[http://ietf.org/rfc/rfc1759.txt|http://ietf.org/rfc/rfc1759.txt]]
+
*5. Printer MIB - [[http://ietf.org/rfc/rfc1759.txt http://ietf.org/rfc/rfc1759.txt]]
-
*6. CUPS - [[http://www.cups.org|http://www.cups.org]]
+
*6. CUPS - [[http://www.cups.org http://www.cups.org]]
=== Licence ===
=== Licence ===
-
<code>
+
<pre>
     Printer Port Forwarder
     Printer Port Forwarder
     (gateway between USB (or LPT) printer and TCP/9100 port)
     (gateway between USB (or LPT) printer and TCP/9100 port)
Line 103: Line 103:
     along with Foobar; if not, write to the Free Software
     along with Foobar; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
</code>
+
</pre>

Latest revision as of 15:10, 7 January 2006

Printer Port Forwarder

Contents

Description

ppf is simple solution for sharing USB or LPT printer across the network using Network Printing Protocol (JetDirect/AppSocket protocols).

I use this solution for connecting printer to diskless Linux terminal station (see LTSP project for more info) and share it to throw another server (Windows or Unix printing system) with complex queuing and minitoring system.

ppf software is a TCP deamon that listen TCP/9100 and forward all datas comes to phisical printer port, like simple print server (which embedded into network attached printers, like JetDirect)

Goals

We use ppf for sharing printer connected to diskless station station. There are no need to install Samba or CUPS on PC where printer connected to. You use printer throw "standart network port" (in Windows terms).

Downloads

Version 0.1-alpha:

Installation

From sources:

  • 1. Download c source tarball
  • 2. Unpack. (bzip2 -9 ppf-X.Y-zzz.src.bz2 | tar xvf -)
  • 3. Compile. (cd ppf-X.Y-zzz; make )
  • 4. Install binary. (chmod u=rwx,g=rx,o=rx ppf ; chown root.root ppf ; cp -f ppf /usr/sbin/ppf )

From binary

  • 1. Download precompiled binary file archive
  • 2. Unpack. (cat ppf-X.Y-zzz.fc1.bz2 | bzip2 -cd > ppf)
  • 3. Install binary. (chmod u=rwx,g=rx,o=rx ppf ; chown root.root ppf ; cp -f ppf /usr/sbin/ppf )

Running

Start program required 2 arguments:

/usr/sbin/ppf <printer port> <tcp port>

Where:

  • <printer port> - device name where printer connected to;
  • <tcp port> - number of tcp port to listen, typicaly you should use 9100.

Example:

/usr/sbin/ppf /dev/usb/lp0 9100
or
/usr/sbin/ppf /dev/lp0 9100

Shared printer configuration

Printer connected is shared using JetDirect/AppSocket protocols. ppf directly send all data from remote host to printer, that mean driver on computer where this printer shared to public from should send data that can be accepted by printer directly (without previous pre- precessing like converting to EPS or PCL or RAW).

*NOTICE* during connecting ppf's provided printer you can find some delay coused by system desire to determine printer type by SNMP subsystem ussualy provided by serios print-servers.

Troubleshooting

ppf sends all warning, notices and error events to system log. In case of problem you can review syslog files for details.

For example:

in a case of not connected usb printer:

Nov 14 06:21:05 airforce ppf[16148]: Opened connection: from 127.0.0.1:41220, job id: 2
Nov 14 06:21:05 airforce ppf[16148]: Unable to open '/dev/usb/lp0' due to: No such device
Nov 14 06:21:05 airforce ppf[16148]: Closed connection: job id: 2, in: 0 bytes, out: 0 bytes

closed tcp connection from print server:

Nov 14 05:22:42 airforce ppf[9122]: Opened connection: from 127.0.0.1:37380, job id: 17
Nov 14 05:22:42 airforce ppf[9122]: read from 'socket' error (Resource temporarily unavailable)
Nov 14 05:22:42 airforce ppf[9122]: Closed connection: job id: 17, in: 8192 bytes, out: 0 bytes

successfull prints:

Nov 14 05:04:28 airforce ppf[9002]: Opened connection: from 127.0.0.1:36356, job id: 11
Nov 14 05:04:43 airforce ppf[9002]: Closed connection: job id: 11, in: 881741 bytes, out: 0 bytes
.....
Nov 14 05:59:15 airforce ppf[15123]: Opened connection: from 10.1.5.76:28167, job id: 10
Nov 14 05:59:41 airforce ppf[15123]: Closed connection: job id: 10, in: 521592 bytes, out: 0 bytes

Links

Licence

    Printer Port Forwarder
    (gateway between USB (or LPT) printer and TCP/9100 port)
                                                                                                                                               
    Copyright (C) 2004 Maksym Veremeyenko.
    Contributed by Maksym Veremeyenko, verem@m1stereo.tv, 2004.
                                                                                                                                               
    Printer Port Forwarder is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
                                                                                                                                               
    Printer Port Forwarder is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Personal tools