
{"id":33,"date":"2021-08-31T16:56:37","date_gmt":"2021-08-31T16:56:37","guid":{"rendered":"http:\/\/pi-smb\/wordpress\/?p=33"},"modified":"2021-08-31T16:56:37","modified_gmt":"2021-08-31T16:56:37","slug":"network-scanners-and-fedora-20","status":"publish","type":"post","link":"https:\/\/dsslit.ddns.net\/wordpress\/?p=33","title":{"rendered":"Network Scanners and Fedora 20"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Here is a quick fix that might help users experiencing the \u201cno devices available\u201d problem when using&nbsp;<strong>xsane<\/strong>, the Linux scanning tool.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this case, the device was an HP 3070 B611, a combined printer and scanner. The OS (Fedora 20) was able to see the device as a printer and print okay, but the scanner part did not work. Xsane just popped a small window saying unable to find device.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fix was a change in the CUPS configuration, and it may therefore work with other versions of Linux.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: (19th June 2016) This article receives an unexpectedly large number of hits.&nbsp; If you have come here expecting something else, for example information about network scanners like nmap or Wireshark, please leave a comment to that affect and I will adjust the keyword settings.&nbsp; This article is about document scanners, not software to snoop your LAN.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">General Printing\/Scanning Setup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I had already installed hplip, xsane and the sane backends. If you are missing those, they can be installed as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># <strong>yum install hplip<\/strong>\n# <strong>yum install hplip-gui<\/strong>\n# <strong>yum install xsane<\/strong>\n# <strong>yum sane-backends sane-backends-drivers-scanners<\/strong><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure you have&nbsp;<strong>libsane-hpaio.x86_64&nbsp;<\/strong>(or 32 bit equivalent). It should have installed automatically as part of hplip-gui.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Xsane Unable to See Scanner<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every time I started&nbsp;<strong>Xsane<\/strong>, there would be a pause then it would show a small dialogue saying \u201cno devices available\u201d. If you get the same, try this tip from the&nbsp;<a href=\"http:\/\/hplipopensource.com\/node\/212\">hplip<\/a>&nbsp;web site. Invoke&nbsp;<strong>xsane<\/strong>&nbsp;on the command line, with your scanner URL as argument. In my case it was:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">#&nbsp;<strong>xsane -V hpaio:\/net\/Deskjet_3070_B611_series?ip=192.168.1.66<br><\/strong><br>\u2026 and it worked. Xsane opened up fine and I could scan. It seems that previously, when I clicked \u201cxsane\u201d in the menus (desktop was XFCE), or just typed \u201cxsane\u201d on the command line, xsane was running with the wrong URI by default, and failing to contact the scanner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(<strong>NB<\/strong>: You would not normally run xsane as root, it is not recommended. But I have shown the invokation as root because that is how it happed in this case. Running as non-root might also have worked, as it did subsequently. Also, you don\u2019t actually need the \u201c-V\u201d, that just tells the program to open in viewer mode).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fix for Scanimage too<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The command line tool&nbsp;<strong>scanimage<\/strong>&nbsp;can be fixed in a similar way. Specify the device url as in this example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ scanimage&nbsp;<strong>\u2013device-name hpaio:\/net\/Deskjet_3070_B611_series?ip=192.168.1.66<\/strong>&nbsp;\u2013mode Color \u2013resolution 200<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Incidentally, on the subject of scanimage, I use the following command to scan an image directly into a pdf file:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$&nbsp;<strong>scanimage \u2013device-name hpaio:\/net\/Deskjet_3070_B611_series?ip=192.168.1.66 \u2013mode Color \u2013resolution 200 | gm convert pgm:- pdf:myimage.pdf<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Requires the GraphicsMagick package to be installed (yum install GraphicsMagick).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Permanent Fix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After the above procedure, I found that just typing \u201c<strong>xsane<\/strong>\u201d with no arguments also worked, as if the above procedure has altered the system configuration. And choosing xsane from the XFCE menus worked too. Checking the config files, I found that&nbsp;<strong>\/etc\/cups\/printers.conf<\/strong>&nbsp;had changed. (Usefuly, cups keeps a backup copy in the same directory).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># <strong>cd \/etc\/cups<\/strong>\n# <strong>diff printers.conf printers.conf.O<\/strong>\n...\n DeviceURI hp:\/net\/Deskjet_3070_B611_series?ip=192.168.1.66\n---\n DeviceURI socket:\/\/192.168.1.66:9100<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It seems that CUPS was sonfigured with an incorrect scanner URI (the&nbsp;<em>socket:<\/em>&nbsp;one) and updating it (to&nbsp;<em>hp:\/net<\/em>\u2026) fixed the problem. Just editing the file \/etc\/cups\/printers.conf might also have provided a fix, but that is not recommended. If you choose to do it, restart the cupsd daemon afterwards.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NB<\/strong>&nbsp;notice the corrected URI is however not identical to the command line one, it is \u201chp:\u201d, whereas the command line URI started with \u201chpaio:\u201d. The CUPS configuration GUI (http:\/\/127.0.0.1:631) also shows the&nbsp;<em>hp:<\/em>&nbsp;version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Doing the Same Fix in Other Ways<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this case (Fedora 20\/XFCE), the change could also have been made by selecting from the XFCE menu -&gt; Administration -&gt; Print Settings -&gt; right click on printer -&gt; properties and then changing the \u201cDevice URI\u201d field.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As stated it is also possible to just edit and correct the file \/etc\/cups\/printers.conf, provided you restart cupsd afterwards.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a quick fix that might help users experiencing the \u201cno devices available\u201d problem when using&nbsp;xsane, the Linux scanning tool. In this case, the device was an HP 3070 B611, a combined printer and scanner. The OS (Fedora 20) was able to see the device as a printer and print okay, but the scanner &hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-linux","category-pi"],"_links":{"self":[{"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":0,"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"wp:attachment":[{"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dsslit.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}