|
WiFi PDA Meets Linux--Part 2
iPAQ/CUPS PrintingPart 1 of our WiFi PDA/Linux series focused on setting up the iPAQ to browse the Web and connect to a Linux/Samba file server. This time, we'll look at printing from the iPAQ to a CUPS print server. This capability is useful in any situation where a highly mobile worker needs to print something, especially while working in a localized area. Examples might include printing prescriptions in a medical office by a doctor while roaming from patient to patient. Waiters printing sales receipts for their customers. How about paper copies of checklists and quality documents on the shop floor? Companies interested in a first time open source project, might find that setting up printing from their iPAQs to a Linux/CUPS printer is a good low-risk icebreaker. Recycle an old desktop machine, throw Linux/Samba/CUPS on it, plug in the LAN and printer, then give it a whirl. Takes care of several issues, all at once. I'm impressed with the HP 3715's capabilities. They are fast yet portable and put a lot of computing power in the user's hand. Couple the WiFi connectivity with Linux and just think of the possibilities. My goal for this series is to help readers think about how a PDA can work with a Linux infrastructure. I'm hopeful, that readers will explore (and share) some of their own PDA/Linux ideas, too. Let's get PDA/CUPS printing.
First Things FirstJust like connecting to a Samba file server, printing from the iPAQ is pretty easy, although it involves quite a few set up steps. We might expect this with such a specialized piece of computing equipment. There are also some limitations, regardless of the which type of print server or printing appliance, that you are using.
These limitations may be trivial or serious depending on your situation. Personally, I'm happy to be able to run off a quick Web page or Pocket Word document for markup purposes, via WiFi. Users that need exact copies might want to investigate using the Adobe Acrobat solutions for Pocket PCs. Some of the set up steps require a Windows machine, right now. An open source iPAQ to PC synchronization program is available, called Multisync, but I'm not up to speed on it yet. You can bet that I'll cover Multisync in an upcoming article.
Next Things NextHere's a summary of the steps needed to print from an iPAQ to a your Linux/CUPS server.
Now that we have our list of what needs to be done to print from the iPAQ, lets take each step one by one. Establish ConnectivityThis one should be an easy. The best way is to make sure you can connect to the Samba directory that we configured in Part 1. An alternative is to see if you can browse a Web site using the iPAQ's Internet Explorer. Load ActivesyncI never did find the Activesync program on the HP iPAQ companion CD, so I just downloaded it (it was the latest version anyway) from the Microsoft Activesync page. I successfully installed it on both my old 133 Mhz Windows 98 box, as well as my new HP 5460 laptop. The program should start up as soon as you plug in the USB cable and put the iPAQ in the cradle. Select the single computer partnership. Answer the simple questions in the partnership steps and then click finish. You can then run a sync on the iPAQ, to make sure Activesycn is working properly. Download HP Mobile PrintingDownload the full HP Mobile Printing for Pocket PC version of the program to your Windows machine . With the iPAQ plugged into the cradle, run the HP Mobile Printing installation program. The program will install and download the appropriate files to the iPAQ over the USB connection. Follow the instructions and you should be fine.
Continuing OnTweak the Linux/CUPS ConfigurationSurprise, surprise, surprise, Gomer... CUPS is probably the easiest part of the whole iPAQ printing process. CUPS is the printing system of choice for most Linux installations. Many times it's even loaded by default. Use your distribution's installer to put it on your Linux box, if it's not on there already. In the CUPS configuration file (/etc/cups/cupsd.conf), I added a line under the <location/ > section to control which machines have network access to the printer. Allow From 192.168.2.* That way all my machines can print to the old Linux file/print server. Don't forget to restart CUPS. Under SUSE Linux the command is: root> rccups restart Other distributions have different restart programs. Configure the iPAQ to Print to the CUPS ServerOn the iPAQ perform the following steps to set up printing:
Create Test DocumentsStart OpenOffice.org (you do have it loaded on all your Windows machines, don't you?) and open a text document that you want to use on the iPAQ. How about a resume? Save the file as a Microsoft Word document (.doc format). You did try copying an OpenOffice.org Writer (save it in .doc format)file from your Samba server to the iPAQ, as outlined in Part 1, didn't you? You can transfer the file directly to the iPAQ via the WiFi link. This will put the file on the iPAQ as a .doc file. Pocket Word will be able to open the .doc file, but you won't be able to print. You also won't find any “print” menu items, under any of the program tabs when a .doc or .xls file is open. Alternately, if you have the iPAQ connected via Activesync you can copy your file (.doc format) into the Mobile Device directory and it will be converted automatically to a Pocket Word file (.psd format). The conversion works in either direction. Print Pocket Word/Excel Files and Web PagesWe've finally reached the moment of truth, printing from the iPAQ to a CUPS printer.
If everything went well, a status window will pop up on the iPAQ telling you that the print job successfully completed. Moments later your pages will show up on the printer. Printing a Web page is even easier. Start Internet Explorer, select a Web page and then tap and hold on a blank part of the page. A pop-up window will appear where you can select the print menu item. Hit that and the page goes to the printer. Easy. Things you can check if the file didn't print include making sure that the iPAQ has network connectivity and that CUPS is configured and running on the server. Try printing from another machine to help isolate the problem. I have not been able to print to the CUPS server IP address using the iPAQ.
The Word/Excel File Print WorkaroundThe workaround for printing a regular Word file is pretty simple. Copy the .doc file to the iPAQ, open it in Pocket Word and then immediately save it as a Pocket Word document. Close out the Pocket Word application and print the file using the tap and hold technique. You can use the same process with Excel files. Be careful with printing Pocket Excel files, because if the formatting is a little off, you may end up with a few sheets of numbers and a whole bunch of blank sheets. You might have to log into the CUPS machine and kill the job with the lprm command. Then power cycle the printer to clear out it's page wasting behavior. Also, printing a Pocket Excel file seemed to take a long time. No doubt the iPAQ is processing it's little heart out, to make it happen.
Wrapping UpThis concludes our adventure into iPAQ/CUPS printing. Even though the Linux/Samba/CUPS part of this article was pretty light, I think it is useful in the scheme of PDA to Linux integration. This is also a fine example of why people like Linux. Things are really beginning “to work”. I hope that I've saved readers some time, because much of this set up is not intuitively obvious, especially on the iPAQ side. Now that we have basic connectivity and printing out of the way, future stories will cover more exciting topics like VPN, Multisync, remote admin tools and streaming media. Rob Reilly is a consultant, writer, and commentator who advises clients on business & technology projects. His Linux, personal branding, and public speaking skills-related articles regularly appear in various high-end Linux and business media outlets. Send him a note or visit his Web site at http://home.earthlink.net/~robreilly.
|