WZR-HP-G300NH - USB printing?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
jdvoracek
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 29

PostPosted: Fri Dec 24, 2010 17:44    Post subject: WZR-HP-G300NH - USB printing? Reply with quote
[EDIT] Skip to fifth post for my guide.

I've tried the various guides I could find, none of which mention the WZR-HP-G300NH specifically, and I've used all the searches I could think of on this forum. Rather than tell you what I've done, I'd just like to hear from someone whose got it working. TIA and Happy Holidays!

_________________
WZR-HP-G300NH DD-WRT v24-sp2 (08/12/10) std - build 14929 [AP, USB printing, USB storage]
WHR-G125 DD-WRT v24-sp2 (08/07/10) std - build 14896 [Repeater Bridge]


Last edited by jdvoracek on Mon Jan 03, 2011 5:31; edited 1 time in total
Sponsor
joekanji
DD-WRT Novice


Joined: 30 Dec 2010
Posts: 2

PostPosted: Thu Dec 30, 2010 22:05    Post subject: USB printer working on WZR-HP-G300NH Reply with quote
[Edit: I've updated my post to remove unnecessary steps in case someone comes across this thread later]

[2nd Edit: p910nd updated to newer version. If you get a 404 error, look up the latest version starting from the packages section]

I've been successfully able to get my USB printer working on the WZR-HP-G300NH by adapting most of the information from another guide posted here by antidelldude:

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=69238

You'll need to know how to use either Telnet or SSH in order to get USB printing to work.

More or less, here is what I did to get USB printing working:

Step 1: Enable JFFS
On the Administration>>>Management tab scroll down and click enable under JFFS2. Apply settings.

Step 2: Enable Telnet and/or SSH.
Click the Services tab and click enable under Secure Shell and/or Telnet. Apply Settings.

Step 3: Enable USB Support
Click the Services tab and click USB. Enable everything except USB Storage. Apply Settings.

Step 4: Log into the router using SSH or Telnet
Here's a guide on using SSH/Telnet
http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line

Step 5: Install the print server while logged into the router via SSH or Telnet
wget http://downloads.openwrt.org/snapshots/trunk/atheros/packages/p910nd_0.94-1_atheros.ipk
ipkg install p910nd_0.93-2_atheros.ipk
(note: You can safely ignore the ERROR: File not found: messages)
rm p910nd_0.93-2_atheros.ipk

Step 6: Connecting to the Print server on windows computers.
Add a new printer, choose Local Printer. Choose Create a new Standard TCP/IP Port. Set the IP address to the IP of the router. (192.168.1.1 by default) Protocol should be RAW, Port number 9100. Install the correct drivers for the printer. For other operating systems, read here:
http://www.dd-wrt.com/wiki/index.php/Printer_Sharing#Workstation_setup

Note: Be sure to create a new printer. Do not modify an existing one.

I hope this helps, this is what worked for me. Thank you antidelldude for posting your guide.


Last edited by joekanji on Thu Jan 13, 2011 9:52; edited 2 times in total
jdvoracek
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 29

PostPosted: Fri Dec 31, 2010 2:12    Post subject: Reply with quote
Thank you! I think I understand now how it works. I had to add one step you left out from one of the other guides:

In the web interface, click tab administration tab then click commands. Enter the following code and click "save startup".
Code:

/jffs/usr/sbin/p910nd -b -f /dev/usb/lp0 0
/bin/mkdir -m 755 -p /dev/usb
/bin/mknod -m 660 /dev/usb/lp0 c 180 0

_________________
WZR-HP-G300NH DD-WRT v24-sp2 (08/12/10) std - build 14929 [AP, USB printing, USB storage]
WHR-G125 DD-WRT v24-sp2 (08/07/10) std - build 14896 [Repeater Bridge]
Tychoash
DD-WRT Novice


Joined: 31 Dec 2010
Posts: 2

PostPosted: Fri Dec 31, 2010 18:26    Post subject: Thanks! Reply with quote
A HUGE thanks for both of you two for posting this info. I had bought the G300NH cause it is dual-n and could share. After I got it, it only talked about NAS support. After searching around I found this thread and voila! a Windows 7 hi speed network with printer sharing. You guys rock and make me proud to be a nerd!
jdvoracek
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 29

PostPosted: Mon Jan 03, 2011 6:59    Post subject: This worked for me Reply with quote
Thanks to antidelldude, joekanji (second post this thread), and those before who posted guides on getting USB printing working. There are some differences in approaches, probably due to differences in dd-wrt versions and hardware, so I am summarizing the essentials of what worked for me using a Buffalo WZR-HP-G300NH running DD-WRT v24-sp2 (08/12/10) std - build 14929. My printer is an HP LaserJet 1022.

I did not need to use the watchprinter cron job used by antidelldude. The p910nd package I installed included boot Linux start/stop scripts, so the print driver is started automatically at boot. I also did not add a startup command to start the driver for the same reason. I did add startup commands, however, to create the /dev/usb/lp0 node since the 2.6 kernal used with my dd-wrt version does not do so (see http://svn.dd-wrt.com:8000/dd-wrt/ticket/1320).

Step I) Enable JFFS:
1. On the router web page click on Administration>Management.
2. Scroll down until you see JFFS2 Support section.
3. Click Enable JFFS.
4. Click Save.
5. Wait couple seconds, then click Apply.
6. Wait again. Go back to the Enable JFFS section, and enable Clean JFFS.
7. Do not click "Save". Click Apply instead. The router formats the available space.
8. Wait till you get the web-GUI back, then disable "Clean JFFS" again.
9. Click "Save".
10. Reboot the router.
Note - Clean JFFS is a DANGEROUS COMMAND. Do it only when initializing or COMPLETELY CLEANING your JFFS file system. If you do this after installing anything to /jffs, you will lose it!

Step II) Enable SSH: Click the Services>Services tab and click enable under secure shell. Apply Settings.

Step III) Enable USB Support: Click the Services>Services tab and click usb enable everything except usb storage. Apply Settings.

Step IV) Install p910nd, a small printer daemon intended for diskless workstations that do not spool to disk but pass the job directly to a printer.
1. Login to your router using SSH (user=root, pw=your password).
2. Execute (ignore ipkg not found errors):
Code:
cd /jffs
wget http://downloads.openwrt.org/snapshots/trunk/atheros/packages/p910nd_0.93-2_atheros.ipk
ipkg install p910nd_0.93-1_atheros.ipk
rm p910nd_0.93-1_atheros.ipk


Step V) Add startup commands to create /dev/usb/lp0 node for printer:
1. Click Administration>Commands
2. In the Commands box enter:
Code:
/bin/mkdir -m 755 -p /dev/usb
/bin/mknod -m 660 /dev/usb/lp0 c 180 0

3. Click SAVE STARTUP
4. Reboot your router
5. SSH back in and execute:
Code:
pidof p910nd
6. If your print driver is running, the above will return a number (the process id of the driver). If you get nothing back, time to troubleshoot.

Step VI) Set up an IP printer on workstations from which you will print: see http://www.dd-wrt.com/wiki/index.php/Printer_Sharing#Workstation_setup. Also remember to install the correct printer driver in Windows. Most of the guide in the URL listed is outdated and unnecessary since it was written before dd-wrt included USB support. Note - some users report needing to disable bidirectional printing and/or advanced printing features.

_________________
WZR-HP-G300NH DD-WRT v24-sp2 (08/12/10) std - build 14929 [AP, USB printing, USB storage]
WHR-G125 DD-WRT v24-sp2 (08/07/10) std - build 14896 [Repeater Bridge]


Last edited by jdvoracek on Fri Jan 07, 2011 20:53; edited 1 time in total
MikeRoger
DD-WRT Novice


Joined: 07 Jan 2011
Posts: 1

PostPosted: Fri Jan 07, 2011 18:32    Post subject: Re: Reply with quote
The same issue was faced by here.
Despite the best effort all source i could not solve the issue with this printer.I had to change the printer at the end. Now i am lg 613B-78GX.
Which is working fine.

_________________
sticker printing|cheap stickers
amirsa
DD-WRT Novice


Joined: 20 Sep 2011
Posts: 2

PostPosted: Tue Sep 20, 2011 17:34    Post subject: Reply with quote
Hello Everyone
I have WZR-HP-G300NH with this firmware: DD-WRT v24SP2-EU-US (08/19/10) std
My Printer is : Hp P1006
and I followed commands in this topic but nothing happens!
Also I double check commands in http://www.dd-wrt.com/wiki/index.php/Printer_Sharing#Print_server
But The Print not working! Sad

netstat -an Result
Code:
root@DD-WRT:~# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:9100            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN


Ps Rsult
Code:
root@DD-WRT:/jffs/etc/init.d# ps | grep p9100d
  916 root       604 S    p9100d -f /dev/lp0 0 -t 5


Piodf Result
Code:
root@DD-WRT:/jffs/etc/init.d# pidof p910nd
916


What Should I do? Rolling Eyes
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7632

