LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Possibly Defective USB Printer Module in Slackware 9.1 (https://www.linuxquestions.org/questions/slackware-14/possibly-defective-usb-printer-module-in-slackware-9-1-a-186512/)

ussishkin118 05-27-2004 09:56 AM

Possibly Defective USB Printer Module in Slackware 9.1
 
I am running Slackware 9.1, kernel 2.4.22, on a P4. Among other peripherals connected to it is a Samsung ML-1210 Laser Printer. It is attached to a 4-port USB hub with a UHCI interface. The interface, hub, and printer are all recognized at startup. However, although I can establish communication with the printer by echoing a string to /dev/usb/lp0, no data are transmitted to it. Neither CUPS nor the kde printer installation utility recognize the existence of /dev/usb/lp0, although kdeinfocenter (correctly) shows the printer attached to USB hub 1.

I know that the printer can work properly under Linux because I am able to print to it after booting from a Knoppix CD with kernel 2.4.20. Comparing the output of dmesg in Knoppix and Slackware, the only possibly relevant difference I see is in the absence in Slackware of the second line below:

printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300C
printer.c: v0.11: USB Printer Device Class driver #THIS LINE IS ABSENT IN DMESG FROM SLACKWARE

In other words, under Slackware my kernel is not loading "USB Printer Device Class driver". The absence of the driver is confirmed by the output of var/log/messages after detaching and reattaching the printer: "missing kernel or user mode driver printer".

My kernel is configured to load usb printer support as a module; the kernel configuration for usb support is identical to the one that successfully drives the printer under Knoppix. Evidently the Slackware module (printer.o) either did not compile correctly or is defective; after recompiling the kernel three times with the same results, I am more inclined to believe the latter.

Questions:
1. Is there any way to check the printer.o module for a defect that might be causing the problem?
2. If the module is defective, is it possible to obtain a properly-functioning one for kernel 2.4.22 and simply substitute it for the one currently in /lib/modules/2.4.22/kernel/drivers/usb, without rebuilding the entire kernel?
3. Would adding a patch or patches to bring the kernel to a higher patch number be likely to help?
4. Would it make a difference if usb printer support were compiled directly into the same kernel instead of as a module?
5. Would I be better off downloading, configuring, and installing a new generic kernel? If so, is there anyone successfully using this printer who can recommend a kernel? I am reluctant to take this route if I can avoid it, not only because of the time involved but because I also run win4lin and, after configuring and installing a new kernel, will have to recompile it yet again after adding the win4lin patch.

Any suggestions will be appreciated.

Andrew Benton 05-27-2004 11:42 AM

You say you have the printer connected to /dev/usb/lp0 . My experience with USB printers has been that the node that works is /dev/usblp0 . If it doesn't exist, create it with
mknod -m 666 /dev/usblp0 c 180 0
reboot and then configure the printer. Your message from Knoppix shows it using usblp0.

ussishkin118 05-27-2004 02:35 PM

Possibly Defective USB Printer Module in Slackware 9.1
 
I've done this already, to no avail. Just as with /dev/usb/lp0, I can establish contact with the printer, but no data are transmitted. Clearly the problem is reflected in the absence of the second line in the dmesg output, not in the designation of the printer device file.

In any case, thanks for the response.

Andrew Benton 05-27-2004 03:38 PM

Well, the other thing is we have a Samsung ML-1210 and we connect it as a line printer to the parallel port. My first response when I saw your post was to say "of course it won't work as a USB printer" because I didn't know it could work that way, but then I googled on it and found a review which said it could be connected either way. I'm babbling nonesense here aren't I? Clearly it's not a hardware problem if it works in Knoppix.

Once I installed Slackware 9.1 and I couldn't get my printers to work at all. The solution was to reinstall it and during the setup process there's a screen to choose which services are started at boot. Some of them are samba and stuff but there are two to do with printing. One of them is cups and I forget what the other is called. Anyway, the solution was to enable them both. Then the printers worked no problem. I'm sorry if I'm rambling but for me printing is like the intenet connection, it's a total showstopper if it's not working. It does my head in just thinking about it. I don't use Slack much so (as you've no doubt gathered) I don't have much experience with it. But I wish I could help.

berrold 06-13-2004 07:07 PM

RIGHT SOLUTION TO CUPS/LPRNG:-)
 
Quote:

Originally posted by Andrew Benton
Well, the other thing is we have a Samsung ML-1210 and we connect it as a line printer to the parallel port. My first response when I saw your post was to say "of course it won't work as a USB printer" because I didn't know it could work that way, but then I googled on it and found a review which said it could be connected either way. I'm babbling nonesense here aren't I? Clearly it's not a hardware problem if it works in Knoppix.

Once I installed Slackware 9.1 and I couldn't get my printers to work at all. The solution was to reinstall it and during the setup process there's a screen to choose which services are started at boot. Some of them are samba and stuff but there are two to do with printing. One of them is cups and I forget what the other is called. Anyway, the solution was to enable them both. Then the printers worked no problem. I'm sorry if I'm rambling but for me printing is like the intenet connection, it's a total showstopper if it's not working. It does my head in just thinking about it. I don't use Slack much so (as you've no doubt gathered) I don't have much experience with it. But I wish I could help.

RIGHT SOLUTION :
IT DOES NOT MATTER WHICH DEVICE YOU USE:-)
Just leave it.
Run pkgtool and remove package lpr*.tgz
Move to / and find ALL links content `->lprng` and move them to `->cups`.
That's all guys:-)

Calum 12-31-2004 06:15 AM

Re: RIGHT SOLUTION TO CUPS/LPRNG:-)
 
Quote:

Originally posted by berrold
RIGHT SOLUTION :
IT DOES NOT MATTER WHICH DEVICE YOU USE:-)
Just leave it.
Run pkgtool and remove package lpr*.tgz
Move to / and find ALL links content `->lprng` and move them to `->cups`.
That's all guys:-)

sorry, what?

i've removed lprng*tgz using pkgtool, but am not sure what you say to do next. from looking at it, all symlinks to lprng should point to cups instead. this isn't in / is it? should it be in /dev instead?
is there an easy way to accomplish this? i imagine it can be done in a one-liner.

thanks for your solution.


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