It isn’t usual to read a B-107 to its subject, but I’m going to set you straight. “Insubordinate. Insolent. A trickster. Perhaps with criminal tendencies”.

Harry Palmer

January 16, 2007

Printing via an Apple Airport Extreme from Solaris (and other exotic boxes)

Filed under: Computers — ben @ 10:18 am

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 station to which you’ve hooked up the printer. The Airport Admin utility on a Mac can help out here if you have multiple base stations but if you have only one then its likely to the same IP address that is your default gateway. To find the default gateway type (the # 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 networked printer. It turns out that the Airport base station works pretty much the same as a HP JetDirect print server and the following commands get the job done:

# lpadmin -p hp -v /dev/null -m netstandard -o dest=airport:9100 -o protocol=tcp -o banner=never -T PS -I postscript
# enable hp
printer “hp” now enabled
# accept hp
destination “hp” now accepting requests
# lpadmin -d hp

where hp is the name of the printer queue and airport is the IP address or DNS name of the base station. The first line creates the queue, the second and third enable the queue and set it to accept requests and the final line sets this new queue to be the default printer queue. The first line will need adjusting if you are using 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.

* * *

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment