Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old April 7th, 2006   #1
davygravy
A Carafe of Ubuntu
 
Join Date: Apr 2006
Beans: 84
Dapper Drake Testing/
HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

How to print (from a Ubuntu/Linux box) to a USB printer that is connected to an Airport Extreme Base Station


Disclaimer: I assume no responsibility for your tinkering with your computer or your Airport Extreme Base Station. What I did worked great for me on my AEBS, but I can't assure you of your own success. Proceed at your own risk.

When I saw Ubuntu Linux for the first time, I immediately wanted to use it on an older Mac that we had sitting idle. I installed it and connected it to our already established network, which had an Apple Airport Extreme Base Station (AEBS) as its wireless hub. Connected directly to the AEBS was our EPSON Stylus Color 740, which we could print to from any Mac in the house, including our laptops (wirelessly). Getting the Ubuntu box to print to it should be easy, right?

Well, one might have hoped so, but this was not the case. I found hints and tips at various sites and forums, but nothing seemed to work. After about twenty hours of struggling, I notice a forum entry that mentioned how an AEBS firmware upgrade changed ip ports and printer access. I found I had to downgrade the AEBS firmware. Once I did that I was printing within a few minutes.

In short, the AEBS doesn't understand IPP or LPD printing protocols when it talks to USB printers connected directly to it. It uses ip port 9100 or 9101, depending on what version firmware you have installed. Also, to print to such a printer, it uses the AppSocket/HP JetDirect method. My original setup would not work with port 9101. To get mine to work, I had to downgrade the AEBS's firmware to an older version that opened port 9100 on the AEBS (instead of 9101) and then add a printer on the Ubuntu box.

