Author Topic: Using a scanner with hplip?  (Read 38794 times)

Pete

  • Hero Member
  • *****
  • Posts: 1333
  • Karma: +9/-0
    • View Profile
Using a scanner with hplip?
« on: April 19, 2019, 05:00:33 am »
Hi All

Had my Canon MG7550 pack up and decided to replace rather than repair.

As HP seem to be well supported by cups with hplip I settled on a HP Envy 6234 "all in one".
I then discovered that I needed a later build of hplip than was available from the ecups wiki... However, Paul is looking into building an update at the moment.

I did discover that a suitable version of hplip is available as an rpm and having already installed cups from rpm on my laptop I soon had a cups test page printed followed by some output from OpenOffice.

Great! Printing working, now for the question: Anybody using a scanner with hplip? - I see the rpm hplip has the scanner support files and am looking for advice/instructions on how to get this working; ideally with Tame/2 but just from the command line would be a start.


Regards

Pete

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #1 on: April 19, 2019, 11:08:09 am »
Hey Pete,

I found this in my tmp folder - http://smedley.id.au/tmp/hpaio-3.18.12-os2-20190114.zip

I can't remember what's involved to install this, and note that it's not tested. See https://www.os2world.com/forum/index.php?topic=118.0 for details on older builds

From memory, conf file needs to be copied to where all the other sane conf files are, and DLL can be anywhere, just needs to be loaded in dll.conf (with a path)

Cheers,

Paul

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +4/-2
    • View Profile
Re: Using a scanner with hplip?
« Reply #2 on: April 19, 2019, 04:36:37 pm »
If your HP printer can use network attachment (TCP/IP, wired, or WiFi), you can scan using the built in web page (doesn't work with USB attachment). Simply use a browser to open the address that the printer got (I don't have the details at the moment, but it is described in the manual). This also works with Brother printers (at least the one that I have).

Pete2

  • Newbie
  • *
  • Posts: 30
  • Karma: +4/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #3 on: April 19, 2019, 07:09:21 pm »
Hi Pete. I think you should be able to use hpaio.

I have a HP deskjet 2510 usb all-in-one. On  eCS 2.2b2 I've got the 'old' type standard CUPS installation in the root of the boot drive. I'm using hpaio 3.15.11 with hplip 3.15.11, both installed in the root of the boot drive. With this setup printing doesn't work, but following Paul's instructions I have scanning working. I've set SANE_DEFAULT_DEVICE to the value obtained by hp-mkuri, so if I type in (e.g.)

scanimage --resolution 300 >foo.jpg

it works as intended. I'm not sure how to make things work in Tame - IIRC you must add a key to scanner.dat, which can be done with an INI file editor - but I don't know what values to use, or how one is supposed to determine them.

On ArcaOS I installed CUPS via anpm into my usr tree, which isn't on the boot drive, and created a printer using Alex Taylor's printer manager. Printing worked fine (until the last upgrade, when it mysteriously stopped working.)  I'm using the same hpaio and have hplip in the root of the boot drive, but if I run hp-mkuri or scanimage - not a sausage. But YMMV.

I hope this helps a bit - and if anyone has any idea why scanimage &co won't start, any suggestions would be welcome.

ivan

  • Hero Member
  • *****
  • Posts: 1589
  • Karma: +19/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #4 on: April 19, 2019, 07:38:08 pm »
Hi Pete,

Past experience with HP Envy series printers shows that they are almost all win printers with all that entails.

If you can get to a web based setup and it allows scanning to FTP on a local network you might be able to do something and all it requires is setting up Peter's FTP server on your computer, that is what I do with scanning on my Brother DCP-9020cdw laser printer.

Pete

  • Hero Member
  • *****
  • Posts: 1333
  • Karma: +9/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #5 on: April 19, 2019, 08:10:01 pm »
Hi Doug

Scanning from the browser interface requires "web services" to be enabled which means automatic updates whether you want them of not. I think I would rather leave that disabled than suddenly find 1 day that printing does not work any more due to an irreversible update. However, if all else fails...