PostPosted: Tue Sep 20, 2011 17:57    Post subject: Reply with quote
amirsa wrote:
Hello Everyone
I have WZR-HP-G300NH with this firmware: DD-WRT v24SP2-EU-US (08/19/10) std
My Printer is : Hp P1006


HP P1006 is a printer without firmware, a printer which must get its firmware from the computer it is connected to.
You will have to find that firmware and make a script file which uploads the firmware to the printer every time you power on the printer.

_________________
Kernel panic: Aiee, killing interrupt handler!
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Tue Sep 20, 2011 20:24    Post subject: Reply with quote
WZR-HP-G300NH Router: Advanced Printer Sharing with hotplug
foo2xqx: a linux printer driver for XQX stream protocol
DD-WRT Forum :: View topic - USB Hotplug Script Support
Loading printer's firmware in a Hotplug script - TomatoUSB

_________________
DD-WRT Forum - Atheros Recommended Build
amirsa
DD-WRT Novice


Joined: 20 Sep 2011
Posts: 2

PostPosted: Wed Sep 21, 2011 7:29    Post subject: Reply with quote
Thanks LOM & FYI2000. Problem Solved Automatically!(I did'nt also download the driver because the driver link is broken!)

Now if i want to connect my HardDisk Drive to the AccessPoint, What should i do? Is it possible by just using a plan usb hub?

And my last question is about USB Eject Button on the Access Point. If i want connect multiple device at once to the accesspoint via USB Hub, do i need to press the Eject Button for disconnecting one of them? (Ex: Usb Flash Disk)
Vaevictus
DD-WRT Novice


Joined: 11 Jul 2006
Posts: 35

PostPosted: Sun Mar 11, 2012 14:31    Post subject: printing to CLP-320 works Reply with quote
Thanks for the guide.
Confirmed working with the following hardware

buffalo WZR-HP-G300NH (atheros)
DD-WRT v24SP2-MULTI (10/31/11) std - build 17798
printer: Samsung colour laser CLP-320 series

comments: the link for p910nd was 404ing so use http://downloads.openwrt.org/snapshots/trunk/atheros/packages/p910nd_0.95-2_atheros.ipk

have only tested the windows test page but so far so good
fyi
DD-WRT User


Joined: 01 May 2009
Posts: 105

PostPosted: Sun Mar 11, 2012 15:31    Post subject: Reply with quote
WZR-HP-G300NH v2 running Buffalo's DD-WRT v24SP2-MULTI (10/31/11) std - build 17798. USB printing worked out of the box. Tested for HP Color Laser Jet 2600n and Brother 1440.

All I had to do was select Core USB Support and USB Printer Support in the Services tab.
Vaevictus
DD-WRT Novice


Joined: 11 Jul 2006
Posts: 35

PostPosted: Sun Mar 11, 2012 16:14    Post subject: Reply with quote
I kind of assumed that there was manual configuration necessary so yeah might well have worked out of the box without following this guide.

the state of the dd-wrt wiki is dire!
Kraftmuschel
DD-WRT Novice


Joined: 12 Apr 2012
Posts: 2

PostPosted: Thu Apr 12, 2012 20:05    Post subject: Reply with quote
guys pls.....

i did all of the actions i had to do in post #5.

i've got an process id:

Code:

root@DD-WRT:~# pidof p910nd
952

and the router is listening on port 9100:
Code:

root@DD-WRT:~# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 192.168.11.1:49152      0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9100            0.0.0.0:*               LISTEN


but there is no print on printer... the spooler shows: printing...
after a couple of minutes it shows: error - printing

i've got an Buffalo WZR-HP-G300NH DD-WRT v24SP2-MULTI (10/31/11) std - build 17798
and a Brother MFC 215C printer (firmware? installed on printer or does it get it from PC? dont' know...)

please help! Sad

p.s.: i'm german so sorry about my bad english :X

EDIT:i've got it.....
the printer does not print bidirectional, so i'd change in the /jffs/etc/config/p910nd file the option bidirectional to 0... now it looks like this:
Code:
config p910nd
   option device        /dev/lp0
   option port          0
   option bidirectional 0
   option enabled       0

and it does work fine Very Happy thanks to this thread! Smile <3
iveera
DD-WRT Novice


Joined: 15 Apr 2013
Posts: 3

PostPosted: Mon Apr 15, 2013 21:00    Post subject: Hi Reply with quote
Really nice forum.. You can try third party iveerasupport, they are providing comprehensive Brother Printer Technical Support from Certified, highly skilled technicians available 24/7.
Smile
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum