{"id":42,"date":"2012-11-07T19:27:45","date_gmt":"2012-11-07T19:27:45","guid":{"rendered":"http:\/\/honza.paws.cz\/?p=42"},"modified":"2013-05-19T18:37:53","modified_gmt":"2013-05-19T17:37:53","slug":"openwrt-a-sane","status":"publish","type":"post","link":"http:\/\/honza.paws.cz\/?p=42","title":{"rendered":"OpenWRT a SANE"},"content":{"rendered":"<p style=\"text-align: justify;\">Dnes jsem se pustil do souboje se SANE a all-in-one HP Officejet G55. Tisk je u\u017e rozb\u011bhan\u00fd, ale skenov\u00e1n\u00ed je ob\u010das tak\u00e9 t\u0159eba. <span style=\"font-family: 'Courier New', Courier, monospace;\">sane-find-scanner<\/span> tvrdo\u0161\u00edjn\u011b odm\u00edt\u00e1 cokoliv p\u0159iznat, s parametrem <span style=\"font-family: 'Courier New', Courier, monospace;\">-v<\/span> jsem zjistil, \u017ee prohled\u00e1v\u00e1 <span style=\"font-family: 'Courier New', Courier, monospace;\">\/dev\/usb\/scannerX<\/span>, jen\u017ee moje za\u0159\u00edzen\u00ed se nach\u00e1z\u00ed pod \/<span style=\"font-family: 'Courier New', Courier, monospace;\">dev\/2-1.2<\/span>, nev\u00edm pro\u010d, ale nic s t\u00edm nenad\u011bl\u00e1m, snad jedin\u011b symlink do on\u011bch prohled\u00e1van\u00fdch m\u00edst. Pak sice p\u0159izn\u00e1, \u017ee n\u011bco nalezl, ale nev\u00ed co. Mezit\u00edm jsem j\u00e1 nalezl n\u011bkoliker\u00fd p\u0159eklep v <span style=\"font-family: 'Courier New', Courier, monospace;\">\/etc\/sane.d\/dll.conf<\/span>. J\u00e1 m\u00e1m <span style=\"font-family: 'Courier New', Courier, monospace;\">hplip<\/span>, tak\u017ee do souboru p\u0159ip\u00ed\u0161i na novou \u0159\u00e1dku <span style=\"font-family: 'Courier New', Courier, monospace;\">hpaio<\/span> a zkou\u0161\u00edm <span style=\"font-family: 'Courier New', Courier, monospace;\">scanimage -L<\/span>, kter\u00fd je nyn\u00ed naprosto precizn\u00ed a scanner funguje, p\u0159esto \u017ee <span style=\"font-family: 'Courier New', Courier, monospace;\">sane-find-scanner<\/span> st\u00e1le hl\u00e1s\u00ed, \u017ee nev\u00ed co na\u0161el. <span style=\"font-family: 'Courier New', Courier, monospace;\">scanimage -T<\/span> v\u0161e stvrzuje a te\u010f je t\u0159eba vypropagovat skener do s\u00edt\u011b.<\/p>\n<p style=\"text-align: justify;\">Za t\u00edmto \u00fa\u010delem mus\u00ed b\u00fdt jak na stran\u011b klienta, tak serveru odkomentovan\u00fd \u0159\u00e1dek <span style=\"font-family: Courier New, Courier, monospace;\">net<\/span> v souboru <span style=\"font-family: Courier New, Courier, monospace;\">dll.conf<\/span> a nav\u00edc na stran\u011b klienta p\u0159idat do backendu <span style=\"font-family: Courier New, Courier, monospace;\">net<\/span> (<span style=\"font-family: Courier New, Courier, monospace;\">net.conf<\/span>) p\u0159idat adresu serveru, bu\u010fto v podob\u011b hostname, \u010di b\u011b\u017en\u00e9 IP adresy. No a v Ubuntu spust\u00edme jednoduch\u00e9 skenov\u00e1n\u00ed a jedeme. Na Windows jsem na\u0161el poveden\u00fd program\u00a0<b>SaneTwain\u00a0<\/b>(<a href=\"http:\/\/sanetwain.ozuzo.net\/\">http:\/\/sanetwain.ozuzo.net\/<\/a>).<\/p>\n<p>I own HP OfficeJet G55 which is all-in-one device. My problem is that it&#8217;s not situated neither in <span style=\"font-family: Courier New, Courier, monospace;\">\/dev\/lp0<\/span> nor <span style=\"font-family: Courier New, Courier, monospace;\">\/dev\/usb<\/span> or whatever, but in <span style=\"font-family: Courier New, Courier, monospace;\">\/dev\/2-1.2<\/span>. Since <span style=\"font-family: Courier New, Courier, monospace;\">sane-find-scanner<\/span> seek the scanner in <span style=\"font-family: Courier New, Courier, monospace;\">\/dev\/usb\/scannerX<\/span>, I did:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\">mkdir \/dev\/usb<\/span><\/p>\n<p>and<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\">\u00a0ln -s \/dev\/2-1.2 \/dev\/usb\/scanner<\/span><\/p>\n<p>and also<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\">chmod 666 \/dev\/usb\/scanner<\/span><\/p>\n<p>Since then\u00a0<span style=\"font-family: Courier New, Courier, monospace;\">sane-find-scanner<\/span> find something unrecognzed.<\/p>\n<p>To <span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/sane.d\/dll.conf<\/span> put new row:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\">hpaio<\/span><\/p>\n<p>if you use <span style=\"font-family: Courier New, Courier, monospace;\">hplip<\/span>.<\/p>\n<p>After that <span style=\"font-family: Courier New, Courier, monospace;\">scanimage -L<\/span> and also <span style=\"font-family: Courier New, Courier, monospace;\">scanimage -T<\/span> should work. Then make scanner useable through network you need <span style=\"font-family: Courier New, Courier, monospace;\">xinetd<\/span> configured:<\/p>\n<p>To <span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/xinetd.d\/saned<\/span> put:<\/p>\n<pre>service saned\r\n  {\r\n\u00a0 \u00a0 \u00a0 \u00a0 disable \u00a0 \u00a0 \u00a0 \u00a0= no\r\n\u00a0 \u00a0 \u00a0 \u00a0 socket_type \u00a0 \u00a0= stream\r\n\u00a0 \u00a0 \u00a0 \u00a0 wait \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 = no\r\n\u00a0 \u00a0 \u00a0 \u00a0 user \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 = root\r\n\u00a0 \u00a0 \u00a0 \u00a0 group \u00a0 \u00a0 \u00a0 \u00a0 \u00a0= root\r\n\u00a0 \u00a0 \u00a0 \u00a0 server \u00a0 \u00a0 \u00a0 \u00a0 = \/usr\/sbin\/saned\r\n\u00a0 \u00a0 \u00a0 \u00a0 port \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 = 6566\r\n\u00a0 \u00a0 \u00a0 \u00a0 protocol \u00a0 \u00a0 \u00a0 = tcp\r\n\u00a0 }\r\n<\/pre>\n<p>To <span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/services<\/span> put new row:<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">sane 6566\/tcp #sane port<\/span><\/p>\n<p>To <span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/sane.d\/saned.conf<\/span> add new row:<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">192.168.1.0\/24<\/span><\/p>\n<p>or another according to your network setup that allowes computers from local network to connect.<\/p>\n<p>In <span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/sane.d\/dll.conf\u00a0<\/span>let the row with <span style=\"font-family: Courier New, Courier, monospace;\">net<\/span> uncomented both on server and client side. On client side add to <span style=\"font-family: Courier New, Courier, monospace;\">net\u00a0<\/span>backend <span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/sane.d\/net.conf<\/span> hostname or IP address of server. That should be all. Now find some sane frontend, in Ubuntu default Easy Scan works well, on Windows I use very good SaneTwain (<a href=\"http:\/\/sanetwain.ozuzo.net\/\">http:\/\/sanetwain.ozuzo.net\/<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dnes jsem se pustil do souboje se SANE a all-in-one HP Officejet G55. Tisk je u\u017e rozb\u011bhan\u00fd, ale skenov\u00e1n\u00ed je ob\u010das tak\u00e9 t\u0159eba. sane-find-scanner tvrdo\u0161\u00edjn\u011b odm\u00edt\u00e1 cokoliv p\u0159iznat, s parametrem -v jsem zjistil, \u017ee prohled\u00e1v\u00e1 \/dev\/usb\/scannerX, jen\u017ee moje za\u0159\u00edzen\u00ed se nach\u00e1z\u00ed pod \/dev\/2-1.2, nev\u00edm pro\u010d, ale nic s t\u00edm nenad\u011bl\u00e1m, snad jedin\u011b symlink do on\u011bch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/honza.paws.cz\/index.php?rest_route=\/wp\/v2\/posts\/42"}],"collection":[{"href":"http:\/\/honza.paws.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/honza.paws.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/honza.paws.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/honza.paws.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":5,"href":"http:\/\/honza.paws.cz\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":337,"href":"http:\/\/honza.paws.cz\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions\/337"}],"wp:attachment":[{"href":"http:\/\/honza.paws.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/honza.paws.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/honza.paws.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}