WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Hplip  (Read 16336 times)

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Hplip
« on: March 27, 2020, 04:14:11 PM »
On 64-bit at least hplip also requires bash and python3.6. I can't get the plugin installer working. I got as far as finding out that it requires python-policykit which requires pip at this point, but neither are in the repository. Pip was easy enough to install, but python-policykit 0.4 doesn't want to install because it wants python 3.7. If there is a version that works with 3.6 I haven't found it yet. Since my host box is Slackware I reinstalled the plugins there and duplicated the new file structure into an extension. I installed it, but I don't know how I can test that it is doing anything. I did finally get a two sided color test page out of my M477, so it can work. I haven't tried the scanner or fax yet. Don't know if it will work after I reboot.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #1 on: March 27, 2020, 10:06:10 PM »
The latest hplip has dbus-python3.6 as a dep, so python3.6 should have been loaded.

It seems that network connected (as opposed to directly connected) printers behave differently with hplip. Some years back when I had a usb connected printer, pil was required with hp-scan (so maybe python3.6-pillow will work), but now hp-scan cannot even find my printer.

I can scan using the simple-scan extension, but I need to give it the address:
Code: [Select]
$ hp-makeuri 192.168.1.170
...
CUPS URI: hp:/net/Officejet_6700?ip=192.168.1.170
SANE URI: hpaio:/net/Officejet_6700?ip=192.168.1.170
HP Fax URI: hpfax:/net/Officejet_6700?ip=192.168.1.170

$ simple-scan hpaio:/net/Officejet_6700?ip=192.168.1.170

I had understood that python3.6 contained pip, so I'll look at that and python-policykit.
« Last Edit: March 27, 2020, 10:21:43 PM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #2 on: March 27, 2020, 11:44:24 PM »
The python3.6 extension does provide pip, but as you say, a python3.6 version of policykit does not exist:
Code: [Select]
$ sudo pip3.6 install policykit
Collecting policykit
  Could not find a version that satisfies the requirement policykit (from versions: )
No matching distribution found for policykit

policykit can be compiled for python3.6:
Code: [Select]
$ python3.6 setup.py build
$ sudo python3.6 setup.py install --root=/tmp/pkg

..but it also needs this lot:
Code: [Select]
PyYAML<6.0,>=5.1
attrs<20.0,>=19.3
click<8.0,>=7.0
colorama<0.5.0,>=0.4.1
dataclasses-json<0.4.0,>=0.3.5
delegator.py<0.2.0,>=0.1.1

..however, they can be installed with pip3.6  :)

(note that you need to use "sudo pip3.6 install 'dataclasses_json==0.3.6'"
« Last Edit: March 27, 2020, 11:53:37 PM by Juanito »

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Hplip
« Reply #3 on: March 28, 2020, 08:11:17 AM »
After all this to get the plugin installer working I'm looking back on the prize and asking what would the TC way be, and that is to have an extension that is ready to run. It's possible to get the files out of the plugin package using --noexec and --keep. A script that gets the plugin package that matches the hplip version, extracts the files, and puts them in a tree where they belong should be what a TC maintainer would need. It turns out that to print from firefox the extensions colord.tcz and rest.tcz need to be loaded, and a lot of patience. This much works without the plugins. I suppose they're needed for scan and fax, but I haven't tested that yet.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #4 on: March 29, 2020, 12:13:36 AM »
welcome to the cups/hplip twilight zone..

Offline techsuper

  • Newbie
  • *
  • Posts: 34
Re: Hplip
« Reply #5 on: April 03, 2020, 08:33:48 AM »
Hello, this looks like the right place to post this.
Sorry if I missed something obvious.
I'm getting quite frustrated over such a simple (or really should be) task.
I have cups installed and verified its running.
I can go to localhost:631/admin and add a printer, but I can't get the right driver installed (I think).
The HPLIP website shows it as a supported printer in the 3.20 branch.
On the HPLIP website, I used the recommended option and chose Others since their isn't a Core or Tiny Core listed.
Following their instructions for an automatic install (sh filename.run), yields an error. It creates the directory, but displays an error "eval:line 1/hplip-install: not found". Though there is a file with that name in the new directory.
Other posts on the net say to run hp-setup to configure, but no such file exists that I can locate using the Find command.
Any help is greatly appreciated.
Brent

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #6 on: April 03, 2020, 09:16:32 AM »
Are you using the tinycore hplip extension?

Offline techsuper

  • Newbie
  • *
  • Posts: 34
Re: Hplip
« Reply #7 on: April 04, 2020, 08:04:39 AM »
yes, thank you.
I used the Download and load option for both files. (hplip_ppd.tcz and hplip.tcz)
the HPLIP site (developers.hp.com) says my p1505 printer is supported with a minimum version of 2.8.2.
The hplip_ppd.tcz in TC shows as version 3.13.11, but it doesn't have a choice for the 1505.
Silly me, thinking I could download the hplip-3.20.3.run file and use the 'SH filename' to install it as shown...

brent

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #8 on: April 04, 2020, 08:15:10 AM »
You should only need to load the hplip extension (which will load the cups extension) - you should not need the hplip_ppd extension.

When you use the cups "add printer" dialogue, it should automatically find your printer and propose an appropriate hplip driver built in real time.

The hplip version in tc-11.x is hplip-3.20.3, which version of tinycore are you using?

Offline techsuper

  • Newbie
  • *
  • Posts: 34
Re: Hplip
« Reply #9 on: April 05, 2020, 10:08:26 AM »
Its TC 11.0
CUPS presents the Make as HP, wants me to choose a Model from the list - which p1505 isn't available.
If I choose something generic like HP Laserjet Series PCL 4/5 or 6, it either doesn't do anything or prints
%%%%if  you can read this, your using the wrong driver for your printer. %%%%.

Wait a minute, Developers.hp show the p1505 twice.
One entry says Driver plug-on Optional and the other says Driver plug-in Required.
Now, HOW to find a driver plug-in?
thanks for the help.
brent

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #10 on: April 05, 2020, 10:54:04 AM »
If your printer is connected directly to your computer, what does the hp-info command show?

Offline techsuper

  • Newbie
  • *
  • Posts: 34
Re: Hplip
« Reply #11 on: April 05, 2020, 06:27:03 PM »
No, its networked so Win 10 pc's can print also.
you'll have to provide a little more detail, please.
Apps / browse  doesn't have a listing for hp-info.
Typing hp-info in a Terminal yields sh: hp-info: not found.
cd / and using the 'Find . -name *hp-info' yields no files found.
How do i run such a command?
thank you,
brent

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Hplip
« Reply #12 on: April 05, 2020, 06:52:28 PM »
Hi techsuper
hp-info  is part of  hplip.tcz.  You said:
... I used the Download and load option for both files. (hplip_ppd.tcz and hplip.tcz) ...

That means  hplip.tcz  was not added to your  onboot.lst  file. So if you rebooted, it would not  load automatically.

If you execute:
Code: [Select]
tce-load -i hplip.tcz
does the command:
Code: [Select]
hp-infowork now?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Hplip
« Reply #13 on: April 05, 2020, 11:01:23 PM »
@andyj is working on a script to create an hplip-plugins extension, but before that, it might be worth checking that you are using the hplip extension as intended, i.e:

* load the hplip extension (this will automatically load the cups extension)
* set a root password
* start the dbus daemon
* start the cups daemon
* open http://localhost:631/admin in a browser
* click on the "add printer" button and follow instructions

Offline techsuper

  • Newbie
  • *
  • Posts: 34
Re: Hplip
« Reply #14 on: April 06, 2020, 07:56:15 AM »
Thanks guys,

hp-info now runs. The last line says ImportError: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory.
Don't know if this is good or bad.

When I add the printer now their are many more choices for a driver.
The only logical one is HP Laserjet p1505, hpcups 3.17.11, requires proprietary plugin.
Which when trying a test page the job says State: "Filter failed" and nothing prints.
brent