Regards

Pete

Pete

  • Hero Member
  • *****
  • Posts: 1333
  • Karma: +9/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #6 on: April 19, 2019, 08:22:47 pm »
Hi ivan

Yes, definitely a "win printer" - most cheap inkjets are - but that is why we have cups, Thanks to Paul, Silvan, Alex and others involved in porting the software needed.

So, No problems with getting this printing using the current rpm installed cups/hplip/other bits involved.

In fact, had the printer working with ArcaOS long before I could get it installed in WindowsXP running in VirtualPC or Windows7 running in VirtualBox - the HP Installer/Setup craps out and fails to complete install/setup. Having tested with Windows7 32bit on real hardware where there is no problem I can only guess that running in a virtual machine screws up the HP Installer.

I found where the driver pack had been extracted to in WindowsXP and managed to get most of the driver side installed - can now print but trying to scan results in a "no scanner found" message. Not really needed but nice if I can eventually get it to work.

As for scanning via browser interface Please see response to Doug - Basically I dislike automatic updates.


Regards

Pete





Pete

  • Hero Member
  • *****
  • Posts: 1333
  • Karma: +9/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #7 on: April 19, 2019, 08:48:31 pm »
Hi Pete2

Reading your post I am encouraged but currently stuck between a rock and a hard place  :-)

Explanation:

I have cups installed on my Desktop from zip files as per your eCS2.2b2 installation.

I have cups and hplip installed from rpm on my Laptop as per your ArcaOS installation.

The current hplip zip package is too old a version to support the printer so is not installed on my Desktop.

Pauls just built hpaio zip package will not work on my Desktop due to lack of hplip. I am currently trying to work out if I can add the files from the hpaio zip package to the "*nixy tree" used for rpm installed packages on my Laptop.

So, stuck between waiting for a later hplip zip package and a hpaio rpm package...

It seems hp-mkuri has been mentioned a few times much to my interest as there is no hp-mkuri file among the hplip or hpaio files...

There is a makeuri data file supplied with hplip the contents of which refer to makeuri.py - looks suspiciously like a replacement for hp-mkuri based on name similarity.

And the final problem: How would I run makeuri.py? - I suspect it is a python file?


Regards

Pete





Doug Bissett

  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +4/-2
    • View Profile
Re: Using a scanner with hplip?
« Reply #8 on: April 19, 2019, 08:55:08 pm »
Quote
Past experience with HP Envy series printers shows that they are almost all win printers with all that entails.

My brother has an HP Envy 4520. It works pretty much the same as my HP OfficeJet 3830. CUPS support seems to be excellent, and the printing is very good.

My previous printer was an HP <something> that worked almost the same. It had excellent CUPS support too. I never did get USB to work with it, because the printer was used, when I got it, and the USB connector was badly damaged.

In the newer machines, there is access to the internet, plus an open built in WiFi access point. You do have to either password that stuff, or better, just turn it off, which is easy enough from the built in web page.

The web page support (built into the printer) works very well for all of that (plus scanning), but that doesn't work if you use the USB interface.

FWIW, I also obtained a Brother <something>, which has a huge footprint. It also works with WiFi, and has a broken RJ45 connector, as well as USB. It works well over WiFi, with it's own web page support for things like setup and scanning. Not nearly as user friendly as the HP devices though. For a B/W laser printer, it does a good job, but you might need the BRLASER support package to use it with CUPS. I never bothered trying without that.

For HP printers, that are too new, you can probably get one of the older CUPS setups to work, although they may not support all of the features. HP seems to be pretty consistent in how their hardware works. I definitely can't say that for some other brands.

ivan

  • Hero Member
  • *****
  • Posts: 1589
  • Karma: +19/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #9 on: April 19, 2019, 10:20:02 pm »
Hi Doug,

