How to Use the P910nd Print Server

How to do things, solutions, recipes, tutorials
Message
Author
DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

Tried this

#16 Post by DanielV »

I have added this command to the post-boot (if you thought to add there ("at the start")). I don´t know exactly where, therefore I did it two times. See attachment for script and appropriate log. Again prints only second printer when attemped to print on first one. Nothing new.

If I can answer your question - I have erased post-boot script and connected only first printer. Log in the attachment.
Attachments
Log_only 1st printer without script.zip
(87.36 KiB) Downloaded 400 times
Log_2.zip
(87.98 KiB) Downloaded 382 times
Script_2.PNG
(20.24 KiB) Downloaded 1012 times
Log_1.zip
(87.91 KiB) Downloaded 391 times
Script_1.PNG
(20.15 KiB) Downloaded 1005 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#17 Post by rcrsn51 »

Your original post has this code:

Code: Select all

p910nd -f /usb/dev/lp0 0
p910nd -f /usb/dev/lp1 1 
But we have been using:

Code: Select all

p910nd -f /dev/usb/lp0 0
p910nd -f /dev/usb/lp1 1 
Which of these is valid?

A useful command is

Code: Select all

ps | grep p910
This will show what servers are running.

Change the first line of the script from

Code: Select all

#!/bin/sh
to

Code: Select all

#!/bin/bash
Type each of the commands in the script individually. After the line

Code: Select all

D=${L:15:1}
type

Code: Select all

echo $D
This value should be either a zero or a one.

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

Tried all

#18 Post by DanielV »

Valid code was

Code: Select all

 p910nd -f /dev/usb/lp0 0
[code] p910nd -f /dev/usb/lp1 1

It was my mistake. I wrote this from my memory(head). /usb/dev even doesn´t exist in my system.

But this code now also doesn´t work!

Only thing that works now  is to run these code when router and printers are on:

p910nd -f /dev/usb/lp1 1

Then servers running, see attachment (Servers running_no script).

I tried everything you suggested, #!/bin/sh or #!/bin/bash results in the same - prints only second printer when attempting the first one.

When this script is running, command ps | grep p910 resulting in, see attachment, maybe this will be important for you (When script is running).

I couldn´t display the value $D, blank line in Putty, blank in System Command field in router web interface.

Thanks
Attachments
Script_current.PNG
(20.4 KiB) Downloaded 1009 times
When script is running.PNG
(79.17 KiB) Downloaded 688 times
Servers running.PNG
(16.75 KiB) Downloaded 953 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#19 Post by rcrsn51 »

The "ps" command shows that both servers are running. However, if the router is servicing one of the printers on its own, I don't know how to turn that off.

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

Never mind

#20 Post by DanielV »

I want to say that you did great work. Thanks again.
I will solve this probably by flashing with OpenWRT firmware.

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

#21 Post by DanielV »

I have solved the problem with two printers but not via software way. Simply I changed Asus WL 500G Premium with Asus WL 500G and all is done. This router is equipped with parallel port too. And this unit services both LPT and USB printers at the same time perfectly.
Anyway, why p910nd works fine with WL 500G but with WL 500G P not? Maybe here is the solution... I think a lot of people want to solve sharing two printers at the same time with WL 500G P.
Last edited by DanielV on Sun 27 Mar 2011, 10:55, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#22 Post by rcrsn51 »

Glad to hear you got it working.

So how are the printers installed on your client machines? Is the parallel printer always on port 9100 and the USB printer on 9101?

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

#23 Post by DanielV »

Thanks again for your interest!
No, the USB printer is always on 9100 and the parallel printer is on port 9101. This is recommended:

e.g. here (in czech): http://netcode.cz/articles/router-asus- ... erver.aspx or e.g. here (in english): http://wl500g.info/showthread.php?t=771

I followed that and works fine.

I am still afraid of flashing with OpenWRT, cause I am still green in Linux. Therefore I looked for this router (WL 500G) and I am glad that works. For sure, Asus WL 500G has 1x parallel and 1x USB 1.1 ports.

I will post here logs, commands again, if needed.

Thank you very much

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

Log_WL 500G

#24 Post by DanielV »

In the attachment is Log file from Asus WL 500G. It works fine with two printers, no matter in which order they are turned on, etc.
Maybe you have an idea what to do with WL 500G Premium to get it working ...
Attachments
WL 500G_System log.zip
(95.79 KiB) Downloaded 332 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#25 Post by rcrsn51 »

Here is one more script to try. Change the PID's to match your two printers.
Attachments
p910nd-start.tar.gz
(311 Bytes) Downloaded 487 times

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

Log

#26 Post by DanielV »

Using this script again prints only the second printer on port 9101. There is log file from WL 500G premium in the attachment.
Attachments
WL 500G Premium_System Log.zip
(93.4 KiB) Downloaded 329 times

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

I have an idea

#27 Post by DanielV »

Is it possible to run only one instance of p910nd and the other printer run on LPR? Cause it is hard to run automatically two instances of p910nd this could work. Can you write this script?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#28 Post by rcrsn51 »

That script works correctly for me on an actual Puppy machine. But I have no idea what's happening inside your router. And it's impossible for me to tell by looking at the logs. I don't suppose that you want to send me the router? :wink:

DanielV
Posts: 17
Joined: Thu 03 Mar 2011, 07:50
Location: Czech Republic

Why not?

#29 Post by DanielV »

Cause I am very wondering why this cann´t working, I would like to send you this router, of course! :)

But I live in Czech Republic, you probably in Canada. That´s the problem :?

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#30 Post by edoc »

We followed all of the steps & not working - still appears to be using CUPS in Linux.

Did we need to first delete the printer(s) in CUPS?

In Microsoft Win7 also followed steps & it doesn't work - getting "Print Error".

When running "p910nd-start" is the script supposed to run and go to "script complete hit return to close window" or should it be "scanning" - looking for printers on port 9100?

EDIT: Just observed on another Puppy computer that the P1006 printer shows up there as:
p1006@192.168.1.135 -- but when I sent a print job it just disappeared.

If I send a print job from the computer that has previously been used to manage both CUPS & the Router printer settings it now also disappears.

I went to Console on that computer, powered off the printer, then ran the code you gave me, then powered on the printer - which cycled as it always has:

Code: Select all

cat /usr/share/foo2xqx/firmware/sihpP1006.dl | nc -w 1 192.168.1.1 9100
I then sent another job, which showed up in Jobs in CUPS, but it never printed.

WDYT?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

drblock2
Posts: 153
Joined: Mon 19 Jan 2009, 12:38

Free of Windows at last!

#31 Post by drblock2 »

I took the end to support for Windows XP on April 8 as a good reason to finally retire the Windows XP LAN that I installed twelve years ago.

I did a frugal install of Lucid 5.8.2.6 on the elderly server (Thinkpad R52) and everything worked almost out of the box - except printing.

After dancing the SAMBA and looking deeply into my CUPS for several hours, I found this thread, installed the pet, followed the easy directions on the box and scored instant success.

Thanks so much for your help!

User avatar
wimpy
Posts: 406
Joined: Wed 22 Aug 2012, 10:30
Location: Essex, UK

#32 Post by wimpy »

@rcrsn51 I have a brother printer attached to a puppy. It will print as a local printer via cups (you kindly made me a pet for the printer some time ago). I've set up its IP as static. If I try to print through p910nd I get nothing. I also get nothing when trying to print through the network from another linux pc.
I'd be grateful for any help or advice.
LxXenial16.08, LxPupSc17.07.01,Lucid 5.2.8 and others - all frugal

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#33 Post by rcrsn51 »

Do you have a firewall running on either machine? To be absolutely sure, install Peasy Firewall Monitor.

Then describe step-by-step what you have done on each machine.

What Puppy is this?

On the server machine run the command: ps
Can you see the p910nd server running?

User avatar
wimpy
Posts: 406
Joined: Wed 22 Aug 2012, 10:30
Location: Essex, UK

#34 Post by wimpy »

Thanks for the reply. Downloaded and installed the firewall monitor on both machines, which reports that no firewall is installed on either. Running Lucid 5.2.8 on both PCs (haven't got round to the Windows machines yet). I just followed the steps as laid out at the beginning of this thread. After installing p910nd I ran p910nd-start to get the daemon going.
The PC with the Brother printer hangs and does nothing when I try to print a test page. The job appears in the list and can be cancelled. The 2nd PC seemed to install the printer OK as set out in this thread but the test page also just hangs and nothing goes through (nothing appears on PC1's job list although the job appears on PC2's list). I've set the access rights on PC1 to allow "anonymous" to print, which is how the owners appear in the job lists. I get the feeling that PC2 is treating it as a local printer?
I've also set the brother printer up as a separate local printer on PC1 and it prints the test page OK.
Last edited by wimpy on Tue 08 Jul 2014, 16:54, edited 2 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#35 Post by rcrsn51 »

rcrsn51 wrote:On the server machine run the command: ps
Can you see the p910nd server running?
This is important.

Post Reply