Here are the details. If you really want to understand what you are about to do, and what your choices are, read through to the end, including the notes (especially note #I). You might get by with some short cuts that could save a lot of time. It is assumed that you already have an established network, an AEBS, and a working USB printer connected to that base station.


==============================================


0. Gather the essential information:

Determine your AEBS's IP address. It will probably look like 10.0.1.1 or 192.168.1.1, or something like that. It is preferable to have a static IP for your AEBS since it will make what do later on a lot easier.

You will also need to know your printer's make (Canon, EPSON, etc.) and model (Stylus Color 740, etc.).



1. Find out if you need to open port 9100:

Port scan your Airport Extreme Base Station to see if port 9100 is open - you will need to tell your port scanning software the ip address of your AEBS. I used nmapfe (a GUI front end for nmap), but I caution against using the port scan in Gnome's Network Tools (in the Admin menu), as it seemed to be doing only an abbreviated scan and didn't pick up any open ports, though this may have been a problem with Dapper Flight 6. If port 9100 is open, it should list something like this:
Starting Nmap 3.95 ( http://www.insecure.org/nmap/ ) at 2006-04-08 09:58 CDT
Interesting ports on dnm-basestation.local (10.0.1.2):
(The 1668 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
9100/tcp open jetdirect
10000/tcp open snet-sensor-mgmt
MAC Address: 00:03:93:E6:3F:7D (Apple Computer)
Device type: WAP|broadband router
Running: Apple embedded, ARRIS embedded
OS details: Apple Airport Extreme Base Station (WAP) or ARRIS Cadant C3 CMTS Cable Modem
Uptime 1.437 days (since Thu Apr 6 23:29:32 2006)

Nmap finished: 1 IP address (1 host up) scanned in 3.789 seconds



If your port scan shows 9100 is open, then go to step 3 (you can skip step 2).

If 9100 is not open but 9101 is open, then you may try step 2.

If a port scan shows no open ports whatsoever, then check your AEBS's ip
address to see that it is correct, or try a different port scanning utility.



2. Open port 9100 on your AEBS: (see disclaimer above at top)

If port 9100 is not open, you can try downgrading the firmware to Apple's version 5.4 e Airport Extreme Base Station firmware. For me, this was an fast, easy and painless operation.

I did my downgrade in Tiger, and probably Panther would work, too. You might be able to do this in Windows using Freebase, a Windows Utility for AEBS.

Google "airport extreme base station 5.4" and you should be led to the Apple site where you can download the firmware update - just download it to your desktop. Before you tinker with anything, it might be a good idea to save your current AEBS settings so that if something goes haywire, you can restore your setting with the minimum of effort.

To downgrade your firmware in OS X, start up Airport Admin Utility and select the base station that you want to downgrade the firmware on. From the menu "Base Station" choose "Upload". This will downgrade the firmware to 5.4 (or whatever version that you choose). I lost no functionality when I did this. I did have to go back to the Macs running 10.3 & 10.4 and use Printer Setup Utility to reestablish the printer, but it was painless since it came up as a Bonjour printer. YMMV.

Note that from the OS X side, whenever you subsequently open up Airport
Admin Utility and access your AEBS, you will probably be asked if you want to "upgrade" your firmware. Choose "no".

Go back to step 1 and see if port 9100 is open.



3. Set up your printer connection on your Ubuntu box:

Go to your Linux box (probably running Ubuntu Dapper or later) and open a
browser (like Firefox) window. In the URL window type in

localhost:631

and press enter. This should take you to the CUPS home page. Choose
Printers, and Add a Printer.

Enter a name for it (keep it simple w/ no strange characters), a location
(descriptive) and a description (again, descriptive). Click continue.

From the pull-down menu select

AppSocket/HP JetDirect

and click Continue.


For the Device URI: field, supply the following:

socket://[your AEBS's ip address]:9100

and press continue. Mine was "socket://10.0.1.2:9100" , without the quotes.

For the Model/Driver you will have to enter the Make (it was EPSON for me), click Continue, and then the Model (it was EPSON Stylus Color 740 for me, and you can choose different options within this model). (I did not choose Apple LaserWriter - I was told that I had to do this by several well-intending people, but that suggestion was errant. It would not work at all with the Apple LW driver.) Press Continue again.

If everything goes as it should, you will be told that your "Printer [your
printer name here] has been added successfully." You can then click on Printers in the top menu, and you will see your printer listed on the Printer page. Here you can find a whole set of options for printing a test page (a must), and other printer operations.

Check the name, description, location and URI for typos.



4. Check to see if it works, and maybe reconfigure:

Print a test page by clicking on Print Test Page.

If your printer prints the test page nicely, then great! You're done (probably)! You can set it as your default printer by using the Set As Default option, if you like.

If it prints the test page but the color is out of whack, you can try using a different driver for your model, or configuring your printer with the Configure Printer option.

If it does not print, then you can either delete the printer with the Delete Printer option and go back to step 3, or try to modify its settings with the Modify Printer option.



5. Test it with real-world software you use often, and maybe reconfigure:

If you were successful in step 4, then try printing from Firefox, OpenOffice Writer and/or a few of your most often used applications. If you get strange output, you can go back and redo step 4.



6. Enjoy:

Enjoy!

==============================================


Notes:

I. You can try just printing via AppSocket/HP JetDirect, socket://[your
AEBS's ip address]:9101 , using the make and model drivers for your USB printer. Maybe it will work for you right away with port 9101. It didn't work for me with port 9101, but this may have been because of a bug in CUPS (v1.2 is a release candidate version) or in Ubuntu Dapper Flight 6 (a pre-release development version).

II. I used the web-based CUPS Printer setup interface because the System-
>Admin->Printers tool seemed to be acting strange sometime in Ubuntu
Dapper Flight 6. This was when Dapper was still in development, and more
than a handful of users were complaining about broken or misbehaving printers. I saw this in the Ubuntu forums, and also at the CUPS bugs forum < http://www.cups.org > . This forum thread < http://www.cups.org/newsgroups?s1655....bugs+v1660+T0 > was quite funny, for me, in retrospect, as it seemed that the thread starter was having the same problem that I was, but the responder (from CUPS publisher ESP) seemed to be pretending that "all was well". Certainly, it is not funny if you are the one having the printing problem.

III. I spent about 20 hours researching and trying to get my AEBS to print via AppSocket/HP JetDirect on port 9101. Apple's AEBS firmware update 5.7 had printing going through port 9101, and try as I might, I was not able to get it to work. Notably, I could not get it to work with port 9101 with either Linux or OS X Tiger (10.4) via AppSocket/HP JetDirect. Of course, in Tiger the printing to the AEBS was autoconfigured with Bonjour (Apple's implementation of Zeroconf, Avahi in Linux) and this didn't use the AppSocket/HP JetDirect protocol, but PAP/APAP protocol instead, which seems to be a proprietary Apple thing.

IV. If the problem w/ the AppSocket/HP JetDirect interface is a Ubuntu problem or a CUPS problem, then maybe it will be resolved so that one can print via port 9101 without problems, and without having to downgrade the AEBS firmware. Since my work was carried out under Dapper Flight 6 (a pre-release development version), one can hardly expect that all the bugs and kinks were worked out already.

V. If you have Airport Express, you may find similar situations and
problems. I don't know how similar or dissimilar the problems and solutions may be, because I haven't tried this on an Airport Express.

VI. I had all but given up, and had even tried to buy a US Robotics MaxG Router w/ built-in USB print server to replace the AEBS. Compusa had a sale on them, but they were sold out. So I went home and gave it one last try.

And downgraded the firmware. Patience (or stuborness) can be a good thing.

VI. I assume no responsibility for your tinkering with your equipment. Proceed at your own risk.

Last edited by davygravy; April 8th, 2006 at 11:02 AM..
davygravy is offline   Reply With Quote
Old August 4th, 2006   #2
dcapitalj
First Cup of Ubuntu
 
Join Date: Aug 2006
Beans: 1
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Hi. Anybody here willing to help a Mac user?
I got the exact same problem as described in this thread, but no solution yet. The thing is I can't get the Airport Express base station to open port 9100 (or 9101, for that matter). Tried lotsa things I found over the Net, like installing altenative PPD's, like downgrading to firmware 6.1.1, like turning off "IP broadcasting"... nothing worked. Please help. Airport's other functions work 100%.
Config is:
Apple MB pro w/ OS 10.4.7
Airport Express firmware 6.1.1
trying to print to a HP 1125c over the AXBS's USB port. (hard-wiring the printer to the MB works OK)

Thanks in advance
dcapitalj is offline   Reply With Quote
Old November 1st, 2006   #3
DMHamm
First Cup of Ubuntu
 
Join Date: Oct 2005
Location: Kannapolis, NC
Beans: 2
Ubuntu 6.06 Dapper
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

I keep getting a "Enter CUPS Username and password" box, and NOTHING I enter seems to work: the box just keeps popping up. If I hit Cancel, I get a "Not authorized" error. This is in 6.06 LTS.

Any ideas what to do?
DMHamm is offline   Reply With Quote
Old November 6th, 2006   #4
mbittleston
First Cup of Ubuntu
 
Join Date: Nov 2006
Location: San Francisco, CA, USA
Beans: 5
Ubuntu 7.04 Feisty Fawn
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Printing to an HP inkjet printer (deskjet 932c) connected to the airport extreme seems to work fine for the following:
Ubuntu 6.06 LTS Dapper Drake to an airport extreme with firmware v5.7
printer settings are:
Network printer: HP JetDirect printer
host: (ip address of airport)
port: 9101

I did not use the cups interface, just the System->Admin->Printers interface.

Last edited by mbittleston; November 6th, 2006 at 03:40 AM.. Reason: added interface used
mbittleston is offline   Reply With Quote
Old November 14th, 2006   #5
jymbob
First Cup of Ubuntu
 
Join Date: Oct 2005
Beans: 7
Ubuntu 9.10 Karmic Koala
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Set up here via System->Admin->Printers:
Laserjet 5L
Network Printer: HP JetDirect
host: 192.168.0.xxx
port: 9101

Ubuntu 6.10 LTS

Seems to be fine.
jymbob is offline   Reply With Quote
Old November 20th, 2007   #6
dare dukes
First Cup of Ubuntu
 
Join Date: Oct 2007
Beans: 11
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Thanks! Works like a charm.
dare dukes is offline   Reply With Quote
Old January 5th, 2008   #7
motorbikemike
First Cup of Ubuntu
 
Join Date: Jan 2008
Beans: 1
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Thank you, I was able to make my new install of Ubuntu see and print to my wife's printer on her airport station with this information. It works well, the test pages printed out very clearly and documents from open office print the way they should.
motorbikemike is offline   Reply With Quote
Old February 8th, 2008   #8
jamaio
First Cup of Ubuntu
 
Join Date: Jan 2008
Location: New Orleans
Beans: 1
Ubuntu 8.04 Hardy Heron
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Quote:
Originally Posted by jymbob View Post
Set up here via System->Admin->Printers:
Laserjet 5L
Network Printer: HP JetDirect
host: 192.168.0.xxx
port: 9101

Ubuntu 6.10 LTS

Seems to be fine.
This worked Great,

I used port 9100 with no problems.

I print wirelessly from my laptop and from my wired desktop.

Thanks!!!
__________________
John
PowerBook G4 12" 1.5 Ghz
Duel Boot OSX 10.4.11 and
Ubuntu 8.04
jamaio is offline   Reply With Quote
Old May 25th, 2008   #9
renatoborges
First Cup of Ubuntu
 
Join Date: Apr 2008
Beans: 11
Ubuntu 8.10 Intrepid Ibex
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

all you have to do is install the avahi-utils by the synaptic package manager (system/administration/synaptic package manager) and after installation restart your system.

then go to system/administration/print and click the new printer button, your printer or printers, connected to the airport express should appear in the list of printers available for installation.
renatoborges is offline   Reply With Quote
Old June 13th, 2008   #10
Varikk
First Cup of Ubuntu
 
Join Date: Jun 2008
Beans: 2
Re: HOW-TO: Printing from Ubuntu to a USB Printer on Airport Extreme Base Station

Might I just say this post was nice and concise and you saved me 20 hours trying to figure this out myself. It took me 2 minutes to connect to the printer. I had been able to connect to it using my macbook and vista machine but have since migrated to ubuntu and was distressed about having to figure this out. It took me all of 2 forum reads and had yours been the first, well nuff said. Thanks!

My only input would be a very easy way to find out your Device URI: field is to use Avahi (looks for bonjour style connections on your network). It can be found in applications/add remove - search field.

Thanks again!

Varikk
Varikk is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:33 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry