AirPrint with Avahi (CUPS)

I'm trying to get my Samsung color laser working with AirPrint. There are a couple of fairly sparse tutorials around and I've got as far as I can on this one. I wonder is anyone can help me get over the final hurdle.

The printer natively supports IPP printing, so as soon as I installed Avahi it automagically started advertising this service on the network.

= br-lan IPv4 Samsung CLP-670 Series (SEC001599954BCF)      _ipp._tcp            local
   hostname = [SEC001599954BCF.local]
   address = []
   port = [631]
   txt = ["Punch=0" "Staple=F" "Sort=F" "Collate=F" "Bind=F" "PaperCustom=T" "Duplex=T" "Copies=F" "Color=T" "Binary=T" "Transparent=T" "MDL=CLP-670 Series" "MFG=Samsung" "adminurl=" "pdl=application/octet-stream,application/postscript,application/x-QPDL" "product=(Samsung CLP-670 Series)" "ty=Samsung CLP-670 Series" "priority=51" "qtotal=1" "txtvers=1"]

However no IOS devices could see it. So then, filling in the blanks from a few tutorials, I created a custom avahi service file that advertised the printer with the correct flags that would make it work with Airprint. This is the manually advertised service in avahi-browse:

= br-lan IPv4 attic-printer                                 _ipp._tcp            local
   hostname = [SEC001599954BCF.local]
   address = []
   port = [631]
   txt = ["URF=W8,SRGB24,CP1,RS600" "pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf" "Scan=F" "Sort=F" "Bind=F" "Punch=F" "Collate=F" "Copies=T" "Staple=F" "Duplex=T" "Color=T" "Fax=F" "Binary=T" "Transparent=T" "printer-type=0x801046" "printer-state=3" "product=(Samsung CLP-670 Series)" "priority=51" "note=Samsung CLP-670 Series" "adminurl=" "ty=Samsung CLP-670 Series" "qtotal=1" "txtver=1"]

Bingo, now the iOS devices could 'see' my Samnsung printer. However, when trying to print the iPad goes through all the motions ("Connecting to printer", "preparing document") but then silently fails to actually print anything.

I believe, if my reading is correct, this is because the Samsung printer (as you can see from it's native service annoucement) does not support JPG or PDF print formats and it expecting raw data or PostScript. However deugging AirPrint as a user seems to be next to impossible.

So I believe I now need to insert a CUPS server into the mix to 'proxy' the printer and translate between the PDF output of the iPad and the PS input of the printer. So I managed to compile CUPS for Openwrt and get it installed and have the printer set up in CUPS (test print works).

So then, I modified my airprint service definition for avahi to advertise the CUPS ipp printer on my router rather than the printer itself. However after this change the printer no longer shows up on the Avahi service list.

Can anyone help?

What your doing with CUPS and Avahi looks interesting.
If you can't solve it a plan B would be to use OEM printer App

Hi @supersebbo
Sorry but I don't have an answer to your question.
By the way, I'm trying to do the same thing with my old "not-smart" printer Brother MFC-7420.
I managed to get the printer works using p910nd (so, with drivers on the client) but as you know, for CUPS and AirPrint I need the OpenWRT device to "process" the document from [PDF/JPG/...] to an actual printer-capable format. How did you manage to do so with your printer? I'm using CUPS 2.1.4 (built by this guy) but I'm unable to get the PostScript "drivers" working because the ones provided by Brother are meant to run on Debian/Fedora/OSX so CUPS throws an exception when I try to import one of them.
I also tried to use this one but CUPS said Unable to open PPD file: Missing asterisk in column 1 (???). I have no clues about how to solve this issue.
It would be nice if you explain to me how did you manage to get your printer working.

Apple bought CUPS around 2008. Are you using an Apple or Linux/BSD?

In general, PostScript capable printers need minimal "processing" and can use a generic PostScript ppd.. If you want to read up on this, processing is referred to as "filtering" in the printing world. It is also possible in Linux/BSD, to build your own ppd using a template from Brother and foomatic-db.

I tried to summarize the process in a prior thread