{"id":530,"date":"2024-05-06T13:39:19","date_gmt":"2024-05-06T05:39:19","guid":{"rendered":"https:\/\/su.f3ck.cc\/?p=530"},"modified":"2024-05-08T12:59:14","modified_gmt":"2024-05-08T04:59:14","slug":"openwrt-%e5%ae%9e%e7%8e%b0hp1020%e6%89%93%e5%8d%b0%e6%9c%ba%e7%bd%91%e7%bb%9c%e5%85%b1%e4%ba%ab","status":"publish","type":"post","link":"https:\/\/su.f3ck.cc\/?p=530","title":{"rendered":"OpenWRT \u5b9e\u73b0HP1020\u6253\u5370\u673a\u7f51\u7edc\u5171\u4eab"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">1\u3001\u4e0b\u8f7dHP1020\u56fa\u4ef6\u6587\u4ef6<a href=\"https:\/\/www.pizzayy.com\/wp-content\/uploads\/2023\/09\/sihp1020.dl\"><code>sihp1020.dl<\/code><\/a>\u6587\u4ef6\u81f3<code>\/etc<\/code>\u76ee\u5f55<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">2\u3001\u5728USB\u70ed\u62d4\u63d2\u89e6\u53d1\u76ee\u5f55\u4e0b\u5efa\u7acb\u89e6\u53d1\u811a\u672c\uff1a<code>VI \/etc\/hotplug.d\/usb\/Printer-HP1020<\/code><\/h3>\n\n\n\n<p><code>#!\/bin\/sh set -e # \u56fa\u4ef6\u8def\u5f84 FIRMWARE=\/etc\/sihp1020.dl # \u6253\u5370\u673a\u8def\u5f84\uff0c\u53ef\u4ee5\u4eceOpenWRT\u7684USB\u6253\u5370\u673a\u754c\u9762\u4e2d\u4e2d\u67e5\u770b DEVICE=\/dev\/usb\/lp0 # Debug Log File LOGFILE=\/tmp\/hp1020 if [ \"$PRODUCT\" = \"3f0\/2b17\/100\" -a \"$ACTION\" = \"bind\" -a \"$DEVTYPE\" = \"usb_device\" ]; then echo \"$(date): USB printer binded. Trying to upload firmware...\" &gt;&gt; $LOGFILE cat $FIRMWARE &gt; $DEVICE echo \"$(date): Success. Done.\" &gt;&gt; $LOGFILE exit fi<\/code><\/p>\n\n\n\n<p>\u52a0\u5165\u9996\u6b21\u542f\u52a8 local startup \/etc\/rc.local<\/p>\n\n\n\n<p>cat \/etc\/sihp1020.dl &gt;&gt; \/dev\/usb\/lp0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3\u3001\u5b9e\u73b0\u6548\u679c\uff1a<\/h3>\n\n\n\n<p>\u6253\u5370\u673a\u5f00\u673a\u540e\u89e6\u53d1USB\u70ed\u63d2\u62d4\u4e8b\u4ef6\uff0cHP1020\u6253\u5370\u673a\u7eff\u706f\u5e38\u4eae\u5e76\u7acb\u5373\u8fdb\u884c\u81ea\u68c0\uff0c\u7136\u540e\u7ea2\u706f\u7eff\u706f\u4ea4\u66ff\u95ea\u70c1\u518d\u6b21\u81ea\u68c0\uff0c\u968f\u540e\u7eff\u706f\u5e38\u4eae<\/p>\n\n\n\n<p>\u51fa\u5904\uff1a https:\/\/www.pizzayy.com\/openwrt-\u5b9e\u73b0hp1020\u6253\u5370\u673a\u7f51\u7edc\u5171\u4eab.html?doing_wp_cron=1714973122.5799219608306884765625<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u4e0b\u8f7dHP1020\u56fa\u4ef6\u6587\u4ef6sihp1020.dl\u6587\u4ef6\u81f3\/etc\u76ee\u5f55 2\u3001\u5728USB\u70ed\u62d4\u63d2\u89e6\u53d1\u76ee\u5f55\u4e0b\u5efa\u7acb\u89e6\u53d1\u811a\u672c &hellip; <a href=\"https:\/\/su.f3ck.cc\/?p=530\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cOpenWRT \u5b9e\u73b0HP1020\u6253\u5370\u673a\u7f51\u7edc\u5171\u4eab\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[17,15,4],"class_list":["post-530","post","type-post","status-publish","format-standard","hentry","category-1","tag-linux","tag-15","tag-4"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":400,"url":"https:\/\/su.f3ck.cc\/?p=400","url_meta":{"origin":530,"position":0},"title":"Debian 11\u642d\u5efanaiveproxy\u670d\u52a1\u5668","author":"suhaha","date":"2022-12-09","format":false,"excerpt":"naiveproxy \u662f\u57fa\u4e8ecaddy\u4f7f\u7528go\u8bed\u8a00\u5f00\u53d1\u7684\u4e00\u4e2a\u8f6c\u53d1\u670d\u52a1\u5668\u3002\u4f5c\u8005\u7684github\u5730\u5740 ht\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":538,"url":"https:\/\/su.f3ck.cc\/?p=538","url_meta":{"origin":530,"position":1},"title":"macOS Gemini CLI \u5b89\u88c5","author":"suhaha","date":"2025-07-01","format":false,"excerpt":"1.\u5b89\u88c5npm # Download and install nvm: curl -o- https\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":477,"url":"https:\/\/su.f3ck.cc\/?p=477","url_meta":{"origin":530,"position":2},"title":"warp-cli \u89e3\u51b3chatGPT\u8bbf\u95ee\u9650\u5236","author":"suhaha","date":"2023-03-08","format":false,"excerpt":"https:\/\/developers.cloudflare.com\/warp-client\/get-\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":261,"url":"https:\/\/su.f3ck.cc\/?p=261","url_meta":{"origin":530,"position":3},"title":"iMacM1\u7cfb\u7edfps\u65e0\u6cd5\u5bfc\u51fa \u5bfc\u51fa\u65f6\u663e\u793a\u672a\u77e5\u9519\u8bef","author":"suhaha","date":"2021-11-03","format":false,"excerpt":"\u9009\u4e2d\u4e0b\u9762\u8fd9\u4e2a\u540e\u5373\u53ef\u3002 \u6587\u4ef6\u2014\u2014\u5bfc\u51fa\u2014\u2014\u5bfc\u51fa\u9996\u9009\u9879\u2014\u2014\u6280\u672f\u9884\u89c8\u2014\u2014\u4f18\u5316\u5bfc\u51fa\u4e3a","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/11\/9b501cce-9045-4479-8fb5-aed6a255acb8-710-00000021a788a475_file-scaled.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/11\/9b501cce-9045-4479-8fb5-aed6a255acb8-710-00000021a788a475_file-scaled.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/11\/9b501cce-9045-4479-8fb5-aed6a255acb8-710-00000021a788a475_file-scaled.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/11\/9b501cce-9045-4479-8fb5-aed6a255acb8-710-00000021a788a475_file-scaled.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/11\/9b501cce-9045-4479-8fb5-aed6a255acb8-710-00000021a788a475_file-scaled.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/11\/9b501cce-9045-4479-8fb5-aed6a255acb8-710-00000021a788a475_file-scaled.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":325,"url":"https:\/\/su.f3ck.cc\/?p=325","url_meta":{"origin":530,"position":4},"title":"\u81f4\u547d\u8d25\u5c40\uff1a\u707e\u96be\u6027\u7684\u51b3\u7b56\u662f\u5982\u4f55\u505a\u51fa\u7684\uff08\u8f6c\u8f7d\uff09\uff1f","author":"suhaha","date":"2022-11-03","format":false,"excerpt":"\u3010\u751f\u4e8e\u4e1c\u4eac\u7684\u5800\u7530\u6c5f\u7406\uff08Eri Hotta\uff09\uff0c\u5148\u540e\u5728\u65e5\u672c\u3001\u7f8e\u56fd\u548c\u82f1\u56fd\u63a5\u53d7\u6559\u80b2\uff0c\u5e76\u5148\u540e\u6267\u6559\u4e8e\u725b\u6d25\u3001\u4e1c\u4eac\u548c\u2026","rel":"","context":"\u5728\u201c\u6587\u6458\u201d\u4e2d","block_context":{"text":"\u6587\u6458","link":"https:\/\/su.f3ck.cc\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":264,"url":"https:\/\/su.f3ck.cc\/?p=264","url_meta":{"origin":530,"position":5},"title":"\u60c5\u7eea","author":"suhaha","date":"2021-11-16","format":false,"excerpt":"\u627f\u8ba4\u6124\u6012\u7684\u771f\u5b9e\u6027\u548c\u6b63\u5f53\u6027\uff0c\u627f\u8ba4\u5b83\u662f\u53ef\u4ee5\u7406\u89e3\u7684\u3001\u60c5\u7406\u4e4b\u4e2d\u7684\u2014\u2014\u5c3d\u7ba1\u5b83\u4e0d\u662f\u4f60\u60f3\u8981\u7684\u3002 \u6bd4\u5982\uff1a\u60f3\u8c61\u4e00\u4e0b\uff0c\u4f60\u2026","rel":"","context":"\u5728\u201c\u6587\u6458\u201d\u4e2d","block_context":{"text":"\u6587\u6458","link":"https:\/\/su.f3ck.cc\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=530"}],"version-history":[{"count":1,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions"}],"predecessor-version":[{"id":531,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions\/531"}],"wp:attachment":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}