LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   hplip not finding printer (Slackware 14.1) (https://www.linuxquestions.org/questions/slackware-14/hplip-not-finding-printer-slackware-14-1-a-4175558654/)

rng 11-12-2015 01:19 AM

hplip not finding printer (Slackware 14.1)
 
In my recently installed Slackware 14.1, I am trying to install the printer. The printer is seen with lsusb command:

Code:

bash-4.2$ lsusb
Bus 001 Device 006: ID 03f0:2b17 Hewlett-Packard LaserJet 1020

But hp-setup command (run as user) is not finding any printer:

Code:

bash-4.2$ hp-setup

HP Linux Imaging and Printing System (ver. 3.13.10)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Searching... (bus=usb, search=(None), desc=0)
error: No devices found on bus: usb
Searching... (bus=usb, search=(None), desc=0)
error: No devices found on bus: usb
Searching... (bus=usb, search=(None), desc=0)
error: No devices found on bus: usb

Done.
bash-4.2$

On trying to run it as root, it cannot open a graphics display:

Code:

bash-4.2# hp-setup

HP Linux Imaging and Printing System (ver. 3.13.10)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

No protocol specified
hp-setup: cannot connect to X server :0
bash-4.2#

Please help.

kikinovak 11-12-2015 02:43 AM

I guess you just forgot to activate and start CUPS.

Code:

# chmod +x /etc/rc.d/rc.cups
# /etc/rc.d/rc.cups start

Then proceed as above.

Cheers,

Niki

rng 11-12-2015 03:31 AM

rc.cups was already executable and running. I loaded http://localhost:631 and added printer from there (the printer was found by this method). However, although print dialog box on geany text editor print command is showing the printer, it is not working. The message on http://localhost:631 is that data is being sent to printer but it does not get printed (printer does not give any indication of activity- light or sound). I have tried switching off and again on the printer, but it has not helped.

kikinovak 11-12-2015 03:59 AM

What's your printer name and model?

gmgf 11-12-2015 04:26 AM

In one xterm try the command 'hp-toolbox' and click on the hammer icon (DiaGnose HPLIP Driver)

rng 11-12-2015 04:38 AM

@kikinovak : the name etc is: Hewlett-Packard LaserJet 1020 (it is there in my first post- the lsusb output)

On hp-toolbox, there is a warning:

Quote:

warning: Reportlab not installed. Fax coverpages disabled.
warning: Please install version 2.0+ of Reportlab for coverpage support.
warning: distro is not found in AUTH_TYPES
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

gmgf 11-12-2015 04:42 AM

said yes (y) by default is no.

rng 11-12-2015 05:23 AM

Quote:

Originally Posted by gmgf (Post 5448478)
said yes (y) by default is no.

What does this mean?

gmgf 11-12-2015 05:38 AM

Checking for Deprecated items....
error: This distro (i.e slackware 14.1) is either deprecated or not yet supported.
The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):

rng 11-12-2015 05:44 AM

It does not stop on warning but keeps running; does not find the printer. I tried installing printer from kde printer setup settings- it is detected and gets installed all right but does not work. The files are sent to the printer but the printer shows no activity (it is ON!).

kikinovak 11-12-2015 06:09 AM

In your notification area, right-click on the HP icon and start "Device Manager". Setup your printer from there. At one point you'll be asked to provide a login (root) and a password (root password). Don't simply use the standard CUPS interface. Many HP printers require some firmware in order to work correctly, and the HP Device Manager automagically prompts you for downloading that firmware.

Hope that helps.

kikinovak 11-12-2015 06:11 AM

Oh, and I forgot. What groups is your user a member of?

Here's what this should look like:

Code:

$ groups                                                                   
users lp floppy audio video cdrom plugdev power netdev scanner

For HP printers, you'll probably watch out for 'lp' and 'scanner'.

gmgf 11-12-2015 06:20 AM

maybe you need to make your printers has a default printer.

Paulo2 11-12-2015 07:49 AM

Just :twocents:
See if the printer is disabled, happens here sometimes.
lpstat -t
if disabled, enable it
cupsenable <printer name>

TracyTiger 11-12-2015 03:06 PM

Firmware Reload
 
I recently struggled to get an HP LJ 1020 working on an old laptop with a fresh install of Slackware 14.1.

The HP LJ 1020 is "special". It needs HPLIP proprietary drivers and the firmware isn't retained through power cycles.

