I was able to get cups/avahi/airprint running on my RT-N16 w/v1.28.9054 MIPSR2-beta K26 USB vpn3.6
NOTES:
- All binaries referenced below are dynamically linked, so use ldd to make sure you have the appropriate libraries in /opt/lib (get them from Rodney: multics.minidns.net/blog/articles/tomato_utilities/)
- I've tested this on one router with one printer, ymmv
- cups itself takes 8.4M, I haven't done anything to reduce the size other than strip the binaries. There's probably stuff that can be cleaned up.
- if you use my build review /opt/etc/cups/cupsd.conf, the security is fairly open
I complied cups 1.5 using the K26 SDK, tar.gz avilable here:
www.moharps.com/tomato/cups-1.5.0_tomato.tar.gz
Make sure you have an /opt mount, expand this in /
I have a network attached postscript printer, so I needed pdftops (airprint is pdf). Here's a copy of pdftops from xpdf-3.03 (optware also has one I haven't tried):
www.moharps.com/tomato/pdftops
place in /opt/bin
You'll also need avahi-daemon, I used Rodney's from here:
multics.minidns.net/tomato/PRECOMPILED/avahi/avahi-daemon
place in /opt/sbin
Make the /var directories that cups requires:
mkdir -p /var/cache/cups/rss
mkdir -p /var/log/cups
mkdir -p /var/run/cups/certs
mkdir -p /var/spool/cups/tmp
Start cups:
/opt/sbin/cupsd
Now you should be able to browse to 192.168.1.1:631 and see the GUI (if using a different IP scheme you'll need to adjust /opt/etc/cups/cupsd.conf)
Configure a printer (PPDs go in /opt/usr/share/cups/model)
Configure avahi:
you'll need a /opt/etc/avahi/avahi-daemon.conf
you'll also need to create a /opt/etc/avahi/services/[name].service for the printer you created (see the link in the first post)
start avahi:
/opt/sbin/avahi-daemon -D
Try airprint…