[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netatalk
Subject:    Re:Help: Printing in Linux (ppc) via a Dayna MiniEtherphrint device?
From:       Sak Wathanasin <sw () network-analysis ! ltd ! uk>
Date:       2001-11-30 14:25:25
[Download RAW message or body]

In reply to Markus Kuschnik's message of the 30/11/2001 at 12:13 +0100,


>If I correctly understand the manual, I have to address the Dayna-Box like
>a server in a network environment, but the box itself has no IP-address

This is because it is not an IP device; it is an ethertalk-localtalk 
bridge. It has a localtalk interface (min-DIN 8) and an ethernet 
interface (10 B2, thin ethernet). It connects your localtalk 
(APPleTAlk over serial cabking) LAN to your ethertalk (AppleTAlk oevr 
ethernet) LAN.

I have that connects my LaserWriter 4/600 (which is a localtalk-only 
printer) to the rest of my LAN. At one stage I had Newtons, and early 
PowerBooks on the localtalk LAN, but these days, only the printer is 
left. I can print to this printer from my Linux, Solaris and NT 
boxes. The last uses MS's AppleTalk stack . For Linux and Solaris, 
netatalk does indeed provide th eneeded functionality.

First install and configure netatalk so you have AppleTalk working on 
the Linux box. See the FAQ, readme's etc for this. You need to either 
compile in AppleTalk support into the kernel or build it as a module. 
At this point, you should be able to "see" the printer using nbplkup. 
For example, if I do that here, I get:

[root@fe root]# nbplkup
                              fe:AFPServer 
65280.145:128
                              fe:netatalk                           65280.145:4
                              fe:Workstation                        65280.145:4
                              Ph:  Power Macintosh 
65280.106:252
                              Ph:Workstation                        65280.106:4
                              cu:AFPServer                          65280.18:128
                              cu:netatalk                           65280.18:4
                              cu:Workstation                        65280.18:4
            LaserWriter 4/600 PS:LaserWriter 
65520.133:128  <--- !!!

All the devices are on net 65280 (ethertalk) except for the printer, 
which is on net 65520 (you don't have to worry about assigning these, 
Appletalk sorts itself out automagically).

To print to the printer, you need to use PAP (printer access 
protocol). 2 utilities, pap and papstatus comes with netatalk. Check 
that these work as follows:

[root@fe root]# papstatus -p "LaserWriter 4/600 PS"
status: idle

or

cat something.ps | pap -p "LaserWriter 4/600 PS"

(it has to be a PostScript file). Now all that is left is to 
integrate these into your printing system.

How you do this depends on which printing system you use. I use RH7.2 
and LPRng, so adapt as appropriate. Use the GUI tools or CLI as you 
see fit. First, create an entry for the printer in /etc/printcap. For 
mine, I use

laser|lp|LaserWriter LW600 on AppleTalk:\
     :cm=LaserWriter 4/600\
     :sd=/var/spool/lpd/laser:\
     :sh=true:\
     :lp=/dev/null:\
     :lf=/var/log/lpd-errs:pw#80:\
     :of=/usr/local/atalk/etc/filters/ofpap:\
     :if=/usr/local/atalk/etc/filters/ifpap:\
     :tf=/usr/local/atalk/etc/filters/tfpap:\
     :df=/usr/local/atalk/etc/filters/dfpap:

Do a "man printcap" to find out what it all means; "man psf" to find 
out about the filters available. Now create the spool directory named 
in the "sd=" clause; in my case, it is /var/spool/lpd/laser. Make 
sure the owner and permissions are correct:

/var/spool/lpd:
drwx------    2 lp       lp           1024 Nov 30 01:54 laser

/var/spool/lpd/laser:
-rw-------    1 lp       lp             33 Dec 27  1997 .paprc

The file .paprc has the name of the printer:

cat /var/spool/lpd/laser/.paprc
LaserWriter 4/600 PS:LaserWriter

That's about it: just restart the lpd and enable the printer. Test to 
check the filters are invokved automatically; eg

ls -l | lp

or

man -t pap | lp

Good luck!
-- 
Sak Wathanasin
Network Analysis Limited

Internet: sw@network-analysis.ltd.uk
Phone: (+44) 24 76 41 99 96        Mobile: (+44) 79 70 75 19 12 
Fax: (+44) 24 76 69 06 90

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic