{"id":74,"date":"2009-09-27T12:16:04","date_gmt":"2009-09-27T01:16:04","guid":{"rendered":"http:\/\/menhennitt.com.au\/wordpress\/?p=74"},"modified":"2011-06-22T22:49:08","modified_gmt":"2011-06-22T11:49:08","slug":"printing-to-an-hp-laserjet-1020-from-freebsd-8-using-cups-and-foo2zjs","status":"publish","type":"post","link":"https:\/\/menhennitt.com.au\/wordpress\/2009\/09\/27\/printing-to-an-hp-laserjet-1020-from-freebsd-8-using-cups-and-foo2zjs","title":{"rendered":"Printing to an HP Laserjet 1020 from FreeBSD 8 using CUPS and foo2zjs"},"content":{"rendered":"<p>This is an update to <a href=\"http:\/\/menhennitt.com.au\/wordpress\/2009\/07\/22\/printing-to-an-hp-laserjet-1020-from-freebsd-using-cups-and-foo2zjs\">my post<\/a> for FreeBSD 7. I&#8217;ve now upgraded to FreeBSD 8 and things are done a bit differently.<br \/>\n<!--more--><\/p>\n<h2>Custom Kernel<\/h2>\n<p>There&#8217;s no need to build a custom kernel any more since FreeBSD uses the ulpt device (as it always should have!). That device is built in to the GENERIC kernel and the device is correctly recognised at boot time. The remainder of this post is about changing to the new device name.<\/p>\n<h2>Build and install ports<\/h2>\n<p>This is the same as previously.<\/p>\n<h2>Set device permissions<\/h2>\n<p>The devfs.rules entry needs to use the new device name. It also needs to set the permission of some extra devices, otherwise CUPS won&#8217;t find the printer. Look in the output of <em>dmesg<\/em> for the USB entry that corresponds to the printer. Mine looks like:<\/p>\n<p style=\"padding-left: 30px;\"><code>ugen5.5: &lt;Hewlett-Packard&gt; at usbus5<br \/>\nulpt0: &lt;Hewlett-Packard HP LaserJet 1020, class 0\/0, rev 2.00\/1.00, addr 5&gt; on usbus5<\/code><\/p>\n<p>So the new devfs.rules entry is:<\/p>\n<p style=\"padding-left: 30px;\"><code>[printers=10]<br \/>\nadd path 'ulpt0' mode 0660 group cups<br \/>\nadd path 'ugen5.5' mode 0660 group cups<br \/>\nadd path 'usb\/5.5.0' mode 0660 group cups<\/code><\/p>\n<p>The rc.conf entry is the same as before.<\/p>\n<h2>Install firmware<\/h2>\n<p>The firmware needs to be sent to the new device name:<\/p>\n<p style=\"padding-left: 30px;\"><code>cat \/usr\/local\/share\/foo2zjs\/firmware\/sihp1020.dl &gt; \/dev\/ulpt0<\/code><\/p>\n<p>Likewise, \/etc\/devd.conf is changed to:<\/p>\n<p style=\"padding-left: 30px;\"><code># Firmware download HP Laserjet 1020 printer<br \/>\nattach 100 {<br \/>\nmatch \"vendor\"  \"0x03f0\";<br \/>\nmatch \"product\" \"0x2b17\";<br \/>\naction \"cat \/usr\/local\/share\/foo2zjs\/firmware\/sihp1020.dl &gt; \/dev\/$device-name\";<br \/>\n};<\/code><\/p>\n<h2>Configure CUPS to use the printer<\/h2>\n<p>This is the same as before except the device URI is now &#8220;usb:\/dev\/ulpt0&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is an update to my post for FreeBSD 7. I&#8217;ve now upgraded to FreeBSD 8 and things are done a bit differently.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[15,17,7,16,14],"_links":{"self":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/74"}],"collection":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":9,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/74\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}