{"id":223,"date":"2011-08-18T22:10:30","date_gmt":"2011-08-19T03:10:30","guid":{"rendered":"http:\/\/areciv.com\/blog\/?p=223"},"modified":"2021-09-22T23:10:39","modified_gmt":"2021-09-23T04:10:39","slug":"hp-laserjet-p1102w-firmware-update-on-mac","status":"publish","type":"post","link":"https:\/\/areciv.com\/blog\/2011\/08\/hp-laserjet-p1102w-firmware-update-on-mac\/","title":{"rendered":"HP LaserJet P1102w Firmware Update on Mac"},"content":{"rendered":"\n<p><strong>Update: as of the last few versions, the standard HP firmware updater appears to be working fine on the most recent OS X versions. What follows is now strictly of academic value.<\/strong><\/p>\n\n\n\n<p>I have had an HP P1102w printer for over a year now.<br>I've had no complaints about it so far, but a firmware update was recently released that adds AirPrint support, allowing printing from iOS devices.<br>The problem is: the firmware updater refuses to do anything on OS X (at least in 10.6.8 and 10.7.x).<\/p>\n\n\n\n<p>I searched but was never able to find a solution that worked.<br>So, I did what any normal person would do: I loaded it up in gdb.<\/p>\n\n\n\n<p>Apparently it gets stuck in a spin wait trying to acquire a lock to obtain the network browse results\u2026<\/p>\n\n\n\n<p>If you skip over that call, it brings up the window, just without any network printers listed. That's fine, since it's not too big of a deal to plug the printer in to USB just to do the firmware update.<\/p>\n\n\n\n<p>Download the firmware update, mount the disk image, drag the downloader to your Downloads folder, and plug in the printer via USB.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>NOTE: this will only work with the 20110512 version of the firmware update, whose md5 is <pre>MD5 (LJP1100_P1560_P1600_FW_Update.dmg) = 537ca4e21c949e201d2f956272918bc9<\/pre><\/li><li>NOTE: only try this if you know what you are doing and understand why this works\u2026 I'm not responsible if you break something\u2026<\/li><\/ol>\n\n\n\n<p>There are two methods that basically do the same thing. If you have dev tools installed, you can do Method A. Otherwise, you'd have to use Method B.<\/p>\n\n\n\n<p>Open a terminal window and do <b>one<\/b> of the following:<\/p>\n\n\n\n<p><b><strong>Method A<\/strong><\/b><\/p>\n\n\n\n<p>This method uses the debugger to set a breakpoint before calling for the network browse results, then sets the next instruction to be after, skipping the hang.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncd ~\/Downloads\/\"hp LaserJet Firmware Download Utility.app\"\/Contents\/MacOS\ngdb \"hp LaserJet Firmware Download Utility\"\nbreak *0x2925\nrun\nset $eip=0x292a\ncont\n<\/pre><\/div>\n\n\n<p><b><strong>Method B<\/strong><\/b><\/p>\n\n\n\n<p>This method creates a copy of the executable with the instructions that make the call that hangs replaced with NOPs.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncd ~\/Downloads\/&quot;hp LaserJet Firmware Download Utility.app&quot;\/Contents\/MacOS\ndd if=&quot;hp LaserJet Firmware Download Utility&quot; of=fixed bs=1 count=43301\nprintf &quot;\\220\\220\\220\\220\\220&quot; &gt;&gt; fixed\ndd if=&quot;hp LaserJet Firmware Download Utility&quot; bs=1 skip=43306 &gt;&gt; fixed\nchmod u+x fixed\n.\/fixed\n<\/pre><\/div>\n\n\n<p>A few seconds later, the firmware updater will appear and you can select the USB printer to continue. The firmware will update, the printer will reboot, et voila.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: as of the last few versions, the standard HP firmware updater appears to be working fine on the most recent OS X versions.  What follows is now strictly of academic value.<\/p>\n<p>I have had an HP P1102w printer for over a year now.<br \/>\nI've had no complaints about it so far, but a firmware update was recently released that adds AirPrint support, allowing printing from iOS devices.<br \/>\nThe problem is: the firmware updater refuses to do anything on OS X (at least in 10.6.8 and 10.7.x).<br \/>\nI searched but was never able to find a solution that worked.<br \/>\nSo, I did what any normal person would do: I loaded it up in gdb.<\/p>\n","protected":false},"author":1,"featured_media":4420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[88],"tags":[39],"class_list":["post-223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-hack"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/areciv.com\/blog\/wp-content\/uploads\/2011\/08\/hp-p1102w.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts\/223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":20,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":5326,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts\/223\/revisions\/5326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/media\/4420"}],"wp:attachment":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}