You are not logged in.
Pages: 1
I've installed the foo2xqx driver for my HP LaserJet P1006, and the printer is functional. This driver is another option for users who own this printer model and who have not had success with the hplip driver, as was my experience with hplip-3.12.2.tazpkg.
Installing the foo2xqx driver and adding the printer via the CUPS interface is relatively easy, as compared to installing the hplip software and trying to get the printer to work. Reading the INSTALL file included in the tar.gz download is essential, however, and do expect to execute the make command several times until all dependencies have been satisfied. Among the multiple dependencies are cups, foomatic-filters, ghostscript, and dc. You will not find the package dc.tazpkg in the 4.0 repository; it is contained in bc.tazpkg. Everything essential for make is in the repository, and those who have compiled software probably have most of the needed packages already installed. For the HP LaserJet P1006, a firmware file must be downloaded during the foo2xqx installation process. Every time the printer is powered-on for use, the firmware file must be sent to the printer; this can be automated, or done manually.
The foo2xqx driver prints postscript files. I'm printing using the command-line:
$ foo2xqx-wrapper any.ps > /dev/usb/lp0
The foo2xqx-wrapper binary accepts some basic printing options on the command-line. Default values are used if no options are specified. Using the above command-line to print output from Leafpad gives perfect print-outs.
Thus far, lpr commands fail, so I have some more troubleshooting ahead. More printing options are available if lpr commands can be executed.
Those who elect to install the foo2xqx driver can use the command-line to get some information on the installed printer, such as:
# usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Hewlett-Packard;MDL:HP LaserJet P1006;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet P1006;FWVER:20090916;
root@slitaz:/home/tux#
# lpstat -p -d
printer HP_LaserJet_P1006 is idle. enabled since Sun 23 Nov 2014 04:36:35 PM UTC
no system default destination
root@slitaz:/home/tux#
# lpoptions -d HP_LaserJet_P1006
auth-info-required=none copies=1 device-uri=usb:/dev/usb/lp0 finishings=3 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='monochrome laser printer' printer-is-accepting-jobs=true printer-is-shared=false printer-location=desktop printer-make-and-model='HP LaserJet P1006 Foomatic/foo2xqx (recommended)' printer-state=4 printer-state-change-time=1416853232 printer-state-reasons=connecting-to-device printer-type=10522644 printer-uri-supported=ipp://localhost:631/printers/HP_LaserJet_P1006
root@slitaz:/home/tux#
Offline
UPDATE:
The lp/lpr print command failure seems to originate with a USB problem in Slitaz 4.0, which then causes CUPS 1.4.6 to not properly detect the HP LaserJet P1006. This USB problem is not unique to Slitaz 4.0, according to what I see when doing some Googling, but is also seen in other distros, while it is not seen in others.
When I installed the foo2xqx driver, then added a printer queue as administrator in the CUPS 1.4.6 interface, the printer was not automatically detected, nor could CUPS find the printer. I had to manually add the printer. Yet, despite this, CUPS was not functional. It was unable to provide any output to the foo2xqx-wrapper. Printing, using the command-line:
foo2xqx-wrapper any.ps > /dev/usb/lp0
works, because foo2xqx-wrapper is "downstream" from CUPS 1.4.6, and the data stream does not pass through CUPS.
I've looked at the possibility of connecting the HP LaserJet P1006 to the parallel port by using an adapter cable, but this approach is not well documented, so success is dubious.
Using the command-line:
foo2xqx-wrapper any.ps > /dev/usb/lp0
is not an adequate solution, because only postscript files can be printed, and printing options with foo2xqx-wrapper are very limited. Also, not all Linux applications have the "print to file -- ps" option.
Offline
UPDATE (2)
The CUPS 1.4.6 problem can probably be resolved relatively easy. I don't think a new libusb.tazpkg needs to be compiled to patch Slitaz 4.0. I found the following tip, which relates to CUPS 1.5.3, that might offer a solution to USB printers not being detected by CUPS 1.4.6.
"CUPS 1.5.3 -- NO PRINTING
Create a custom udev rule in file "/etc/udev/rules.d/10-usbprinter.rules" containing the line --
Quote: ATTR{idVendor}=="04f9", ATTR{idProduct}=="0169", MODE:="0660", GROUP:="lp"
To get the idVendor and idProduct values look at the output of 'lsusb'.
This works whether usblp is blacklisted or not."
According to information I've obtained, it is not necessary to blacklist the usblp module when using CUPS 1.4.6.
See also the "CUPS - Archwiki" page for detailed information on installing and troubleshooting CUPS. Most importantly, this page tells what packages should be necessary for specific makes of printers, thus making it possible to avoid installing non-essential packages. This page also contains a valuable section on USB printers.
I'll be starting on a fresh install of Slitaz 4.0, concentrating only on installing my HP LaserJet P1006 first. Having a working printer is priority number one. The foo2xqx driver will be installed, not hplip-3.12.2.tazpkg. Dependencies for the foo2xqx driver are few, compared to hplip-3.12.2.tazpkg.
Offline
The following information could be valuable in helping other users to troubleshoot printing problems. Please read carefully.
Could someone in development investigate if libcups is the missing component in this printing problem? The package, libcups, is not available in Slitaz 4.0 repository. CUPS consists of two parts, client and server. If libcups is essential, then could someone compile libcups.tazpkg for CUPS 1.4.6?
"CUPS - Archwiki/Installing the client package -- The package libcups is the only required package. Install it ... then add your CUPS server's IP address or hostname into /etc/cups/client.conf, after ServerName. That is all you need. Every application should quickly find the printer(s) shared by that CUPS server."
The CUPS server packages:
cups -- installed manually
ghostprint -- installed manually (sometimes optional, but needed for foo2xqx)
gsfonts -- not available in Slitaz 4.0 repository
other packages --
libusb -- installed automatically by default when OS installed
bc -- installed manually (provides dc needed by foo2xqx)
foomatic-filters -- installed manually (needed by foo2xqx)
Printing Failure Summary --
"System Tools/Manage Printing" present. CUPS web interface active. "HP_LaserJet_P1006" available in Leafpad print dialog box. Page does not print. CUPS web interface displays "processing since ..." on Jobs tab. Printers tab displays "Processing - Printer not connected; will retry in 30 seconds...", also, after cancelling job, "Idle, Accepting Jobs, Not Shared, Server Default". Command-line printing fails:
tux@slitaz:~$ lp -d HP_LaserJet_P1006 output.ps
request id is HP_LaserJet_P1006-5 (1 file(s))
tux@slitaz:~$
This does work:
foo2xqx-wrapper output.ps > /dev/usb/lp0
Blacklisting usblp module resulted in "no device" error message. "lpadmin" added to SystemGroup, and "Group lp" added to /etc/cups/cupsd.conf. CUPS does not automatically detect printer. In CUPS web interface, SCSI option was displayed; this was not selected. Printer was added, along with default destination, using the command-line. Other information follows:
printer firmware not loaded --
tux@slitaz:~$ usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Hewlett-Packard;MDL:HP LaserJet P1006;CMD:ACL;CLS:PRINTER;DES:HP LaserJet P1006;
tux@slitaz:~$
printer firmware loaded --
tux@slitaz:~$ cat /usr/share/foo2xqx/firmware/sihpP1006.dl > /dev/usb/lp0
tux@slitaz:~$ usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Hewlett-Packard;MDL:HP LaserJet P1006;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet P1006;FWVER:20080415;
tux@slitaz:~$
cupsd start --
root@slitaz:/home/tux# /etc/init.d/cupsd start
Starting cups deamon: Cupsd... [ OK ]
root@slitaz:/home/tux#
printer status --
root@slitaz:/home/tux# lpstat -p -d
printer HP_LaserJet_P1006 is idle. enabled since Mon 01 Dec 2014 07:27:38 PM UTC
system default destination: HP_LaserJet_P1006
root@slitaz:/home/tux#
printer info --
root@slitaz:/home/tux# lpoptions -d HP_LaserJet_P1006
auth-info-required=none copies=1 device-uri=usb:/dev/usb/lp0 finishings=3 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info=HP_LaserJet_P1006 printer-is-accepting-jobs=true printer-is-shared=true printer-location printer-make-and-model='HP LaserJet P1006 Foomatic/foo2xqx (recommended)' printer-state=3 printer-state-change-time=1417462058 printer-state-reasons=none printer-type=8556564 printer-uri-supported=ipp://localhost:631/printers/HP_LaserJet_P1006
root@slitaz:/home/tux#
more printer info --
root@slitaz:/home/tux# lpinfo -v
network http
direct usb://HP/LaserJet%20P1006
network lpd
network ipp
network socket
direct scsi
root@slitaz:/home/tux#
loaded modules --
root@slitaz:/home/tux# lsmod
Module Size Used by Not tainted
usblp 7672 0
floppy 41138 0
parport_pc 16061 0
parport 20983 1 parport_pc
button 3602 0
snd_intel8x0 19786 1
snd_ac97_codec 77963 1 snd_intel8x0
ac97_bus 718 1 snd_ac97_codec
snd_pcm 43737 2 snd_intel8x0,snd_ac97_codec
snd_timer 12515 1 snd_pcm
snd 33394 6 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore 3357 1 snd
snd_page_alloc 4853 2 snd_intel8x0,snd_pcm
intel_agp 7908 1
intel_gtt 9214 1 intel_agp
agpgart 18221 2 intel_agp,intel_gtt
root@slitaz:/home/tux#
usb bus info --
root@slitaz:/dev/bus/usb/001# ls -l
total 0
crw-rw-rw- 1 root root 189, 0 Dec 2 14:04 001
crw-rw-rw- 1 root lp 189, 1 Dec 2 14:04 002
crw-rw-rw- 1 root lp 189, 3 Dec 1 19:44 004
root@slitaz:/dev/bus/usb/001#
usb info --
root@slitaz:/dev/usb# ls -l
total 0
crw-r--r-- 1 root root 180, 96 Nov 30 17:55 hiddev0
crw-r--r-- 1 root root 180, 97 Nov 30 17:55 hiddev1
crw-r--r-- 1 root root 180, 98 Nov 30 17:55 hiddev2
crw-r--r-- 1 root root 180, 99 Nov 30 17:55 hiddev3
crw-r--r-- 1 root root 180, 100 Nov 30 17:55 hiddev4
crw-r--r-- 1 root root 180, 101 Nov 30 17:55 hiddev5
crw-r--r-- 1 root root 180, 102 Nov 30 17:55 hiddev6
crw-rw---- 1 root lp 180, 0 Dec 2 14:04 lp0
root@slitaz:/dev/usb#
groups and users --
root@slitaz:/etc# cat group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:root
adm:x:4:
tty:x:5:tux
disk:x:6:root,tux
lp:x:7:root,tux
kmem:x:9:tux
wheel:x:10:root
floppy:x:11:tux
video:x:18:tux
cdrom:x:19:tux
audio:x:20:tux
tape:x:26:tux
www:x:80:
plugdev:x:83:
dialout:x:95:tux
nogroup:x:99:tux
users:x:100:
messagebus:x:25:
haldaemon:x:26:
tux:x:1000:
lpadmin:x:1001:root
root@slitaz:/etc#
/etc/cups/printers.conf --
root@slitaz:/etc/cups# cat printers.conf
# Printer configuration file for CUPS v1.4.6
# Written by cupsd on 2014-12-01 19:42
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<DefaultPrinter HP_LaserJet_P1006>
Info HP_LaserJet_P1006
MakeModel HP LaserJet P1006 Foomatic/foo2xqx (recommended)
DeviceURI usb:/dev/usb/lp0
State Idle
StateTime 1417462058
Type 8425492
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 0 foomatic-rip
Filter application/vnd.cups-command 0 commandtops
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
AllowUser root
AllowUser tux
OpPolicy default
ErrorPolicy stop-printer
</Printer>
root@slitaz:/etc/cups#
/etc/cups directory --
root@slitaz:/etc/cups# ls -l
total 52
-rw------- 1 root lp 128 Dec 1 19:28 classes.conf
-rw-r----- 1 root lp 4179 Dec 1 20:05 cupsd.conf
-rw-r----- 1 root root 4145 Jun 3 2013 cupsd.conf.default
-rw-r--r-- 1 root root 1448 Jun 3 2013 gstoraster.convs
drwxr-xr-x 2 root root 4096 Jun 3 2013 interfaces
-rw-r--r-- 1 root root 26 Dec 2 14:17 lpoptions
drwxr-xr-x 2 root lp 4096 Dec 1 19:27 ppd
-rw------- 1 root lp 621 Dec 1 19:42 printers.conf
-rw------- 1 root nogroup 592 Dec 1 19:28 printers.conf.O
-rw-r----- 1 root root 186 Jun 3 2013 snmp.conf
drwx------ 2 root lp 4096 Jun 3 2013 ssl
root@slitaz:/etc/cups#
root@slitaz:/etc/cups# cat cupsd.conf
#
# "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $"
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel debug
# Administrator user group...
SystemGroup sys root lpadmin
# User group...
Group lp
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Restrict access to the server...
<Location />
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
...
root@slitaz:/etc/cups#
info from dmesg --
root@slitaz:/home/tux# dmesg
...
parport_pc 00:07: reported by Plug and Play ACPI
parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP]
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x3E17
usbcore: registered new interface driver usblp
Adding 2097148k swap on /dev/hda1. Priority:-1 extents:1 across:2097148k
root@slitaz:/home/tux#
Offline
libcups.tazpkg is available in cooking / rolling and it does not work....
Offline
Success. CUPS-1.4.6 now recognizes the HP LaserJet P1006. Automatically detected in web interface. Added hal-cups-utils and usbutils packages. "lp" command now functional. Using foo2xqx driver. Added "lpadmin" group as SystemGroup, "root" as user to /etc/cups/cupsd.conf. Added "Group lp", "tux" as user to /etc/cups/cupsd.conf. See below.
http://localhost:631 > Connection: usb://HP/LaserJet%20P1006
Printer use procedure:
With system booted, power-on printer.
Load firmware.
Start cupsd.
This now prints jobs:
lp any.ps
See CUPS documentation for complete "lp" options.
root@slitaz:/home/tux# lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 03f0:3e17 Hewlett-Packard LaserJet P1006
root@slitaz:/home/tux#
root@slitaz:/dev/bus/usb/001# ls -l
total 0
crw-rw-rw- 1 root root 189, 0 Dec 6 17:17 001
crw-rw-rw- 1 root lp 189, 1 Dec 6 17:18 002
crw-rw-rw- 1 root root 189, 2 Dec 6 16:54 003
crw-rw-rw- 1 root root 189, 3 Dec 6 16:54 004
root@slitaz:/dev/bus/usb/001#
root@slitaz:/etc/cups# cat cupsd.conf
#
# "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $"
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
# Administrator user group...
SystemGroup lpadmin
# User group...
Group lp
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Restrict access to the server...
<Location />
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
# Set the authenticated printer/job policies...
<Policy authenticated>
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
#
# End of "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $".
#
root@slitaz:/etc/cups#
Offline
thats ok for 4.0, because 4.0 still uses hal
but not ok for cooking, because hal-cups-utils will install hal
http://pkgs.slitaz.org/search.sh?receipt=hal-cups-utils&version=cooking
nobody is printing with cooking?
Offline
Pages: 1
[ Generated in 0.025 seconds, 7 queries executed - Memory usage: 1.58 MiB (Peak: 1.77 MiB) ]