WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #60 on: September 29, 2020, 05:41:27 AM »
Hi Rich,
I do not know about the file "hp_laserjet_p1005.plugin" and how to use it. If sent to the printer, nothing happens; it cannot be given as a valid entry to "hp-plugin":
Code: [Select]
error: Plug-in filename must be 'hplip-3.18.6-plugin.run'

The blob firmware could be a "sihpP1005.dl" file (that is my case, for a HP Laser Jet P1005 printer). Using the command:
Code: [Select]
sudo cat /usr/local/share/firmware/sihpP1005.dl > /dev/usb/lp0
provided that the firmware file is placed in that directory, the firmware goes to the printer that flashes orange, the drum rotates for a few seconds. Ok. But printing still fails with the lp command and with the cups test page. Once the printer clicked but did nothing; otherwise, the printer stays still.

I tried to send a PM to user @andyj, without answer.
« Last Edit: September 29, 2020, 05:44:09 AM by matteo »

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #61 on: September 29, 2020, 07:37:37 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.

Hi Juanito,
I did not try, yet, to modify the python script password.py. @andyj suggests that there should be an hplip-plugins.tcz extension. Could you post it, keeping the version aligned to the 3.18.6 hplip.tcz? I found the hplip-3.18.6-plugin.run here: https://developers.hp.com/hp-linux-imaging-and-printing/plugins
Thanks.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 13998
Re: piCore 9.0.1 and RPI Zero W
« Reply #62 on: September 29, 2020, 08:38:34 AM »
There's a script here you could take a look at: http://tinycorelinux.net/11.x/x86_64/tcz/src/hplip/hplip_plugins.sh

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #63 on: September 29, 2020, 12:48:13 PM »
Hi Juanito,
I modified the suggested script and got some errors: some files, uncompressed from the downloaded HP file are there, but cannot be copied over (?)
I changed the script erasing everything but the only few files that I should need for my laser printer, excluding missing files in the downloaded HP files or "sane" and "fax" related files. I obtained a hplip-plugins extension arm32. Then tce-load it. The problem is that the printer does not print: I do not see how it could print anything, the firmware is not sent to the printer.

Then, I sent manually the "hp_laserjet_p1005.fw" via the cat command, the printer flashes orange and drum rotates few seconds. Still nothing.
I also tried to run "hp-setup -i" again, skipping the part of plugin download. This time, it goes on and ask for a printer name, location etc. It says ok. Still, the printer does not print anything. And the printer as configured (?) by hp-setup is not available on CUPS web interface.

If I add a printer using the cups web interface, using the HP plugin driver, I can send a test page to the printer. The printer clicks once, but does not do anything else.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 13998
Re: piCore 9.0.1 and RPI Zero W
« Reply #64 on: October 01, 2020, 07:06:00 AM »
Sorry, but without access to a printer requiring a plugin to test, there's not much I can do to help..

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #65 on: October 01, 2020, 08:13:06 AM »
Would you like a laser printer HP P1005? ;D Otherwise, it will become an unidentified flying object. From my window >:(

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10364
Re: piCore 9.0.1 and RPI Zero W
« Reply #66 on: October 01, 2020, 08:51:28 AM »
Hi matteo
... Then, I sent manually the "hp_laserjet_p1005.fw" via the cat command, the printer flashes orange and drum rotates few seconds. ...
That sounds like it might have accepted the firmware, assuming that's a legitimate way of transferring the firmware.

Quote
... If I add a printer using the cups web interface, using the HP plugin driver, I can send a test page to the printer. The printer clicks once, but does not do anything else.
So it talked to the printer, that's a good sign. I think I read somewhere that your printer can't print without the firmware.
Perform that step again but stop right before printing a test page. Open a terminal and send the firmware to the printer:
Code: [Select]
sudo dd if=/usr/local/share/firmware/sihpP1005.dl of=/dev/usb/lp0Then click the  Send Test Page  button.

I also came across this little tidbit (emphasis mine):
Quote
If your printer is listed as requiring a binary plugin, install the hplip-pluginAUR package from AUR. If the binary plugin hplip-pluginAUR is a requirement you will need to start the org.cups.cupsd.service before the PPD is recognized by hplip.
Found here:
https://wiki.archlinux.org/index.php/CUPS/Printer-specific_problems#HPLIP

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #67 on: October 08, 2020, 02:20:42 AM »
Hi Rich,
I tried again with various combinations (for example i tried to load hplip-plugin-arm32, then dd the firmware, then restart cups, then install hplip)...the printer still clicks once and does not print anything.
Some troubles: if I dd the firmware and then use the command "hp-setup -i", the cups web interface does not see any printer; and I do not know where to look for org.cups.cupsd.service. I think there is only a cups daemon, am I right?
If I give:
Code: [Select]
$ sudo /usr/local/etc/init.d/cups start
sometimes I got:
Code: [Select]
no /usr/local/bin/dbus-daemon found; none killed
rm: cannot remove '/var/run/dbus/pid': No such file or directory

and sometimes I got not errors.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10364
Re: piCore 9.0.1 and RPI Zero W
« Reply #68 on: October 08, 2020, 07:37:56 AM »
Hi matteo
Take a look at this thread starting here:
http://forum.tinycorelinux.net/index.php/topic,23667.msg149518.html#msg149518
Maybe it contains something useful.

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #69 on: October 08, 2020, 12:01:32 PM »
Hi Rich,
following your advice (and Juanito's), I tried again. I have got some improvements:
Code: [Select]
$ tce-load -i hplip-plugins-arm32
$ sudo dd if=/mnt/mmcblk0p2/tce/hp_laserjet_p1005.fw of=/dev/usb/lp0
$ tce-load -i hplip
$ sudo /usr/local/etc/init.d/dbus start
$ sudo /usr/local/etc/init.d/cups start
$ hp-setup -i

also the command:
Code: [Select]
ldd /usr/local/lib/cups/filter/hpcups
gives no errors and:
Code: [Select]
$ /usr/local/lib/lsusb
Bus 001 Device 003: ID 03f0:3d17 HP, Inc LaserJet P1005
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

There are some minor (?) differences as: cups is a now a dependence (?) of hplip 3.18.6; hp-setup does not require the sudo password.
This time, "hp-setup -i" goes on! And it says "Firmware download successful", wow, then it proposes to print a HP test page. And the printer only clicks. Again. But it does not print. Again.

Now:
Code: [Select]
$ lpstat -t
scheduler is running
no system default destination
device for HP_LaserJet_P1005: hp:/usb/HP_LaserJet_P1005?serial=BC04P65
HP_LaserJet_P1005 accepting requests since Thu Oct  8 18:47:29 2020
printer HP_LaserJet_P1005 is idle.  enabled since Thu Oct  8 18:47:29 2020
        ready to print
HP_LaserJet_P1005-1     unknown         422912   Thu Oct  8 18:47:01 2020

and, finally, hp-info gives:
Code: [Select]
  cups-printers                 ['HP_LaserJet_P1005']
  cups-uri                      hp:/usb/HP_LaserJet_P1005?serial=BC04P65
  dev-file
  device-state                  1
  device-uri                    hp:/usb/HP_LaserJet_P1005?serial=BC04P65
  deviceid                      MFG:Hewlett-Packard;MDL:HP LaserJet
                                P1005;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet
                                P1005;FWVER:20080415;

with the FWVER meaning that the firmware is loaded to the printer. Now, the situation is the same I got while trying the foo2xqx driver: the printer is configured but it does not print...I got some fun, anyway.
« Last Edit: October 08, 2020, 12:16:06 PM by matteo »

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #70 on: October 08, 2020, 01:10:06 PM »
Even more fun. I compiled again that foo2xqx driver after hplip installation. But foo2xqx removes hplip. However, creating the printer from commandline:
Code: [Select]
sudo lpadmin -p "HPfoo2xqx" -v "hp:/usb/HP_LaserJet_P1005?serial=BC04P65" -E -P /mnt/mmcblk0p2/tce/HP-LaserJet_P1005.ppd
$ sudo lpadmin -d "HPfoo2xqx"

and sending a test page from CUPS administration webpage, the green light of the printer blinks (!) as if receiving data (!!). The printer job keeps staying in the state "Processing since...". But the printer does not print. After a while, the printer clicks. Nothing else. And the mistery goes on. Next, try again avoiding ghostscript 9.22 (as foo2xqx suggests?!?), using the version in the TC 9.x repository.