I happened upon Eric Wing's page about generating Bonjour advertisements for a Lexmark printer, and was inspired to do the same. I have the same printer, but use Avahi to generate the mDNS packets.
It's a simple two step process:
<service-group>
<name>Lexmark Optra S 1625</name>
<service protocol="ipv4">
<type>_printer._tcp</type>
<port>515</port>
<host-name>lexmark.lan</host-name>
<txt-record>product=(Lexmark Optra S 1625 Laser Printer) pdl=application/postscript,application/vnd.hp-PCLXL Color=F Collate=T Staple=F</txt-record>
</service>
<service protocol="ipv4">
<type>_ipp._tcp</type>
<port>631</port>
<host-name>lexmark.lan</host-name>
<txt-record>priority=20 product=(Lexmark Optra S 1625 Laser Printer) pdl=application/postscript,application/vnd.hp-PCLXL Color=F Collate=T Staple=F</txt-record>
</service>
<service protocol="ipv4">
<type>_pdl-datastream._tcp</type>
<port>9100</port>
<host-name>lexmark.lan</host-name>
<txt-record>product=(Lexmark Optra S 1625 Laser Printer) pdl=application/postscript,application/vnd.hp-PCLXL Color=F Collate=T Staple=F</txt-record>
</service>
<service protocol="ipv4">
<type>_ftp._tcp</type>
<port>21</port>
<host-name>lexmark.lan</host-name>
<txt-record>u=anonymous p=pass path=/prt0</txt-record>
</service>
<service protocol="ipv4">
<type>_tftp._tcp</type>
<port>69</port>
<host-name>lexmark.lan</host-name>
</service>
<service protocol="ipv4">
<type>_http._tcp</type>
<port>80</port>
<host-name>lexmark.lan</host-name>
<txt-record>path=/</txt-record>
</service>
</service-group>
I've only tested this with Bonjour for Windows, but it does seem to work.
You'll see that I've specified IPP as a supported protocol, despite Eric stating that these machines don't support it. My printer's Ethernet card supports all the protocols listed here, and I don't know why Eric's doesn't.
Update: I've updated the printer product name so that it matches the PPD files (thus complying with the Bonjour print specifications). I've also added some txt record entries that are supposedly optional, but their absence causes Apple's software to misbehave.
As an aside, I've configured the DNS server on my router with static DNS SD records. As a result, I no longer need to have my Linux box running for the Bonjour records for my printer to be available.
Written 6-May-08, Updated 24-May-08
© Peter Ortner 1994-2008. All rights reserved.
Contact