A key item is that the model 1020 requires reloading the firmware every time it is powered on as it can't retain the firmware when power is removed. So when you set it up with HPLIP as a new printer and let HPLIP automatically download the required files it will work. But when you unplug/power off/reboot stuff it will no longer work unless you once again set it up as a new printer and automatically download the files again.

The laptop only has 2 USB ports which are used for a keyboard, mouse, and printer. I remember a further complication when plugging and unplugging the printer, it wouldn't print anymore. Perhaps the printer was "lost" when disconnected from the USB port.

The laptop and details of the printer installation are currently in another city. Some scribbled notes I have with me show that the following was involved...

- Turned off HPLIP
- Used usblp module (/etc/rc.d/rc.modules)
- Used /usr/share/foo2zjs files. Firmware is sihp1020.dl

I believe the key to automatic loading of the firmware was the usblp module. Perhaps if the firmware loads when the printer is connected then you can still use HPLIP.

I just stumble along in getting printers to work. Perhaps more knowledgeable LQ members can shed further light on using the HPLJ 1020 and what happens when connecting and disconnecting printers on USB ports.

EDIT: I remembered that the green and amber printer lights flash (alternate?) when the firmware is loading. It may useful for troubleshooting the loading of firmware.

I mentioned HPLIP "automatically" downloading files. I still had to tell it to download/install the files. I believe HPLIP automatically selected the files based on the printer model I gave it. I remember not being able to select and download/save the files without HPLIP (probably a personal limitation).

commandlinegamer 11-13-2015 06:28 AM

I had similar problems with an HP Laserjet 1000, shared via CUPS and Samba. Ended up by removing the HPLIP stuff completely on the host machine and the other computers which use it over the network. The foo2zjs drivers work fine. The directly connected PC did occasionally "lose" the printer, which I took to be a USB issue with an older motherboard--I've since upgraded it which seems to have solved that problem.

rng 11-19-2015 06:45 AM

Can you briefly mention how to install foo2zjs driver? I downloaded the foo2zjs.tar.gz file and extracted its contents. I ran 'make' in that folder but I do not know how to proceed. It did not make any tgz package which I could install. I also used the ppd file in it to modify the printer, but that has also not helped. The data is sent to the printer but nothing gets printed. There is no sign of activity (light changing or blinking or any sound) in the printer after giving the print command.

commandlinegamer 11-19-2015 10:00 AM

It's a while since I did it and I haven't had to make any changes, but I've still got the foo2zjs tarball, and if you have the same one I do then there should be instructions in the top-level directory: "INSTALL".

If you've still got the hplip package installed I'd probably remove it.

Once you've run "make", you need to get the firmware: "./getweb 1020" if you're using the HP LJ 1020. Then "make install" and possibly "make install-hotplug", followed by "make cups" if you're using that for printer management.

Open the CUPS browser interface and select the defaults you want.

From the notes I made when I set this up a few years back, I also did the following:

Code:

rm /lib/udev/rules.d/70-printers.rules
To allow Windows' clients access I edited Samba's smb.conf as below:
Code:

[global]
    workgroup = MYWORKGROUP
    server string = Samba Server
    security = user
    hosts allow = 192.168.0.
    load printers = yes
    log file = /var/log/samba.m
    max log size = 50
    dns proxy = no

  [homes]
    comment = Home Directories
    browseable = no
    writable = no

  ;[printers]
  ;  comment = All Printers
  ;  path = /var/spool/samba
  ;  browseable =
  ;  guest ok = no
  ;  writable = no
  ;  printable = yes

  [hp1000-raw]
    comment = HP Laserjet 1000 (raw)
    path = /var/spool/samba
    printer = hp1000-raw
    writable = no
    browseable = no
    guest ok = no
    printable = yes
    use client driver = yes

Added the following files to /etc/cups (also part of the procedure to allow Windows machines access using their native driver).

mime.convs
Code:

application/octet-stream    application/vnd.cups-raw    0    -
mime.types
Code:

application/octet-stream

Philip Lacroix 11-19-2015 12:08 PM

Quote:

Originally Posted by TracyTiger
The HP LJ 1020 is "special". It needs HPLIP proprietary drivers and the firmware isn't retained through power cycles.

Quote:

Originally Posted by rng
Can you briefly mention how to install foo2zjs driver? I downloaded the foo2zjs.tar.gz file and extracted its contents. I ran 'make' in that folder but I do not know how to proceed. It did not make any tgz package which I could install. I also used the ppd file in it to modify the printer, but that has also not helped. The data is sent to the printer but nothing gets printed. There is no sign of activity (light changing or blinking or any sound) in the printer after giving the print command.

Apparently there's a whole range of "forgetful" HP printers like that. While setting up my printer for OpenBSD I decided to build the needed foo2zjs software from source, as recommended by its author, so I had a look at the documentation, in particular the INSTALL file. According to it, HP LaserJet models 1000, 1005, 1018, 1020 and P1005, P1006, P1007, P1008, P1505 need a firmware reload each time the printer is powered up (fortunately this is not the case for my printer). On OpenBSD and FreeBSD the reload has to be done manually by sending the firmware to the related device file:

Code:

- Do one of these lines each time the printer is powered up:
    # cat /usr/share/foo2zjs/firmware/sihp1018.dl > /dev/ugen0.1
    # cat /usr/share/foo2zjs/firmware/sihp1020.dl > /dev/ugen0.1
    # cat /usr/share/foo2xqx/firmware/sihpP1005.dl > /dev/ugen0.1
    # cat /usr/share/foo2xqx/firmware/sihpP1006.dl > /dev/ugen0.1
    # cat /usr/share/foo2xqx/firmware/sihpP1505.dl > /dev/ugen0.1

The above list doesn't seem to be up to date, but it shouldn't be a problem to figure out the lines for the other models according to their firmware file names. There are specific notes for Linux systems as well, in order to have the firmware reloaded automatically to USB printers, and manually to parallel port printers:

Code:

HP LASERJET 1000/1005/1018/1020, P1005/P1006/P1007/P1008/P1505 NOTES
--------------------------------------------------------------------
    These printers need their firmware downloaded to them every time they
    are powered up.

        On Linux with USB connected printer:
            If you are running Linux and the printer is connected via USB, you
            can arrange for the firmware to be automatically downloaded to the
            printer by performing one more installation step:

            # make install-hotplug

            Power off then on the printer. Light should flash orange for
            ~5 seconds as the firmware is getting downloaded.

        On another OS or with a parallel port connected printer:

            You must send a firmware file to the printer each time you power it
            up.  If you downloaded the extra files for the HP above, a typical
            command line to load the firmware would be ONE of these:

            # cat /usr/share/foo2zjs/firmware/sihp1000.dl > /dev/usb/lp0
            # cat /usr/share/foo2zjs/firmware/sihp1005.dl > /dev/usb/lp0
            # cat /usr/share/foo2zjs/firmware/sihp1018.dl > /dev/usb/lp0
            # cat /usr/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/lp0
            # cat /usr/share/foo2xqx/firmware/sihpP1005.dl > /dev/usb/lp0
            # cat /usr/share/foo2xqx/firmware/sihpP1006.dl > /dev/usb/lp0
            # cat /usr/share/foo2xqx/firmware/sihpP1505.dl > /dev/usb/lp0

            Light should flash orange for ~5 seconds as the firmware is
            getting downloaded.

Quote:

Originally Posted by TracyTiger
I mentioned HPLIP "automatically" downloading files. I still had to tell it to download/install the files. I believe HPLIP automatically selected the files based on the printer model I gave it. I remember not being able to select and download/save the files without HPLIP (probably a personal limitation).

If you build foo2zjs from the upstream source code it will also make a script named "getweb" that allows you to download the firmware files that you need. Regarding the HP 1020 model mentioned in the OP, I found out the following URL:

http://foo2zjs.rkkda.com/firmware/sihp1020.tar.gz

The unpacked file turns out to be sihp1020.img. This should be handled by "make install" according to the following note:

Code:

NOTE: The original HP files are named '*.img'.  Sometimes HP supplies
    these files ready-to-download to the printer, sometimes they are raw
    ARM executables and need to have a special header added to them before
    they can be downloaded.  The "make install" step will use the supplied
    "arm2hpdl" program to automatically detect which kind of file they are
    and convert them (if needed) to the downloadable '*.dl' format.

Quote:

Originally Posted by rmg
I ran 'make' in that folder but I do not know how to proceed.

foo2zjs: a linux printer driver for ZjStream protocol
INSTALL

Philip


All times are GMT -5. The time now is 01:57 AM.