[sane-devel] Accessing HP Scanjet 4070 Photosmart Scanner - Update to reduce size to below 100 Kbytes
gebser at mousecar.com
Thu Jun 25 07:01:23 UTC 2015
On 06/23/2015 01:17 PM, Bill Strohm wrote:
> _Present Configuration_
> A DIY “Hackintosh” Mini ITX Computer;
> Gigabyte GA-H87N-WIFI motherboard, Intel Core i7 4770K CPU, 16 GB RAM,
> Samsung 840 EVO SSD 250 GB, in Thermaltake SD101 case.
> HP Scanjet 4070 Photosmart Scanner
> Mac OS X 10.10.3 “Yosemite” with boot software by tonymacx86.com
> What Works:
> Scanner works perfectly with alternate computer Macintosh PowerPC G5
> using HP “Image Zone” software.
> What Does Not Work:
> 1. Scanner used with latest "HP Scan" App installed on the “Hackintosh.”
> Following error message appears:
> 2. Attempt to use SANE software to access scanner from the “Hackintosh.”
> Have downloaded all relevant software from the following websites:
> http://sourceforge.net/projects/hp3900-series/ ;
> http://www.ellert.se/twain-sane/ (binaries only)
> The SANE Preference Pane is installed and working. The configuration
> file for the hp3900 scanner is checked, as shown:
> I did click the “Configure” button, but there was no apparent change,
> i.e. the button did not light. (If the “Saned” button is clicked, the
> resulting field is empty. Double-clicking the hp3900 item shows a list
> which includes the HP 4070 scanner, so I assume it is the correct
> In the "hp3900-series_0.12” folder downloaded from the first website
> linked above, there is a file called “INSTALL.sh” and another called
> “COMPILE.sh” which look like Terminal scripts.
> I tried double-clicking each one in turn. The result was that the Mac OS
> “Terminal” app opened and showed these error messages:
> Apparently the Terminal app is not happy with the “test: -eq:” program
> statement. I know nothing about C programming. Can you help with this?
Caveat #1: I've never used a Hackintosh, but the output you gave
screenshots for (which would be more useful if they were copy-and-pasted
into the body of the email) look like common scripting errors, not in a
C program, but rather a bash or sh script. In addition, the file
extensions, while never conclusive about a file's content, also point to
those files being bash or sh scripts.
Caveat #2: Not being able to view those scripts, I'm going on very slim
evidence. So.... I'm guessing that install.sh isn't working because
the binaries aren't present on your system. One error message gave a
subtle hint in that direction. This means (again, guessing) that
compile.sh needs to be run. However, doing that gave you a common error
message, i.e., about a "unary operator expected". If you look inside of
those files and specifically at the line numbers cited in the error
message, you should see that "-eq" operator.
The reason for the error (not seeing the content of those files, again,
I'm guessing) is probably because some variable in a comparison
operation is undefined or empty. (To a small extent this is a coding
error: the script should instead check the value of this variable and
produce a better error message rather than simply horking. So note to
You might be able to get the compile.sh and then the install.sh scripts
to work by supplying an argument to each... the absence of that argument
could be the missing variable value. To actually know, read the
documentation which came with those two files, e.g., anything like
README or INSTALL.doc etc. Moreover, to do most of the above more
easily, you should probably open a terminal window, which will give a
persistent system prompt and allow entering a series of system commands,
rather than clicking on filenames. Once in a terminal window, navigate
to the directory where the relevant files are located (using the "cd"
command), display the names of the files and directories (using the "ls"
command), and view the contents of the desired files, those mentioned
above (with either the "less" or "more" commands). Once you're
comfortable with those things and you've found the problem (perhaps by
reading the documentation), then you can try again to run "su -
./compile.sh" and then "su - ./install.sh" and see what happens.
> Please know that I had one success with all the above: If I run the
> Terminal command “scan image > test.pnm” from this website
> <http://www.ellert.se/twain-sane/faq.html>, I do in fact get a correct
> scan operation and a “.pnm” image on my hard disk. However, I have no
> idea how to proceed since the linked page goes on to treat a failure,
> and no words at all about what to do if it succeeds!
> I attempted to use Graphic Converter (version 9.7) File/Scan mode, which
> offer the options of “Scan with Image Capture,” “Scan with TWAIN…”, and
> “Select TWAIN Scanner Data Source…” but none of these work; device is
> not shown in any of the three windows, as well as in Preview and Apple’s
> Image Capture.
> This in spite of the fact that the 4070 Scanner shows up in my Mac OS X
> “About this Mac/System Report” list, as shown below:
> Bottom Line: I have no idea where to go from here! Please help if you can.
> Thanks for reading!
> —— Bill Strohm
More information about the sane-devel