If your Brother printer has built in postscript (brScript) you should be able to add its ppd to the PSPRINT driver and print directly to it.  I have both my Brother colour laser printers (DCP-9020cdw and HL-3170cdw) setup that way - all functions on both printers work including double sided printing and scanning with the 9020.

Regarding HP win printers, I have friends that bought a couple of them and could never get them to work with win 7, the installer insisted that the OS needed updating to win 8 or 10.  They ended up selling them and getting Brother printers that just worked.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #10 on: April 19, 2019, 11:43:44 pm »
Hey Pete,

Pauls just built hpaio zip package will not work on my Desktop due to lack of hplip. I am currently trying to work out if I can add the files from the hpaio zip package to the "*nixy tree" used for rpm installed packages on my Laptop.

So, stuck between waiting for a later hplip zip package and a hpaio rpm package...

It seems hp-mkuri has been mentioned a few times much to my interest as there is no hp-mkuri file among the hplip or hpaio files...

There is a makeuri data file supplied with hplip the contents of which refer to makeuri.py - looks suspiciously like a replacement for hp-mkuri based on name similarity.

And the final problem: How would I run makeuri.py? - I suspect it is a python file?

As promised whilst I was away, http://smedley.id.au/tmp/hplip-3.18.12-os2-20190416.zip - this is missing (I think) some raw PPD files due to makefile issues with os2, but might be enough to get a test print running... For some reason, this doesn't include makeuri.py :(

makeuri.py is definitely python - looks like running "python makeuri.py aaa.bbb.ccc.ddd" will generate the uri you need for sane - where aaa.bbb.ccc.ddd = the IP of your printer

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4991
  • Karma: +111/-1
    • View Profile
Re: Using a scanner with hplip?
« Reply #11 on: April 20, 2019, 01:49:53 am »
Hi Doug

Scanning from the browser interface requires "web services" to be enabled which means automatic updates whether you want them of not. I think I would rather leave that disabled than suddenly find 1 day that printing does not work any more due to an irreversible update. However, if all else fails...

You should be able to isolate the printer from the internet, just allowing it on your local network depending on your router.

Pete

  • Hero Member
  • *****
  • Posts: 1333
  • Karma: +9/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #12 on: April 20, 2019, 02:31:45 am »
Hi Dave

I suspect my (cheap) ISP supplied router may not have the capability to isolate the printer - a quick look suggests that is not possible but will look into it a little more.


Regards

Pete



Pete

  • Hero Member
  • *****
  • Posts: 1333
  • Karma: +9/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #13 on: April 20, 2019, 02:40:39 am »
Hi Paul

hplip 3.18.12 feedback

Various files need for cups to work with hplip are missing from the zip file - there are no files for putting into the cups directory tree at all.

I tried using the (obviously missing) files supplied with hplip3.17.11 (rpm) but that results in no print output and the "filter failed" message being displayed.

Checking the log this line could indicate a/the problem:-

  D [20/Apr/2019:01:07:29 +0000] [Job 1] PID 297 (/cups/lib/cups/filter/hpcups.exe) stopped with status 102 (No such file or directory)

A few lines above that I see that the filter started successfully:-

  I [20/Apr/2019:01:07:29 +0000] [Job 1] Started filter /cups/lib/cups/filter/hpcups.exe (PID 297)

And a few lines after the "stopped" line I see:-

  D [20/Apr/2019:01:07:29 +0000] [Job 1] execv failed: No such file or directory

My guess is that hpcups.exe calls another program which is either missing - or in the wrong place.

As hpcups.exe is "lifted" from the rpm package so there is a possible version mismatch but, more likely, I have missed something needed when copying files from the hplip(rpm). Also this hpcups.exe probably expects to use the "*nixy tree" which could explain why it cannot find whatever it is looking for.


Regards

Pete



Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Using a scanner with hplip?
« Reply #14 on: April 20, 2019, 04:18:27 am »
Hey Pete, there should be a hpcups.exe in that zip in /cups/lib/cups/filter

Run chkdll32 or pmdll to ensure you have the write dll's and/or try running it from a command line....