In this tutorial, I'm going to show you how to setup Apple AirPrint Server on a router running TomatoUSB firmware. This will allow you to print from your iOS device (iPhone, iPod, iPad) to your non-AirPrint-enabled printer through your router. If you're familiar with AirPrint Activator or FingerPrint, this solution is similar, except you don't have to keep your power hungry MAC/PC running 24/7.
Before I start, I want to give special thanks to @davygravy on the TomatoUSB.org forum. He was the one that ultimately made this all possible by compiling, re-compiling and fixing all the required packages.
Another thing, if you're familiar with my Tutorial on Apple AirPlay on TomatoUSB Router, these two tutorials (currently) are not compatible with each other. Meaning, you either go with AirPrint or AirPlay on your TomatoUSB Router, NOT BOTH. This is because the AirPrint tutorial uses Entware and this tutorial uses Optware, which isn't compatible with each other. Hopefully we're get this issue resolved in the near future.
Note: this tutorial is a work in progress (but working). I'll be updating and flushing out the details as time permits. Please excuse the typos and bad grammar.
YMMV (Your Mileage May Vary) depending on your Printer model.
What you'll need:
- Router with TomatoUSB installed*
- USB Flash Drive >1GB (will be completely wiped)
- USB or Wireless/Network Printer
* If you're looking for a recommendation on a router for this project, please check this post - [Tutorial] Apple AirPlay on TomatoUSB Router. You can pick up a router as low as $24.
Outline of Steps:
- Partition and Format USB Flash Drive*
- Install Optware
- Download and Install Required Packages
- Start CUPS and Configure Printer(s)
- Generate AirPrint Service File
- Startup DBus, Avahi and CUPS
- Test Print
- Configure the router so that everything works after a reboot
- CloudPrint (Bonus Content)
*Note that your USB Flash Drive will be completely wiped clean.1) Partition and Format USB Drive:
Plug in your USB drive and connect to your router via SSH (Putty) and execute the following commands:
#Partition your usb flash drive
umount /dev/sda1
fdisk /dev/sda
Type in the following commands to create a primary partition on your USB Flash drive
# p # list current partitions
# o # to delete all partitions
# n # new partition
# p # primary partition
# 1 (one) # first partition
# <enter> # default start block
# <enter> # default end block #use the whole flash drive
# w # write new partition to disk
#format newly created partition
#label disk as 'optware' case sensitive
umount /dev/sda1
mke2fs -j -L optware /dev/sda1
#mount partition as /opt
mount /dev/sda1 /opt
#Make sure /opt is properly mounted on a reboot.
echo "LABEL=optware /opt ext2 defaults 1 1" >> /etc/fstab
nvram setfile2nvram /etc/fstab
nvram commit
2) Install Optware
#Install Optware from scratch.
#Assumes drive is formated and mounted as /opt already
cd /tmp
wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh -O - | tr -d '\r' > /tmp/optware-install.sh
chmod +x /tmp/optware-install.sh
sh /tmp/optware-install.sh
3) Download and Install Required Packages
#create a folder to store packages
mkdir -p /opt/ipkgs
cd /opt/ipkgs
#download packages.
#cut/paste this whole section
cd /opt/ipkgs
#download packages.
#cut/paste this whole section
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/dbus_1.2.16-2_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/cups_1.5.4-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/poppler_0.12.4-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/py26-cups_1.9.62-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/ghostscript_8.71-3_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/hplip_3.11.7-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/gutenprint_5.2.9-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/cups-driver-gutenprint_5.2.9-1_mipsel.ipk
#install packages. this may take awhile.
#cut/paste this whole section
ipkg install /opt/ipkgs/dbus_1.2.16-2_mipsel.ipk
ipkg install /opt/ipkgs/cups_1.5.4-1_mipsel.ipk
ipkg install /opt/ipkgs/poppler_0.12.4-1_mipsel.ipk
ipkg install /opt/ipkgs/py26-cups_1.9.62-1_mipsel.ipk
ipkg install /opt/ipkgs/ghostscript_8.71-3_mipsel.ipk
ipkg install /opt/ipkgs/gutenprint_5.2.9-1_mipsel.ipk
ipkg install /opt/ipkgs/cups-driver-gutenprint_5.2.9-1_mipsel.ipk
#install hplip if you have a HP printer
#ipkg install /opt/ipkgs/hplip_3.11.7-1_mipsel.ipk
#install splix for Samsung printers
#ipkg install splix
#Color profiles for Samsung (untested)
#cd /opt/share/cups/model/samsung
#wget http://splix.ap2c.org/samsung_cms.tar.bz2
#tar xvjf samsung_cms.tar.bz2
#rm samsung_cms.tar.bz2
#Stop CUPS
killall cupsd
#create some needed mime types for AirPrint and iOS6
echo "image/urf urf string(0,UNIRAST<00>)" > /opt/share/cups/mime/airprint.types
echo "image/urf application/pdf 100 pdftoraster" > /opt/share/cups/mime/airprint.convs
#Start CUPS
cupsd
#make airprint folder
mkdir -p /opt/airprint
cd /opt/airprint
#install wget-ssl (for https)
ipkg install wget-ssl
#set the script to be executable
chmod 755 ./airprint-generate.py
#Generate airprint service file
cd /opt/etc/avahi/services
python2.6 /opt/airprint/airprint-generate.py
#There should be a
#AirPrint-<PrinterName>.service file listed
ls
#Stop CUPS
killall cupsd
6) Startup DBus, Avahi (aka Bonjour) and CUPS
#Required for Avahi and dbus
#Ignore the warning
adduser avahi
addgroup netdev
#delete orphan pid files in case they exist
rm /opt/var/run/dbus/pid
rm /opt/var/run/avahi-daemon/pid
#start dbus before avahi
/opt/etc/init.d/S20dbus start
#start avahi (aka bonjour)
avahi-daemon -D
#Start CUPS
cupsd
#verify that your printer is being advertise
avahi-browse --terminate --resolve _ipp._tcp
7) Test Print
From your iPhone/iPad/iPod, do a test print.
8) Configure the router so that everything works after a reboot
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/cups_1.5.4-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/poppler_0.12.4-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/py26-cups_1.9.62-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/ghostscript_8.71-3_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/hplip_3.11.7-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/gutenprint_5.2.9-1_mipsel.ipk
wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/cups-driver-gutenprint_5.2.9-1_mipsel.ipk
#install packages. this may take awhile.
#cut/paste this whole section
ipkg install /opt/ipkgs/dbus_1.2.16-2_mipsel.ipk
ipkg install /opt/ipkgs/cups_1.5.4-1_mipsel.ipk
ipkg install /opt/ipkgs/poppler_0.12.4-1_mipsel.ipk
ipkg install /opt/ipkgs/py26-cups_1.9.62-1_mipsel.ipk
ipkg install /opt/ipkgs/ghostscript_8.71-3_mipsel.ipk
ipkg install /opt/ipkgs/gutenprint_5.2.9-1_mipsel.ipk
ipkg install /opt/ipkgs/cups-driver-gutenprint_5.2.9-1_mipsel.ipk
#install hplip if you have a HP printer
#ipkg install /opt/ipkgs/hplip_3.11.7-1_mipsel.ipk
#install splix for Samsung printers
#ipkg install splix
#Color profiles for Samsung (untested)
#cd /opt/share/cups/model/samsung
#wget http://splix.ap2c.org/samsung_cms.tar.bz2
#tar xvjf samsung_cms.tar.bz2
#rm samsung_cms.tar.bz2
4) Start CUPS and Configure Printer(s)
#start cups
cupsd
Now open up your web browser and go to http://<RouterIPAddress>:631/admin (http://192.168.1.1:631/admin).
Click on "Manage Printers"->"hp990c"
Administration->Delete Printer (this printer was accidentally included)
If you're prompted for authentication, enter in root and your password.
Go back to Administration->Add Printer
In my case, I am using a Brother HL-2270DW which has built in wireless and supports various printing options - socket, ipp, http, etc. I'm going to use socket (AppSocket/HP JetDirect) which is the same option you would select if you had your USB printer directly connected to your router. Make sure you enable "USB Printer Support" in the Tomato GUI if you're using a USB attached printer.
For my wireless printer, the Connection address I'm using is "socket://<PrinterIPAddress>:9100" ( for the record "ipp://<PrinterIPAddress>/pcl_p1" would also work).
For a USB attached printer, the Connection address would be: "socket://<RouterIPAddress>:9100" (i.e., socket://192.168.1.1:9100)
Name your printer. Check the "Share This Printer" checkbox (not totally sure if this is required, but for now check it to be safe).
Select the Make/Model of your Printer. Basically you are selecting the drivers to use. For my Brother HL-2270DW, I went with "Generic"->"Generic PCL 6/PCL XL Printer".
Click Add Printer.
Set your Default Options.
Print a test page. Maintenance->Print Test Page.
Printing a test page needs to work. If not, you can not continue. Not all printers will work. Try different drivers (or a different printer).
Print a test page. Maintenance->Print Test Page.
Printing a test page needs to work. If not, you can not continue. Not all printers will work. Try different drivers (or a different printer).
5) Generate AirPrint Service File
Back in your SSH console session, execute the following:
killall cupsd
#create some needed mime types for AirPrint and iOS6
echo "image/urf urf string(0,UNIRAST<00>)" > /opt/share/cups/mime/airprint.types
echo "image/urf application/pdf 100 pdftoraster" > /opt/share/cups/mime/airprint.convs
#Start CUPS
cupsd
#make airprint folder
mkdir -p /opt/airprint
cd /opt/airprint
#install wget-ssl (for https)
ipkg install wget-ssl
#Download airprint-generate.py
#this is all one line
/opt/bin/wget --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py#set the script to be executable
chmod 755 ./airprint-generate.py
#Generate airprint service file
cd /opt/etc/avahi/services
python2.6 /opt/airprint/airprint-generate.py
#There should be a
#AirPrint-<PrinterName>.service file listed
ls
#Stop CUPS
killall cupsd
6) Startup DBus, Avahi (aka Bonjour) and CUPS
#Required for Avahi and dbus
#Ignore the warning
adduser avahi
addgroup netdev
#delete orphan pid files in case they exist
rm /opt/var/run/dbus/pid
rm /opt/var/run/avahi-daemon/pid
#start dbus before avahi
/opt/etc/init.d/S20dbus start
#start avahi (aka bonjour)
avahi-daemon -D
#Start CUPS
cupsd
#verify that your printer is being advertise
avahi-browse --terminate --resolve _ipp._tcp
7) Test Print
From your iPhone/iPad/iPod, do a test print.
8) Configure the router so that everything works after a reboot
Go to USB and NAS -> USB Support (http://192.168.1.1/nas-usb.asp).
In the "Run after mounting" section add the following:
#start dbus before avahi
/opt/etc/init.d/S20dbus start
#start avahi (aka bonjour)
avahi-daemon -D
#Start CUPS
cupsd
In the "Run before unmounting" section add the following:
#run before unmounting
killall cupsd
avahi-daemon -k
/opt/etc/init.d/S20dbus stop
You're done. Enjoy!
9) Google CloudPrint (Bonus Content - Work In Progress)
ipkg install git
cd /opt
One more thing regarding CloudPrint, my recommendation is to set up a new Google Account dedicated just for CloudPrint. Use this account for the above cloudprint login, and then share your printer(s) with your main account. I'm a little paranoid of having my email authentication stored on my router (even though its hashed or whatever).
If you get AirPrint working with your printer, please leave a comment with your printer model and drivers used. This will help other users. Thanks
Please leave a comment with any questions or feedback. Thanks
[Update 4/9/2013] Please check out my PogoPlug Tutorial below. A PogoPlug running Arch Linux ARM is the perfect companion to your TomatoUSB Router. I highly recommend that you run AirPlay/AirPrint on the PogoPlug versus your TomatoUSB router.
[Tutorial] - PogoPlug E02 with Arch Linux ARM - NAS (Samba4), AirPlay, AirPrint, Google CloudPrint
In the "Run after mounting" section add the following:
#Required for avahi and dbus
adduser avahi
addgroup netdev
#delete orphan pid files in case they exist
rm /opt/var/run/dbus/pid
rm /opt/var/run/avahi-daemon/pid
adduser avahi
addgroup netdev
#delete orphan pid files in case they exist
rm /opt/var/run/dbus/pid
rm /opt/var/run/avahi-daemon/pid
#start dbus before avahi
/opt/etc/init.d/S20dbus start
#start avahi (aka bonjour)
avahi-daemon -D
#Start CUPS
cupsd
In the "Run before unmounting" section add the following:
#run before unmounting
killall cupsd
avahi-daemon -k
/opt/etc/init.d/S20dbus stop
You're done. Enjoy!
9) Google CloudPrint (Bonus Content - Work In Progress)
ipkg install git
cd /opt
git clone git://github.com/armooo/cloudprint
cd /opt/cloudprint
python2.6 setup.py build
python2.6 setup.py install
cd /opt/cloudprint
python2.6 setup.py build
python2.6 setup.py install
#Run once to create credential files
#give it about a minute to start up
/opt/local/bin/cloudprint
#give it about a minute to start up
/opt/local/bin/cloudprint
#enter your google account email and password
#Google username:
#Password:
#Google username:
#Password:
#test print from your Chrome browser
#Control+C to close cloudprint
#copy your cloudprint authentication files to /opt
cp /tmp/home/root/.cloudprintauth /opt/cloudprint
cp /tmp/home/root/.cloudprintsaslauth /opt/cloudprint
To have cloudprint start automatically on reboot. Go to USB and NAS -> USB Support (http://192.168.1.1/nas-usb.asp). In the "Run after mounting" section add the following:
#copy back cloudprint authentication files to /tmp
cp /opt/cloudprint/.cloudprintauth /tmp/home/root/
Cloudprint is very fragile. If you're having start-up or printing issues try the following steps.
- Clear your Google CloudPrint Print Queue - https://www.google.com/cloudprint/#jobs
- Delete your stored credential and reboot and start over.
#Control+C to close cloudprint
#copy your cloudprint authentication files to /opt
cp /tmp/home/root/.cloudprintauth /opt/cloudprint
cp /tmp/home/root/.cloudprintsaslauth /opt/cloudprint
To have cloudprint start automatically on reboot. Go to USB and NAS -> USB Support (http://192.168.1.1/nas-usb.asp). In the "Run after mounting" section add the following:
#copy back cloudprint authentication files to /tmp
cp /opt/cloudprint/.cloudprintauth /tmp/home/root/
cp /opt/cloudprint/.cloudprintsaslauth /tmp/home/root/
/opt/local/bin/cloudprint &
In the "Run before unmounting" section add the following:
killall cloudprint
/opt/local/bin/cloudprint &
In the "Run before unmounting" section add the following:
killall cloudprint
- Clear your Google CloudPrint Print Queue - https://www.google.com/cloudprint/#jobs
- Delete your stored credential and reboot and start over.
One more thing regarding CloudPrint, my recommendation is to set up a new Google Account dedicated just for CloudPrint. Use this account for the above cloudprint login, and then share your printer(s) with your main account. I'm a little paranoid of having my email authentication stored on my router (even though its hashed or whatever).
If you get AirPrint working with your printer, please leave a comment with your printer model and drivers used. This will help other users. Thanks
Please leave a comment with any questions or feedback. Thanks
[Update 4/9/2013] Please check out my PogoPlug Tutorial below. A PogoPlug running Arch Linux ARM is the perfect companion to your TomatoUSB Router. I highly recommend that you run AirPlay/AirPrint on the PogoPlug versus your TomatoUSB router.
[Tutorial] - PogoPlug E02 with Arch Linux ARM - NAS (Samba4), AirPlay, AirPrint, Google CloudPrint
Hi,
ReplyDeleteWhen I go to download the packages, I am getting the error.
onnecting to dl.dropbox.com (107.21.253.161:80)
wget: can't open 'dbus_1.2.16-2_mipsel.ipk': Read-only file system
any idea why??
Thanks.
Brett, doesn't sound like you are in the right directory.
DeleteNote the following two commands before the wget.
#create a folder to store packages
mkdir /opt/ipkgs
cd /opt/ipkgs
You should be downloading to /opt/ipkgs
Hi,
ReplyDeleteSo, I definitely went through the steps again. Everything was as is, yet it didn't download...same error. I tried removing and recreating the dir, and then I decided to check the wget parameters. For whatever reason when I executed the mkdir/cd commands it just wouldn't do it. No errors, it seemed to change, but didnt. I used the -P flag and manually stated the dir and that seemed to work.
Strange. You shouldn't need the -p option since the /opt directory should already exist. I went ahead and updated the tutorial and added the -p, since it doesn't hurt anything to use it. Thanks for letting me know.
DeleteHi again,
ReplyDeleteI am now stuck in the CUPS config. It will not accept the credentials to add/delete a printer. I have tried 2 browsers and cleared the cache/stored data/pw's etc. Any idea whats going on?
Thanks,
Brett
No idea. The username (root) and password should be the same as what you used to access the Tomato GUI via your web browser and SSH. I'll upload a full ssh console output in the next couple of days so you can compare. I might even make a YouTube video of the process. Please keep me updated on your progress. Thanks
DeleteYou probably have SSH login via password disabled.
DeleteHi,
ReplyDeleteSo, I have not ideas as to how to move forward. I dont know why it will not accept the user name as root, and my router password. Ive tried changing the password as well in the router. stuck at this cups page :/
Bret
Hey Brett,
DeleteSorry to hear you're still not able to get AirPrint working. I experienced this exact issue on my journey to getting AirPrint working. Never was able to resolve it and just blame it on a bad build of CUPS.
I can't say for certain what causing your issue, but I do know that the tutorial works if you start from step 1. Did you start from step 1 or did you already have a pre-existing optware installation?
If you started from step 1, try restoring the default configuration and starting fresh. Erase all data in NVRAM memory (thorough) @ http://192.168.1.1/admin-config.asp
Hang in there, we'll figure it out.
You can also contact me via email .
When I run the line
ReplyDeleteavahi-browse --terminate --resolve _ipp._tcp
there is no output at all.
I can print test page from the cups interface but iPad doesnt detect the printer.
Sorry, there was a run-on command in step 5 (Generate AirPrint Service File), which I just fixed. Please re-do step 5 and verify that a AirPrint-.service file exist in the /opt/etc/avahi/services folder. Please keep me updated. Thanks.
Delete.service file exists!
Deleteipad detects printer too.
Printer queue is however stuck saying
" processing since
Thu Mar 14 21:41:48 2013
"Processing page 1...""
When I manually deleted the job the file printed succesfully. :S
DeleteMaybe trying giving it a little more time? Not sure.
Deletecancelling the job doesnt help anymore. it just remains stuck at processing page 1
Deleteno longer prints at all
Deletejust says "pending since
Fri Mar 15 00:09:39 2013 "
I fixed the problem by changing the generic driver to hp driver for my printer model !
DeleteStill prints agonizingly slowly. Hope to fix that too.
Thanks for the update. This is good to know for other users that may experienced this issue.
DeleteHi,
ReplyDeleteI am giving this a go again starting from scratch. Although, everything up to the CUPS server worked, I am trying a different machine using putty instead of my Mac's terminal interface....I will update you with my results.
Brett
Hi,
ReplyDeleteI believe I have everything worked out. One thing I that was left unmentioned is that it seems you need to have either a usb hub or two usb ports for this to work, am I correct? unplugging the flash drive to plug in the printer loses all of the software...
Hey Bret, glad to hear you got it working. Yeah, you can't unplug the flash drive :). If you have a regular usb attached printer, yes, you will need a router with two usb ports or a usb hub. In my case, I'm printing to a wireless network printer, so I would only need one usb port for the flash drive. -Qui
DeleteHi,
ReplyDeleteI have a samsung clx-3180 printer. I followed the instructions, but unable to print the Test page. During installation, I did not get any error during installation. When I do a test print, my printer give print success sound without printing any pages. What could be wrong? Any help will be appreciated.
thanks
Ajay
Hi Ajay,
DeleteWhat print drivers are you using? From what I understand, Samsung use proprietary printing language. Try installing splix (ipkg install splix) and using a driver that closely matches your printer (clx-3160). Let me know if you get further. YMMV regarding printers.
Qui
When I run ipkg install splix, I get error - package not found. Where do I need to download it? How to download it? thanks
DeleteHi,
DeleteI got this package installed, but now when I do a test print, I am getting message ""SpliX Cannot open CMS file /opt/share/cups/model/samsung/cms/CLX-3160cms (2)" and nothing is getting printed. Any idea?
thanks
Ajay,
DeleteTake a look at this http://www.openprinting.org/driver/splix/. Sounds like you need some "color profiles". Not sure how/where you would get them. My suggestion is to try a black/white driver. Color at this point is probably not possible.
Qui
"Color printers needs color profile files to get better results. These
Deletefiles are provided by your printer manufacturer and you have to install them
manually. To do that, download the linux official drivers and locate the "cms"
directory." - So it sounds like you can try to download and extract these color profiles from the official linux driver and place them in the /opt/share/cups/model/samsung/cms/CLX-3160cms folder. Worth a shot.
I think you might be in luck. Try the following set of commands:
Deletecd /opt/share/cups/model/samsung
wget http://splix.ap2c.org/samsung_cms.tar.bz2
tar xvjf samsung_cms.tar.bz2
rm samsung_cms.tar.bz2
Thanks Qui. I got the error message taken care of. But no test page yet. In the status page, it says Printing is successful, but nothing is printed from the printer. Is it possible that CLX-3160 is not compatible with CLX-3180?
Deletethanks
Ajay
Yes. Try a different driver (B/W only).
DeleteQui,
DeleteI tried all the driver, but test page is not getting printed. In the CUPS admin screen, it says Successful but nothing is printing. Any idea?
thanks
Ajay
Hi,
ReplyDeleteExcelent tutorial. Thanks!
Only difficulty i have when printing pages with rasters from iOS is:
/opt/lib/cups/filter/pstoraster failed
Befor that I can see something like this in the cups log:
width = 4800, height = 6639
PageSize = [ 595 841 ], HWResolution = [ 600 600 ]
Which seems strange, as I only try to print from iOS's Notes.
In the router's log:
prnt/hpcups/HPCupsFilter.cpp 511: cupsRasterOpen failed, fd = 0
Did you test page print okay? What's your printer model and what driver have you tried? Try a different driver.
DeleteTest page went okay. The printer is a multifunction device HP Deskjet F300 Series and the driver siÄ™ from hplip, the hpcups version. Other drivers don't work at all.
ReplyDeleteMy router is ASUS RT-N16 with Tomatousb 1.28 with optware of course.
As I said printing simple text or simple webpages from iOS works well, the problem occurs while trying to print put of Notes or something with big images or background. Maybe a problem with memory or rescaling?
I think I might have this exact printer at home somewhere. Not sure if it has any ink, but if I have some time this weekend I'll give it a test.
DeleteHi,
DeleteAny chance on testing this? :)
I've done some trials. For this particular printer there are two drivers: hpcups and hpijs. The hpijs doesn't work at all (error on testpage print). The hpcups works while printing test page from cups webpage, but doesn't work while printing from iOS.
Bottom lines I'm still stuck with this error.
thanks for the tutorial. I have ASUS RT-N16. Followed your instructions. I am able to print test page, but can't start google cloud print:
ReplyDeleteTomato v1.28.9054 MIPSR2-beta K26 USB Ext
root@router:/tmp/home/root# /opt/local/bin/cloudprint
Traceback (most recent call last):
File "/opt/local/bin/cloudprint", line 8, in
load_entry_point('cloudprint==0.9', 'console_scripts', 'cloudprint')()
File "build/bdist.linux-mips/egg/cloudprint/cloudprint.py", line 418, in main
RuntimeError: failed to connect to server
Any suggestion?
Hello Soleen,
DeleteLine 418 - cups_connection = cups.Connection()
Doesn't sound like you have CUPS running.
Qui
Hi Qui,
DeleteIt worked! I restarted cupsd and cloudprint started fine! Thanks again for the great tutorial!
I got Airprint working but I can only print in B/W !! How do I print in color? I have an HP printer
ReplyDeleteTry a different driver and let us know if you get it working :)
DeleteHi Qui, thanks for this tutorial.
ReplyDeleteEverything seemed to work out ok and I started cupsd, but when i visit the CUPS admin page, it get Internal Server Error.
I can visit the CUPS homepage fine, just not any of the tabs, like admin, printers, etc.
Have you seen this before?
(i did not start from a clean install, as I had tomato set up already, with transmission already running)
@schmichael,
DeleteHard to say what the issue is. Might be easier if you started from a clean install and re-configure transmission (backup your transmission config).
If you go this route I would recommend running Shibby's AIO TomatoUSB version, which is what I'm using on my Asus RT-N16 acting as my primary router and has Transmission client built right into the firmware with a nice Web Interface to config it.
http://tomato.groov.pl/download/K26/build5x-108-EN/tomato-K26USB-1.28.RT-MIPSR2-108-AIO.trx
Hi everyone,
ReplyDeleteI've followed the instructions to get CUPS working with my Brother HL-2140 printer to work on my RT-N16, but I'm getting stuck at the test page part.
I've tried several drivers, including the generic ones for PCL 5e and those for Brother alternatives. Most of those drivers start the printer for a few seconds, but then nothing actually prints. I've also tried using the PPD from OpenPrinting.org (www.openprinting.org/printer/Brother/Brother-HL-2140).
In the process of trying to get the PPD driver working, I've also had to install foomatic-rip (using hpijs package) and perl, which installed fine. Now I'm running into a situation where the print job renderer (KID4) is logging the following error:
D [05/Jan/2010:09:07:06 -0800] [Job 3] sh: gs: command not found
Some Google searching (http://mybookworld.wikidot.com/forum/t-144918/cups-problems) revealed the following solution (#3 on the reply post):
3) Also, gs was not linked in /usr/bin, since I found the following in the logs:
D [05/Jan/2010:09:07:06 -0800] [Job 3] sh: gs: command not found
So I created the missing link to gs in the /usr/bin
#ln -s /opt/bin/gs /usr/bin/
However, I cannot create the symlink in /usr/bin/ because it's read only.
Anybody know a solution for creating this symlink for gs in /usr/bin/? Thanks in advance.
Sorry for the late reply. Tomato's file system is read only. Did you ever get the HL-2140 working? Most likely its the drivers. I'm surprise the generic PCL drivers are not working. I don't think the foomatic-rip included in hpijs package is compatible with all the other packages..
DeleteI get a 404 for one of the files :
ReplyDeletewget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/gutenprint_5.2.9-1_mipsel.ipkwget
Connecting to dl.dropbox.com (54.243.118.43:80)
wget: server returned error: HTTP/1.1 404 NOT FOUND
I'm not sure if it will be required, but I'm guessing it will.
I copy and pasted the link, I don't think I missed a character ?
I found the problem. The wget from the next line is appended : http://dl.dropbox.com/u/42238/TomatoUSB/Optware/gutenprint_5.2.9-1_mipsel.ipkwget
ReplyDeleteShould be :
http://dl.dropbox.com/u/42238/TomatoUSB/Optware/gutenprint_5.2.9-1_mipsel.ipk wget
Is it necessary to have a flash drive greater than 1GB? I have multiple 1GB drives lying around unused. Will those work?
ReplyDeleteMaybe. I'm not sure if everything will fit. Give it a try.
DeleteI had some trouble printing a test page for a Canon MX870 printer, until I found the following link:
ReplyDeletehttp://forums.linuxmint.com/viewtopic.php?f=51&t=28486
I believe the necessary command lines were:
cd /opt/ipkgs
ipkg install optware-devel
ipkg install buildroot
ipkg install cups-dev
wget http://downloads.sourceforge.net/project/cups-bjnp/cups-bjnp/1.2.1/cups-bjnp-1.2.1.tar.gz
gunzip cups-bjnp-1.2.1.tar.gz
tar -xvf cups-bjnp-1.2.1.tar
cd cups-bjnp-1.2.1
./configure
make install
Then go back to "http://:631/admin".
Add printer, choosing ipp and address bjnp://
Yeah!! This^^ helps!
DeleteNow i can print a test page with my Canon MP640...
Thx
Thank you random guid!
DeleteAwesome guide. Got everything to work. However, printing is unbelievably slow. Any log files I should be looking at?
ReplyDeleteI changed default options in the server to a lower DPI and the speed got better. This is only when printing from iOS because you can't set printer options and it uses defaults.
DeletePrinter: Canon MP180
Thanks for the feedback. Glad you got it working. Did you have compile and install the cups-bjnp package to get your Canon MP180 to work?
DeleteYeah, these routers with their MIPS processors are very slow. If you want a little more speed/power, consider picking up a PogoPlug.