[Suns-at-Home] Printing via an Apple Airport Extreme from Solaris (and other stange boxes)

Lewis, Benjamin (Ben) blewis3@lucent.com
Tue, 14 Nov 2006 10:56:45 +0100


Hello Folks

I managed to get a HP LaserJet 5MP on loan from work for use when
telecommuting. We have recently been upgraded from Dell Latitudes to
IBM/Lenovo laptops but as these have no parallel port we were given
Belkin USB to Centronics adapters.

I thought you might be interested to hear of my experiences setting it
up at home. Rather that just connecting it directly to the work laptop I
thought I would try and get it working with the USB port of my Airport
Extreme wireless router so I can print from all the machines at home.

This actually works fine when printing from a Mac as the printer is
discovered immeadatly via Apples Bonjour protocol. I then wanted to be
able to print from my Ultra 5 and SGI Indy. After searching around it
seems the Airport Extreme is able to receive raw print commands via a
socket a la HP JetDirect.

I found the following procedure which works great, but be aware that for
some reason the latest firmware update for the Airport Extreme changes
the raw port from 9100 to 9101 (this was very frustrating!) :-

http://weblogs.java.net/blog/mhadley/archive/2006/01/printing_to_an.html

> Printing to an Apple Airport Connected USB Printer from Solaris Posted

> by mhadley on January 30, 2006 at 09:39 AM | Comments (0)
>
> The first thing to do is work out the IP address of the Airport base=20
> station to which you've hooked up the printer. The Airport Admin=20
> utility on a Mac can help out here if you have multiple base stations=20
> but if you have only one then its likely to the same IP address that=20
> is your default gateway. To find the default gateway type (the #=20
> represents the shell prompt, don't type it):
>
> # netstat -rn
> and look for the 'default' entry.
>
> To make sure you've got the right IP address try:
>
> # telnet ipaddr 9100
> where ipaddr is the IP address of the base station. If telnet connects

> then you're probably on the right track.
>
> Next you need to configure a Solaris printer queue that points to the=20
> networked printer. It turns out that the Airport base station works=20
> pretty much the same as a HP JetDirect print server and the following=20
> commands get the job done:
>
> # lpadmin -p hp -v /dev/null -m netstandard -o dest=3Dairport:9100 -o=20
> protocol=3Dtcp -o banner=3Dnever -T PS -I postscript=20
> # enable hp printer=20
> "hp" now enabled=20
> # accept hp=20
> destination "hp" now accepting requests=20
> # lpadmin -d hp
>
> where hp is the name of the printer queue and airport is the IP=20
> address or DNS name of the base station. The first line creates the=20
> queue, the second and third enable the queue and set it to accept=20
> requests and the final line sets this new queue to be the default=20
> printer queue. The first line will need adjusting if you are using=20
> anything other than a PostScript printer, the key parts of the command

> are use of tcp for protocol rather than bsd and using TCP port 9100 on

> the base station.

I've secretly always wanted to have console output being printed to a
tractor feed printer using that cool fan fold paper with green stripes.
Oh well this will have to do I guess. I think I was born twenty years
too late to be a real system operator.

Best regards

Ben

PS I hope this doesn't get posted three times. My first submission got
bounced, apologies if you get this several times.