LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   CUPS + DI-704p Router + Print Server (https://www.linuxquestions.org/questions/linux-software-2/cups-di-704p-router-print-server-345222/)

oxblood 07-20-2005 11:16 PM

CUPS + DI-704p Router + Print Server
 
So here's my story: I'm trying to share my printer (hpdeskjet 940c) which is connected to my router's print server (DI-704p) among all my machines (1 XP, 1 XP server, 1 Slackware, 1 debain, 1 Solaris, 1 XP laptop). Of course, D-link has provided print server drivers for Windows machines but Linux/Unix as usual are neglected.

I tried to use CUPS to make my Linux machines take advantage of shared printer. I've set my printer on Linux as following:

/usr/sbin/lpadmin -p printername -E -v socket://192.168.0.1 -m deskjet.ppd

Now, everytime I try to print a page I get the following message from http://localhost:631/

"Network host '192.168.0.1' is busy; will retry in 5/1/5/30 seconds..." but nothing happens. I have tried to set the network interface to:

socket://192.168.0.1:515

As I have witnessed that the printer and LAN machine are exchanging packets through destination port (on the router) of 515 when I ran Ethereal. No luck! I switched the protocol to LDP (ldp://192.168.0.1(:515) but that kept shutting down the printer as soon as a job was submitted. For some reason I get this message, "One byte of data was received" and the printer needs to be restarted. The content of Ethereal shows the LDP protocol keeps failing by issuing incorrect message or something but TCP packet exchange goes ok (Ethereal was run under Windows machine by the way).

So now I don't know what else I can do. Any ideas?

Pete M 07-21-2005 04:23 PM

oxblood

Can't take any credit for this because I found the information on the net

Try this

Queue Type - Networked Unix (LPD), Server - 192.168.0.1, and Queue - lp (that's lower-case L and P).

Pete

oxblood 07-21-2005 09:10 PM

Hey Pete,

Thanks for your reply. Would you mind posting the link/url you found these information because I can't find a way to set the queue type/server... in CUPS.

Thanks

Pete M 07-22-2005 03:36 AM

Hi oxblood

You are using Cups web interface at

http://localhost:631

Just click the URL and it should open cups for you

Add printer, log in as username root + your root password

The rest should be obvious

Will try and find the web page I found the information on but all I did was copy and paste

Pete

Hangdog42 07-22-2005 08:11 AM

I don't know if this will be of much help, but I use CUPS with a Linksys wireless print server and it works well. I've got a step-by-step of how I set it up here

oxblood 07-22-2005 08:16 AM

Yes, but that's how I created my printer, via CUPS' webinterface. There is NO queue type as far as I know. For adding a printer I do the following:

- Name: something
- location: <empty>
- Description: my printer

- Device: I either choose AppSocket/HP JetDirect or LPD/LPR Host or Printer
- Device URI: Either socket://192.168.0.1(and w/ or w/o :515) or lpd://192.168.0.1
- Make and model as usual (supported ppd is available)

Then the printer is created and I do not see any other configuration relating to queue type or all that, unless I'm missing something!

I should add, I've the following devices available:

$: /usr/sbin/lpinfo -v
network socket
network http
network ipp
network lpd
direct canon:/dev/lp0
direct epson:/dev/lp0
direct parallel:/dev/lp0
direct scsi
serial serial:/dev/ttyS0?baud=115200
serial serial:/dev/ttyS1?baud=115200
serial serial:/dev/ttyS2?baud=115200
serial serial:/dev/ttyS3?baud=115200
serial serial:/dev/ttyS4?baud=115200
serial serial:/dev/ttyS5?baud=115200
serial serial:/dev/ttyS6?baud=115200
serial serial:/dev/ttyS7?baud=115200
network smb
direct usb:/dev/usb/lp0
direct usb:/dev/usb/lp1
direct usb:/dev/usb/lp2
direct usb:/dev/usb/lp3
direct usb:/dev/usb/lp4
direct usb:/dev/usb/lp5
direct usb:/dev/usb/lp6
direct usb:/dev/usb/lp7
direct usb:/dev/usb/lp8
direct usb:/dev/usb/lp9
direct usb:/dev/usb/lp10
direct usb:/dev/usb/lp11
direct usb:/dev/usb/lp12
direct usb:/dev/usb/lp13
direct usb:/dev/usb/lp14
direct usb:/dev/usb/lp15


oxblood 07-22-2005 10:42 AM

Hangdog42,

Sorry, I missed your reply. Your article is through and thanks for the tips. Unfortunately, D-Link printer server has a different setup than Linksys. I have set my Device URI as of following:

lpd://192.168.0.1/p1
Or lpd://192.168.0.1/P1
Or lpd://192.168.0.1/printer1

But none works; the printer starts up properly, accepts jobs but when it comes to the processing the actual job, for some reason the printer stops and I've to restart it. Either way, nothing gets printed. The job status is either in "Pending the process" or "Processing Since..." mode.

Here's the error_log for CUPS from the point where cupsd is started, adding a printer, and queuing a job.

http://..../cups.errlog.txt


It sends some command string to port 515 to the router but then the printer is shut down:

Code:

D [22/Jul/2005:15:03:57 -0400] [Job 1] KID3 exited with status 0
D [22/Jul/2005:15:03:57 -0400] [Job 1] tail process done writing data to STDOUT
D [22/Jul/2005:15:03:57 -0400] [Job 1] KID4 finished
D [22/Jul/2005:15:03:57 -0400] [Job 1] KID4 exited with status 0
D [22/Jul/2005:15:03:57 -0400] [Job 1] Renderer exit stat: 0
D [22/Jul/2005:15:03:57 -0400] [Job 1] KID3 finished
D [22/Jul/2005:15:03:57 -0400] [Job 1] Renderer process finished
D [22/Jul/2005:15:03:57 -0400] [Job 1]
D [22/Jul/2005:15:03:57 -0400] [Job 1] Closing foomatic-rip.
D [22/Jul/2005:15:03:57 -0400] [Job 1] Connected on ports 515 (local 1022)...
D [22/Jul/2005:15:03:57 -0400] [Job 1] lpd_command 02 p1
D [22/Jul/2005:15:03:57 -0400] [Job 1] Sending command string (4 bytes)...
D [22/Jul/2005:15:03:57 -0400] [Job 1] Reading command status...
D [22/Jul/2005:15:03:57 -0400] [Job 1] lpd_command returning 1
E [22/Jul/2005:15:03:57 -0400] PID 27883 stopped with status 1!
D [22/Jul/2005:15:03:57 -0400] UpdateJob: job 1, file 0 is complete.
D [22/Jul/2005:15:03:57 -0400] StopJob: id = 1, force = 0
I [22/Jul/2005:15:03:57 -0400] Saving printers.conf...
D [22/Jul/2005:15:03:57 -0400] StopJob: printer state is 5

Any ideas?

Pete M 07-22-2005 12:42 PM

oxblood

Quote:

lpd://192.168.0.1/p1
Or lpd://192.168.0.1/P1
Or lpd://192.168.0.1/printer1
How about

Queue Type - Networked Unix (LPD), Server - 192.168.0.1, and Queue - lp (that's lower-case L and P).

Which works out as

Code:

lpd://192.168.0.1/lp
You may already have tried this just not listed it in your post

Pete

oxblood 07-22-2005 01:20 PM

Many thanks to you Pete. Everything works great now; I also tried CUPS on Solaris 9/10 and it works!

Pete M 07-22-2005 01:46 PM

oxblood

Glad to help

Pete


All times are GMT -5. The time now is 07:30 AM.