WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore 9.0.1 and RPI Zero W  (Read 18738 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: piCore 9.0.1 and RPI Zero W
« Reply #45 on: September 24, 2020, 04:23:26 PM »
Hi matteo
You saw what Juanito said:
In fact nobody has the password for the piCore submit email, so you’ll need to send it to the main one.
Don't send it to the  picore  address listed here:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#submitting
Send it to the first address shown there.
« Last Edit: October 27, 2022, 10:45:23 PM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14845
Re: piCore 9.0.1 and RPI Zero W
« Reply #46 on: September 25, 2020, 05:32:48 AM »
hplip posted to piCore repos - note that more recent versions require a pre-built libImageProcessor.so, but hplip does not supply one for RPi.

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #47 on: September 25, 2020, 07:01:57 AM »
Hi matteo
You saw what Juanito said:
In fact nobody has the password for the piCore submit email, so you’ll need to send it to the main one.
Don't send it to the  picore  address listed here:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#submitting
Send it to the first address shown there.

Hi Rich, I misunderstood Juanito's sentence. I sent the e-mail to the main address. Thanks!
« Last Edit: October 27, 2022, 10:44:54 PM by Rich »

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #48 on: September 25, 2020, 07:13:19 AM »
hplip posted to piCore repos - note that more recent versions require a pre-built libImageProcessor.so, but hplip does not supply one for RPi.

Thanks Juanito. I do not understand the consequences of that, but the problem seems to be there since half 2018. Any of these links could help? On Red Hat they suggest to use a --nodeps install option, probably there is a way to configure that after ./configure ....

https://unix.stackexchange.com/questions/603644/hplip-hpcups-libimageprocessor-so-cannot-open-shared-object-file-no-such-file

https://bugs.launchpad.net/hplip/+bug/1785230

https://answers.launchpad.net/hplip/+question/674828

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #49 on: September 25, 2020, 07:32:30 AM »
And probably the issue arises after the 3.18.6 hp version. Could it be worth to remain with the 3.18.6 version that does not need  libImageProcessor.so? Is it worth a try?

https://bugs.launchpad.net/hplip/+bug/1806981
« Last Edit: September 25, 2020, 07:46:56 AM by matteo »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14845
Re: piCore 9.0.1 and RPI Zero W
« Reply #50 on: September 25, 2020, 08:41:27 AM »
I posted hplip-3.18.6 - it printed a test page using an RPi3 running piCore-11.x and an hp officejet 6700.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14845
Re: piCore 9.0.1 and RPI Zero W
« Reply #51 on: September 25, 2020, 10:22:44 AM »
Hi Rich, I misunderstood Juanito's sentence. I sent the e-mail to the main address. Thanks!

posted - thanks

note that the md5.txt files are needed.

Also if you wish to have a desktop icon, you need to add a line analogous to:

X-FullPathIcon=/usr/local/share/pixmaps/beaver.png

..to the desktop fie

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #52 on: September 25, 2020, 11:10:52 AM »
I posted hplip-3.18.6 - it printed a test page using an RPi3 running piCore-11.x and an hp officejet 6700.

Thanks Juanito,
in the .tcz.info file, the row:
Code: [Select]
$ sudo /usr/local/etc/inid.d/dbus start

should be:
Code: [Select]
$ sudo /usr/local/etc/init.d/dbus start

By the way, the installation of the HP plugin fails on RPi Zero W, TC 11.x, with the error:
Code: [Select]
-----------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.18.6 |
-----------------------------------------

  Option      Description
  ----------  --------------------------------------------------
  d           Download plug-in from HP (recommended)
  p           Specify a path to the plug-in (advanced)
  q           Quit hp-plugin (skip installation)

Enter option (d=download*, p=specify path, q=quit) ? d

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from:
Downloading plug-in: [\                                                                                                                                                 ] 0%     Traceback (most recent call last):
  File "/usr/local/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/core_install.py", line 231, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 112, in __init__
    self.__readAuthType()  # self.__authType
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 134, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 80, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'
error: Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.

I wonder why HP has to make thing sooo difficult. Is the download failing? Is the firmware a sihpP1005.img file (or similar, it could be downloaded while compiling the foo2xqx driver)?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: piCore 9.0.1 and RPI Zero W
« Reply #53 on: September 25, 2020, 11:15:52 AM »
Hi Juanito
... note that the md5.txt files are needed. ...
Thanks for the heads up. I thought the server scripts would handle that, so I omitted them in my last update. Just went
back and updated them.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14845
Re: piCore 9.0.1 and RPI Zero W
« Reply #54 on: September 25, 2020, 11:55:30 AM »
Can you print a test page without the plugin?

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #55 on: September 25, 2020, 12:22:01 PM »
No, I cannot. If I add a printer from IP address:631/admin, I could see:

HP LaserJet P1005 (HP LaserJet P1005)
HP LaserJet P1005 USB BC04P65 HPLIP (HP LaserJet P1005)
Serial Port #1

I chose the second entry, then it asks for driver or a ppd file. The suggested driver is "HP LaserJet p1005, hpcups 3.18.6, requires proprietary plugin (en)". The test page does not print (state: stopped "Filter failed").
If I use instead a HP-LaserJet_P1005.ppd file, it is the same. The test page does not print (state: stopped "Filter failed").

Accordingly to foo2xqx installation pages, the HP P1005 is a XQX wire protocol printer that requires the firmware to be downloaded to the printer at each printer power on (orange led flashes, drum rotates). However, I never saw that on Windows 7 or Windows 10; but I remember that behavior on very old HP LaserJet vertically feeded.

The plugin required by "sudo hpsetup -ia" (or by "hp-plugin") is, again, "hplip-3.18.6-plugin.run" and it is not the firmware "sihpP1005.img".

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #56 on: September 28, 2020, 08:18:50 AM »
I tried to save locally "hplip-3.18.6-plugin.run" downloaded from the hp-developers website. If feeded into "hp-setup -ia", I get:

Code: [Select]
---------------
| COPY PLUGIN |
---------------

Downloading plug-in from: file:///mnt/mmcblk0p2/tce/foo2zjs/hplip-3.18.6-plugin.run
Downloading plug-in: [\                                                                                                                                                 ] 0%     Traceback (most recent call last):
  File "/usr/local/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/core_install.py", line 231, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 112, in __init__
    self.__readAuthType()  # self.__authType
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 134, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 80, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'
error: Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.

Python 2.7 and 3.8 are installed.  The following code seems to fail:

Code: [Select]
def get_distro_name():
    os_name = None
    try:
        import platform
        os_name = platform.dist()[0]

and the call platform.dist() should be deprecated since python2.6.

The file "password.py" contains a function that seems to retrieve the su or sudo password (it listed several distro, but not TC. The file "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py" is not writeable (it seems located on a read-only filesystem). How could I try to write something in "password.py"? I would like to modify the script and see what happens next.
« Last Edit: September 28, 2020, 08:30:24 AM by matteo »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14845
Re: piCore 9.0.1 and RPI Zero W
« Reply #57 on: September 28, 2020, 09:49:12 AM »
Code: [Select]
$ sudo cp /tmp/tcloop/hplip/usr/local/share/hplip/base/password.py /usr/local/share/hplip/base
User @andyj solved his plugin problem by downloading the actual firmware blob somehow.
« Last Edit: September 28, 2020, 09:50:46 AM by Juanito »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: piCore 9.0.1 and RPI Zero W
« Reply #58 on: September 28, 2020, 09:55:17 AM »
Hi matteo
As you've already found out, the  squashfs  used for extensions is read only. First replace the symlink in the main
file system with a copy of the actual file:
Code: [Select]
sudo busybox cp /usr/local/share/hplip/base/password.py /usr/local/share/hplip/base/
Then rerun your command to make sure the error changes to:
Code: [Select]
File "/usr/local/share/hplip/base/password.py", line 80, in get_distro_nameIf the path in that error message no longer contains  /tmp/tcloop/hplip, then add your changes to:
Code: [Select]
/usr/local/share/hplip/base/password.py

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: piCore 9.0.1 and RPI Zero W
« Reply #59 on: September 28, 2020, 11:07:53 AM »
Hi matteo
I think the binary plugin file you need is  hp_laserjet_p1005.plugin
which is located here:
https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

I have no idea where it needs to be saved to.