LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   USB hp deskjet 5550 (https://www.linuxquestions.org/questions/slackware-14/usb-hp-deskjet-5550-a-45322/)

fieldsofsalmon 02-13-2003 11:03 PM

USB hp deskjet 5550
 
ok, so here's the scoop.

i've got a deskjet 5550, which linuxprinting.org says works "perfectly".

i downloaded the hpijs driver and installed it (it worked) and tested my ghostscript to see if it contained the "ijs" reference. it did.

so then what? uh ... i'm totally at a loss.

i found a tutorial that suggested the following as a next step:

# cd /usr/share/ghostscript/7.05/examples

# gs -sDEVICE=ijs -sIjsServer=hpijs -dIjsUseOutputFD -sDeviceManufacturer="HEWLETT-PACKARD"
-sDeviceModel="deskjet 5550" -r300x300 -dNOPAUSE -dSAFER -sOutputFile="/dev/lp0" tiger.ps -c quit

however, this yields the following:

**** Unable to open the initial device, quitting.

kinda' stuck ...

rob

Excalibur 02-13-2003 11:42 PM

You probably need to modify the device reference in the command. The command states /dev/lp0, however, I think it would be on /dev/usb/printer0 instead for a USB printer. You can probably use the "dmesg" command to review the kernel buffer messages. It might state what was assigned when the kernel or module detected the printer.

fieldsofsalmon 02-16-2003 12:41 PM

hmmm ...

well, appended to this message are the contents of my /dev/usb/ directory. unfortunately i don't appear to have a /dev/usb/printer ... does this mean it was not detected when i turned the machine on (i made sure the printer was plugged in and turned on)?

so one another thing: all the entries in /dev/usb/ are highlighted in yellow except for /dev/usb/lpo (seems to be a lowercase letter O and not a zero). does this mean anything?

when i try to point the command to that location the command appears to run successfully but the printer just sits there silent.

rob

here's my /dev/usb/

ez0 ez15 ez8 lp13 lp6 mouse10 mouse3 rio500 scanner14 scanner7
ez1 ez2 ez9 lp14 lp7 mouse11 mouse4 scanner0 scanner15 scanner8
ez10 ez3 lp0 lp15 lp8 mouse12 mouse5 scanner1 scanner2 scanner9
ez11 ez4 lp1 lp2 lp9 mouse13 mouse6 scanner10 scanner3
ez12 ez5 lp10 lp3 lpo mouse14 mouse7 scanner11 scanner4
ez13 ez6 lp11 lp4 mouse0 mouse15 mouse8 scanner12 scanner5
ez14 ez7 lp12 lp5 mouse1 mouse2 mouse9 scanner13 scanner6

Excalibur 02-16-2003 01:41 PM

You are correct, printer0 doesn't exist on mine either! Hmm, I can only figure it must of been another distro, like SuSE that I use at work.

I connected a USB printer converter device that uses the printer.o module. The module detected and responded with an assignment on "usblp0" without any slashes and a zero. That doesn't exist either. But the device /dev/usb/lp0 exists. If your /dev/usb/lpo is a char device on major 180 minor 0 then it is the correct device just rename it to lp0. Or you can delete it and recreate it;

mknod /dev/usb/lp0 char 180 0

But from the listing you provided I see both a lp0 and lpo. The lpo may be just a file that was created from a mistyped command as the output. Recommend deleting the lpo. Below is what a long listing should look like for the first two lp devices to verify the settings for the devices.

bash-2.05a# ls -l /dev/usb/lp*
crw-rw---- 1 root lp 180, 0 Mar 25 2001 /dev/usb/lp0
crw-rw---- 1 root lp 180, 1 Mar 25 2001 /dev/usb/lp1

fieldsofsalmon 02-16-2003 04:09 PM

interesting.

i did an lpstat and it looks like two jobs managed to make it to the print queue (or something). so ... it partially works. but of course nothing is going to my printer ...

Printer: lp@XYZ
Queue: 2 printable jobs
Server: pid 105 active
Unspooler: pid 108 active
Rank Owner/ID Class Job Files Size Time
stalled(30551sec) rob@XYZ +42 A 42 (STDIN) 307519 13:03:13
2 rob@XYZ+204 A 204 (STDIN) 307328 13:10:29

where XYZ = my host name.

Excalibur 02-16-2003 04:50 PM

It would appear to have two pending jobs that it is not able to spool out to the device. Take a look at the following files to see if anything is being reported:

tail /var/log/messages
tail /var/log/syslog
tail /var/log/debug

If you are using modules, check to see if the "printer" module is loaded by using the command "lsmod". Not sure on the hpijs driver, if module, then perhaps it needs to be loaded, as well or instead of "printer". Best to review the docs for it. You may need to "modprobe hpijs" or "modprobe printer". If it needs to be loaded each time you boot, then you may consider adding the command to the /etc/rc.d /rc.local file.

If you want to remove the jobs from the queue to empty it, since you may not know for sure where it is attempting to print then;

lpq -Plp

should list the jobs and the job numbers.

lprm -Plp #xxx

where xxx is the job numbers listed in the previous command.

fieldsofsalmon 02-16-2003 05:41 PM

thanks for the info! i was successfully able to dequeue the two jobs that were trapped in the queue, however, i'm still having no luck actually getting anything to the printer.

i checked the logs and they yield no printing-related information.

i checked my rc.modules and the 'printer' module is indeed uncommented. lsmod yields the following relevant information:

printer 5632 0
usbcore 48000 0 [printer]

could this mean anything?

as far as http://hpinkjet.sourcefore.net is concerned all that you have to do is install the hpijs driver and you're set. i have verified that it is installed by typing hpijs -h.

Excalibur 02-16-2003 05:59 PM

Post your /etc/printcap file please.

Unload printer module --> rmmod printer
disconnect printer USB Cable
load printer module --> insmod printer
connect USB cable
then view the kernel messages --> dmesg

Look at the end of the dmesg command and make sure the printer is detected. Post the last several lines if like.

Excalibur 02-16-2003 06:10 PM

Also, you need to be logged in as root. If you haven't setup a spooler for the printer as yet, then ignore the printcap request.

BTW: From what I can determine, hpijs is included with Slackware 8.1. No need to download and build it. It is on my system as well.

fieldsofsalmon 02-16-2003 06:10 PM

thanks again ... appended to this message is my /etc/printcap. i did the rmmod, insmod procedure and got the following. looks promising, doesn't it?

lp0: compatibility mode
lp0: compatibility mode
lp0: compatibility mode
usb.c: deregistering driver usblp
usb.c: registered new driver usblp
printer.c: v0.8:USB Printer Device Class driver

and now the printcap:

#
# Copyright (c) 1983 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of California at Berkeley. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# @(#)etc.printcap 5.2 (Berkeley) 5/5/88
#
# DecWriter over a tty line.
#lp|ap|arpa|ucbarpa|LA-180 DecWriter III:\
# :br#1200:fs#06320:tr=\f:of=/usr/lib/lpf:lf=/usr/adm/lpd-errs:
#lp:lp=/dev/lp0:sd=/usr/spool/lp0:of=/usr/lib/lpf: lf=/usr/adm/lpd-errs
#
# Generic printer:
lp:lp=/dev/lp0:sd=/var/spool/lpd:sh
#
# typical remote printer entry
#ucbvax|vax|vx|ucbvax line printer:\
# :lp=:rm=ucbvax:sd=/usr/spool/vaxlpd:lf=/usr/adm/lpd-errs:
#varian|va|Benson Varian:\
# :lp=/dev/va0:sd=/usr/spool/vad:mx#2000:pl#58:px#2112:py#1700:tr=\f:\
# :of=/usr/lib/vpf:if=/usr/lib/vpf:tf=/usr/lib/rvcat:cf=/usr/lib/vdmp:\
# :gf=/usr/lib/vplotf:df=/usr/local/dvif:\
# :vf=/usr/lib/vpltdmp:lf=/usr/adm/lpd-errs:
#versatec|vp|Versatec plotter:\
# :lp=/dev/vp0:sd=/usr/spool/vpd:sb:sf:mx#0:pw#106:pl#86:px#7040:py#2400:\
# :of=/usr/lib/vpfW:if=/usr/lib/vpsf:tf=/usr/lib/vcat:cf=/usr/lib/vdmp:\
# :gf=/usr/lib/vplotf:vf=/usr/lib/vpltdmp:lf=/usr/adm/lpd-errs:\
# :tr=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
#\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
#\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n:
#
#lp|panasonic:lp=/dev/lp1:sd=/usr/spool/lp/panasonic:lf=/usr/bin/mail:mc#1:\
# ft=$$c$$p$$r$$f:hl#2:fl#3:ht=$$c$$n$$r$$t:sh:
#
# HP Laser jet plus
#lp|hpj:\
# :lp=/dev/lp1:\
# :sd=/usr/spool/lp1:\
# :mx#0:\
# :of=/usr/spool/lp1/hpjlp:
# :lf=/usr/spool/lp1/hp-log:
#
#lp|Generic dot-matrix printer entry:\
# :lp=/dev/lp1:\
# :sd=/var/spool/lp1/lp:sh:\
# :if=/usr/bin/lpf:\
# :df=/var/spool/lp1/filter.ps:\
# :tf=/var/spool/lp1/filter.ps:\
# :af=/var/spool/lp1/lp-acct:\
# :lf=/var/spool/lp1/lp-err:

Excalibur 02-16-2003 06:22 PM

OK, the printap file reveals that it is the stock printcap setup for the device on /dev/lp0. So a spooler filter has not been setup as yet.

Now, to your dmesg output. I can see where you unloaded the module and reloaded the module. But if you disconnected the printer and reconnected it, then I am not seeing anything there. Unless it is that last line on printer.c. When I disconnect and reconnect devices I see vendor and product ID codes for the device and if a module isn't present then reports it as not claimed. An example from my output.

hub.c: USB new device connect on bus2/1, assigned device number 7
usb.c: kmalloc IF cd40d680, numif 1
usb.c: new device strings: Mfr=0, Product=0, SerialNumber=0
printer.c: usblp0: USB Bidirectional printer dev 7 if 0 alt 1 proto 2 vid 0x0711 pid 0x0302
usb.c: usblp driver claimed interface cd40d680

Do you see anything like this in your output?

fieldsofsalmon 02-16-2003 06:35 PM

scrolling back up the dmesg to my last reboot i see the following. a little more descriptive but still nothing like the level of detail you're getting ;-)

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb.c: registered new driver usblp
printer.c: v0.8:USB Printer Device Class driver

Excalibur 02-16-2003 06:39 PM

The same basic kind of output as before. OK, then try the command "lspci". It will provide a listing of the PCI devices that the kernel is able to see on the system.

An example of my VIA Apollo:
bash-2.05a# lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev c4)
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)
00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 16)
00:07.3 USB Controller: VIA Technologies, Inc. USB (rev 16)
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
00:09.0 Unknown mass storage controller: Promise Technology, Inc. 20262 (rev 01)
00:0a.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Rage XL AGP 2X (rev 65)

As you can see it reports two USB Controllers, for a total of four USB connectors. See if your system provides similar.

fieldsofsalmon 02-16-2003 06:55 PM

here is my lspci. i also have two usb controllers. i'm now wondering if there is some sort of USB support problem with my pc. there doesn't seem to be any problem with my printer setup ....

00:00.0 Host bridge: Acer Laboratories Inc. [ALi] M1647 Northbridge [MAGiK 1 / MobileMAGiK 1] (rev 04)
00:01.0 PCI bridge: Acer Laboratories Inc. [ALi] PCI to AGP Controller
00:02.0 USB Controller: Acer Laboratories Inc. [ALi] USB 1.1 Controller (rev 03)00:04.0 IDE interface: Acer Laboratories Inc. [ALi] M5229 IDE (rev c4)
00:06.0 USB Controller: Acer Laboratories Inc. [ALi] USB 1.1 Controller (rev 03)00:07.0 ISA bridge: Acer Laboratories Inc. [ALi] M1533 PCI to ISA Bridge [Aladdin IV]
00:09.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08)
00:09.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08)
00:0b.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)
00:11.0 Bridge: Acer Laboratories Inc. [ALi] M7101 PMU
01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev 82)

Excalibur 02-16-2003 07:33 PM

OK, So the kernel is able to see the root hub controllers. Now it gets a little more technical.

Now try the following:
mount -t usbdevfs /proc/bus/usb
ls -l /proc/bus/usb

The last should output something like:
bash-2.05a# ls -l /proc/bus/usb
total 0
dr-xr-xr-x 1 root root 0 Jan 31 08:47 001
dr-xr-xr-x 1 root root 0 Jan 31 08:47 002
-r--r--r-- 1 root root 0 Feb 16 19:50 devices
-r--r--r-- 1 root root 0 Feb 16 19:50 drivers

If not, then there is something missing for USB support. Post more info on your kernel, etc. If OK, then proceed.

Then;
cat /proc/bus/usb/devices

The output will depend on what is conencted. My listing is rather long to post, so I will just provide the part that deals with a printer device.

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0711 ProdID=0302 Rev= 1.04
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=07(print) Sub=01 Prot=01 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 0 Alt= 2 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 4 Ivl=1ms

If you have multiple devices attached it can be very difficult to read, but I think each device section starts with the letters T:. Sometimes it includes an S: line that inlcudes a plain text string to really help with the ID. As you can see from above though this device does not. But perhaps your HP printer will. The key above is the I: lines where it contains the word "print" and the device is usblp.

If you only have two "T:" sections that describe a USB root hub, then nothing is being detected by the root hub. Check the cable and stuff. Maybe even the BIOS IRQ assignment, etc. The root hubs looks something like:

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=a800
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms

And I hope we solve this soon, very soon, I am running out things to look at! Perhaps the above will reveal something.

Have you verified the printer actually works using the USB on this computer, like from Windows or a prior Linux distro?


All times are GMT -5. The time now is 04:08 PM.