View previous topic :: View next topic |
Author |
Message |
bag n00b

Joined: 31 Aug 2006 Posts: 66
|
Posted: Fri Mar 16, 2007 5:11 pm Post subject: Parallel port HP printer doesn't seem to be recognised. |
|
|
Got a problem with my parallel port HP LaserJet 5L. Bought it second hand for cheap price recently and I know it works under that other OS. I can't print from it and when trying to set up printers in CUPS there's no option to choose the printer. It's on, attached correctly and everything but no option to pick the laser printer.
Problem appears to be recognising the parallel port - although I'm far from being an expert.
I've done:
Code: | dmesg | grep -i print |
and got:
Code: | drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x2F11
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
|
which appears to be my colour inkjet on a USB port. Nothing at all about the laser printer.
As an aside - what should it connect as under /dev ?? I'm not entirely sure that there's something there as a character device for it to connect to. Should there be a lpt0 for it to latch on to? Am I barking up the wrong tree?
Kernel has been configured to support parallel ports - no problems. But it's just not picking up the printer.
I've also worked through the CUPS documentation on gentoo - at http://www.gentoo.org/doc/en/printing-howto.xml#cups but that doesn't seem to be it.
CUPS is working in itself - and I can print out on the colour inkjet - but I just can't see/detect the parallel printer to set it up.
Any ideas? |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Fri Mar 16, 2007 5:34 pm Post subject: |
|
|
You need three things to get the parallel port working: parport, parport_pc and lp Code: | Symbol: CONFIG_PARPORT
Prompt: Parallel port support
Location:
-> Device Drivers
-> Parallel port support
Symbol: CONFIG_PARPORT_PC
Prompt: PC-style hardware
Location:
-> Device Drivers
-> Parallel port support
-> Parallel port support
Symbol: CONFIG_PRINTER
Prompt: Parallel printer support
Location:
-> Device Drivers
-> Character devices | First, check your .config to see if all three "Symbol"s are defined, either "=m" or "=y" should be fine.
If one is missing, go to "Location", look for "Prompt" and enable it.
If you make them modules, they will be called parport, parport_pc and lp and should be added to /etc/modules.autoload.d/kernel-2.6 _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
bag n00b

Joined: 31 Aug 2006 Posts: 66
|
Posted: Sat Mar 17, 2007 9:45 am Post subject: |
|
|
Wynn,
Thanks for the reply. Yes, all three are enabled - with a Y - and so I presume that this means that they are built into the kernel.
I've also double-checked the BIOS in case it was disabled. Nope.
So I now a very confused little bear...
Any other ideas? |
|
Back to top |
|
 |
bunder Bodhisattva

Joined: 10 Apr 2004 Posts: 5947
|
Posted: Sat Mar 17, 2007 10:32 am Post subject: |
|
|
did you forget to emerge hplip?
ps: your printers should show up under /dev/lp0, etc... try doing an ls -l > /dev/lpx?
cheers _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Sat Mar 17, 2007 10:56 am Post subject: |
|
|
bag wrote: | Yes, all three are enabled - with a Y - and so I presume that this means that they are built into the kernel. | You can run Code: | # lpinfo -l -v
...
Device: uri = parallel:/dev/lp0
class = direct
info = LPT #1
make-and-model = Unknown
device-id =
... | which should show the above /dev/lp0 as well as one for canon and one for epson.
You can also look in /var/log/messages where you should see something like Code: | Mar 17 08:01:14 lightfoot parport0: PC-style at 0x378 [PCSPP,TRISTATE]
Mar 17 08:01:14 lightfoot lp0: using parport0 (polling). | You can also try running Code: | # /usr/libexec/cups/backend/parallel
direct parallel:/dev/lp0 "Unknown" "LPT #1" | If you boot up with the printer switched on it should show up in /var/log/messages under lp0 or parport.
Just to dot the i's and cross the t's , you can check the config of your running kernel by Code: | # zgrep 'PARPORT\|PRINTER' /proc/config.gz
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
CONFIG_PARPORT_1284=y
CONFIG_PRINTER=y
CONFIG_USB_PRINTER=y |
_________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
bag n00b

Joined: 31 Aug 2006 Posts: 66
|
Posted: Tue Mar 20, 2007 7:55 pm Post subject: |
|
|
Wynn,
Thanks for your help too.
Got some interesting stuff out of that...
Running lpinfo -l -v didn't come up with what I wanted... what I got was:
Code: | $ sudo lpinfo -l -v
Password:
Device: uri = socket
class = network
info = AppSocket/HP JetDirect
make-and-model = Unknown
device-id =
Device: uri = beh
class = network
info = Backend Error Handler
make-and-model = Unknown
device-id =
Device: uri = hp:/usb/psc_1200_series?serial=HU32QBP3498X
class = direct
info = HP psc 1200 series USB HU32QBP3498X HPLIP
make-and-model = HP psc 1200 series
device-id = MFG:HP;MDL:psc 1200 series;CLS:PRINTER;DES:psc 1200 series;SN:HU32QBP3498X;
Device: uri = http
class = network
info = Internet Printing Protocol (http)
make-and-model = Unknown
device-id =
Device: uri = ipp
class = network
info = Internet Printing Protocol (ipp)
make-and-model = Unknown
device-id =
Device: uri = lpd
class = network
info = LPD/LPR Host or Printer
make-and-model = Unknown
device-id =
Device: uri = scsi
class = direct
info = SCSI Printer
make-and-model = Unknown
device-id =
Device: uri = serial:/dev/ttyS0?baud=115200
class = serial
info = Serial Port #1
make-and-model = Unknown
device-id =
Device: uri = serial:/dev/ttyS1?baud=115200
class = serial
info = Serial Port #2
make-and-model = Unknown
device-id =
Device: uri = smb
class = network
info = Windows Printer via SAMBA
make-and-model = Unknown
device-id =
|
which doesn't show anything directly connected to the parallel port. At least, that's my reading of the output...
Something that concerns me - is that there is no /dev/lp0 in my /dev file. I assume that either it should be there as a node to connect to, or should be automagically created by some hald or udev or something when it's connected... but it just isn't there at all.
Running ls /dev shows only the following:
Code: | $ ls /dev
audio loop5 random shm tty30 tty6 usbdev5.3_ep03
bus loop6 rd snd tty31 tty60 usbdev5.3_ep05
cdrom loop7 rtc sound tty32 tty61 usbdev5.3_ep81
cdrom1 mapper sda stderr tty33 tty62 usbdev5.3_ep82
cdrw1 mem sda1 stdin tty34 tty63 usbdev5.3_ep83
console misc sda2 stdout tty35 tty7 usbdev5.3_ep84
core mixer sda5 tts tty36 tty8 usbdev5.3_ep85
disk null sda6 tty tty37 tty9 usbdev5.3_ep86
dsp nvidia0 sda7 tty0 tty38 ttyS0 vcs
dvd nvidiactl sda8 tty1 tty39 ttyS1 vcs1
dvd1 nvram sdb tty10 tty4 ttyS2 vcs12
dvdrw1 oldmem sdb1 tty11 tty40 ttyS3 vcs2
fb port sdc tty12 tty41 urandom vcs3
fb0 psaux sdc1 tty13 tty42 usbdev1.1_ep00 vcs4
fbsplash ptmx sdd tty14 tty43 usbdev1.1_ep81 vcs5
fd pts sde tty15 tty44 usbdev1.2_ep00 vcs6
full ram0 sde1 tty16 tty45 usbdev1.2_ep02 vcs7
gpmctl ram1 sde2 tty17 tty46 usbdev1.2_ep81 vcsa
hda ram10 sde5 tty18 tty47 usbdev1.2_ep88 vcsa1
hdb ram11 sdf tty19 tty48 usbdev1.7_ep00 vcsa12
hpet ram12 sdg tty2 tty49 usbdev1.7_ep01 vcsa2
initctl ram13 sdh tty20 tty5 usbdev1.7_ep82 vcsa3
input ram14 sequencer tty21 tty50 usbdev2.1_ep00 vcsa4
kmem ram15 sequencer2 tty22 tty51 usbdev2.1_ep81 vcsa5
kmsg ram2 sg0 tty23 tty52 usbdev3.1_ep00 vcsa6
log ram3 sg1 tty24 tty53 usbdev3.1_ep81 vcsa7
loop ram4 sg2 tty25 tty54 usbdev4.1_ep00 zero
loop0 ram5 sg3 tty26 tty55 usbdev4.1_ep81
loop1 ram6 sg4 tty27 tty56 usbdev5.1_ep00
loop2 ram7 sg5 tty28 tty57 usbdev5.1_ep81
loop3 ram8 sg6 tty29 tty58 usbdev5.3_ep00
loop4 ram9 sg7 tty3 tty59 usbdev5.3_ep01
|
It's a bit messy there - sorry about that. But as you can see - there's no lp0 at all.
Is this a problem? Can I just create it myself, or will this break something?
Looking in var/log/messages brings up the fact that it was actually detected at boot time for old boots... but has not been detected for over a month now...
I honestly don't know what made the difference, but it's not visible after that. Any ideas on how I might get it back?!!
Running zgrep 'PARPORT\|PRINTER' /proc/config.gz returns the following:
Code: | markh@localhost ~ $ zgrep 'PARPORT\|PRINTER' /proc/config.gz
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
CONFIG_PARPORT_PC_FIFO=y
CONFIG_PARPORT_PC_SUPERIO=y
CONFIG_PARPORT_PC_PCMCIA=m
CONFIG_PARPORT_NOT_PC=y
# CONFIG_PARPORT_GSC is not set
CONFIG_PARPORT_AX88796=m
CONFIG_PARPORT_1284=y
CONFIG_PRINTER=m
CONFIG_I2C_PARPORT=m
CONFIG_I2C_PARPORT_LIGHT=m
CONFIG_USB_PRINTER=m
|
which sort of looks OK to me. Modules are OK right? Is there a real need for the code to be hard compiled in to the kernel?
Running /usr/libexec/cups/backend/parallel returns absolutely nothing. It just returns to the next line, that's all.
All in all - a bunch of info, but I'm not 100% certain what it all means... I'd appreciate some help deciphering it...
Thanks.
P.S. For Bunder - running ls -l > /dev/lpx returns nothing either. And hplip is emerged - I'm using it on my USB connected HP printer. |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Tue Mar 20, 2007 8:01 pm Post subject: |
|
|
The grep of your running kernel's config shows that you have parport, parport_pc and printer as modules â nothing wrong with that â but you will probably need to load thembefore your parallel port shows up.
You could put lp in your /etc/modules.autoload.d/kernel-2.6 _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
bag n00b

Joined: 31 Aug 2006 Posts: 66
|
Posted: Tue Mar 20, 2007 8:43 pm Post subject: |
|
|
Hey Wynn,
Thanks - but it doesn't seem to work...
Code: | markh@localhost ~ $ sudo modprobe -vv lp
FATAL: Module lp not found. |
How is it that I can have it compiled as a module, but that it doesn't seem to be found?
Do I need to create my /dev/lp0 file or can I leave it blank and not there as it currently is? Is it being handled by udev or hal or whatever?
Thanks. |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Tue Mar 20, 2007 8:59 pm Post subject: |
|
|
bag wrote: | Thanks - but it doesn't seem to work... Code: | markh@localhost ~ $ sudo modprobe -vv lp
FATAL: Module lp not found. | How is it that I can have it compiled as a module, but that it doesn't seem to be found? | Beats me !
However, it should be at Code: | ls -l /lib/modules/$(uname -r)/kernel/drivers/char/lp.ko | can you check?
bag wrote: | Do I need to create my /dev/lp0 file or can I leave it blank and not there as it currently is? Is it being handled by udev or hal or whatever? | No, it should be created by udev when the lp-parport_pc-parport trio load. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
bag n00b

Joined: 31 Aug 2006 Posts: 66
|
Posted: Wed Mar 21, 2007 12:10 pm Post subject: |
|
|
Wynn,
Ok, so I tried that and it can't find it...
Code: | localhost ~ # ls -l /lib/modules/2.6.18-kororaa1/kernel/drivers/char/lp.ko
ls: cannot access /lib/modules/2.6.18-kororaa1/kernel/drivers/char/lp.ko: No such file or directory
|
I've had enough of this - it's obviously not there. How do I rebuild modules for a running kernel? Do I need to rebuild the kernel first or can I avoid that if possible? I presume that if I rebuild the modules then it should be available for udev to use when necessary...
Thanks. |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Wed Mar 21, 2007 3:33 pm Post subject: |
|
|
To rebuild the modules for the running kernel: go to the kernel's source and run "make modules" then become root and, in the same place, run "make modules_install".
The output from "make modules" should show you parport, parport_pc and lp being compiled and "make modules_install" should show them being installed.
You can then check that they are there.
You can make sure that you are in the source for the running kernel bywhich will show you the release of the running kernel, to get to its source Code: | cd /usr/src/linux-$(uname -r) |
_________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
|