USB Printing with DD-WRT
*Update* 30/07/2017 : As you can see, this guide is very dated, however I believe the general steps should still be the same as the helpful comments from readers mentioned below, though you may need to find the latest drivers and packages for your setup. Do give a shoutout if you used my guide recently and let us know if it still works! Some have also mentioned that JFFS2 may not be required now, although it was something I did back then.
I had recently switched my home router to a TP-LINK TL-WR1043ND and decided to make full use of my spanking new router by upgrading it to DD-WRT firmware. It was quite fun doing the upgrade process, but my main point for this post is not to talk about how to upgrade it, but to touch on one interesting feature that I had spent a little while getting to work - USB printing.
I have a Brother HL-2040 printer lying around in the house which has not been used ever since the com connected to it went dead. I have always wanted to try connecting it to my new router and share it across my home network, but never got around to actually doing it for the lack of a more compelling reason other than to do printing at home, which I can usually do in office. The push to do this came when my dad needed to print something.
Disclaimer: I take no credit for the guide I did below, which was a compilation of different advices from a few websites. I will include links to those sites at the end for further references for anyone who still cannot make it work. This goes to say that you are using this guide at your own risk. I do not guarantee it works, and bricking your router IS possible.
I also want to highlight that although I am using a TP-LINK router and a Brother printer, this guide is generic and should probably work for any other combination of routers/printers. Another thing to highlight is my firmware version, which is DD-WRT v24-sp2 (08/07/10) std - build 14896.
With that, the steps as promised (it is assumed your router is already upgraded to DD-WRT firmware and tested in stable working condition):
And you are done! You can print a test page to verify it works.
And these are the links I used to compile this guide:
http://www.dd-wrt.com/wiki/index.php/Jffs#Enable_JFFS:_Create_.2Fjffs
http://sites.google.com/site/wl520gu/
http://www.dd-wrt.com/wiki/index.php/Printer_Sharing
http://www.dd-wrt.com/wiki/index.php/Asus_WL-520GU#VPN_.2B_USB_Printer_server
I had recently switched my home router to a TP-LINK TL-WR1043ND and decided to make full use of my spanking new router by upgrading it to DD-WRT firmware. It was quite fun doing the upgrade process, but my main point for this post is not to talk about how to upgrade it, but to touch on one interesting feature that I had spent a little while getting to work - USB printing.
I have a Brother HL-2040 printer lying around in the house which has not been used ever since the com connected to it went dead. I have always wanted to try connecting it to my new router and share it across my home network, but never got around to actually doing it for the lack of a more compelling reason other than to do printing at home, which I can usually do in office. The push to do this came when my dad needed to print something.
I also want to highlight that although I am using a TP-LINK router and a Brother printer, this guide is generic and should probably work for any other combination of routers/printers. Another thing to highlight is my firmware version, which is DD-WRT v24-sp2 (08/07/10) std - build 14896.
With that, the steps as promised (it is assumed your router is already upgraded to DD-WRT firmware and tested in stable working condition):
- Enable JFFS2
- On "Administration" tab -> "JFFS2 Support" -> enable "JFFS2"
- Click "Save"
- Wait a few seconds, and click "Apply Settings" at bottom of the page
- Enable "Clean JFFS2" and click "Apply Settings" at bottom of the page (You will lose connection to your router for awhile)
- Disable "Clean JFFS2" and click "Save" at bottom of the page (I did not need to do this as the option was disabled when I got connection back to my router)
- Click "Reboot Router" at bottom of the page (IMPT!!)
Enable USB
- On "Services" tab -> "USB" tab, enable the settings as below
- Click "Apply Settings"
Enable SSH
- Still in "Services" tab -> "Services" tab ->" Secure Shell", enable the settings as below
- Click "Apply Settings" and after a few seconds, click "Reboot Router"
- Telnet/SSH into your router (IP is usually 192.168.1.1). Username is "root" while default password is "admin", unless you have changed it
- Download the package with this command
wget http://downloads.openwrt.org/snapshots/trunk/brcm-2.4/packages/p910nd_0.93-1_brcm-2.4.ipk
- Install the package with this command
ipkg install p910nd_0.93-1_brcm-2.4.ipk
- Connect printer to the router, switch on printer and reboot the router
- When the router is up, Telnet/SSH into the router
- Type "ps" and enter. You should see something like below (Mine was "p9100d" and not "p910nd" as some suggested)
- Type "netstat -an" and enter. You should see something like below "listening" to port 9100
- (I did not get anything when I did a "ls /dev/usb/")
Connecting to printer on a Windows XP machine
- In Control Panel -> Printers and Faxes -> File -> Add Printer
- In "Add Printer Wizard", click "Next"
- In "Local or Network Printer", select "Local printer attached to this computer". Check "Automatically detect and install my Plug and Play printer" if your machine previously has the drivers already installed, or else uncheck it and download your printer's drivers from the manufacturer (I got mine from Brother's website, you will get prompted for the drivers). Click "Next"
- In "Select a Printer Port", select "Create a new port" and select "Standard TCP/IP Port' from the dropdown box. Click "Next"
- In "Add Standard TCP/IP Printer Port Wizard", click "Next"
- In "Add Port", enter the IP Address of your router. The port name will be auto filled but you can change it to anything. Click "Next" (It will take awhile here before next screen comes up)
- In "Additional Port Information Required", select "Custom" and click "Settings"
- In Configure Standard TCP/IP Port Monitor, select "Raw" for Protocol and type "9100" for Port Number (as below). Click "OK"
- In "Additional Port Information Required", click "Next"
- In "Completing the Add Standard TCP/IP Printer Port Wizard", click "Finish"
Install Printer Drivers
And you are done! You can print a test page to verify it works.
And these are the links I used to compile this guide:
http://www.dd-wrt.com/wiki/index.php/Jffs#Enable_JFFS:_Create_.2Fjffs
http://sites.google.com/site/wl520gu/
http://www.dd-wrt.com/wiki/index.php/Printer_Sharing
http://www.dd-wrt.com/wiki/index.php/Asus_WL-520GU#VPN_.2B_USB_Printer_server
Very well designed "How To" for setting up a print server with DD-WRT...Surprised no one else has ever made a comment before.
ReplyDeleteThanks!
This does seem to be very helpful. Thank you very much. Filenames and locations have changed since it was written so the specified wget failed but I managed to find it. I'm closer than I've been, I'm sure, but still have work to do.
ReplyDelete: DD-WRT v24-sp2 (03/29/14) std does not have jffs2 support in Administration/Management
ReplyDelete--> should I forget USB printing ?
i just used this guide to setup my printer, worked like a charm
Delete**i also didnt find the JFFS2 enable, so i just went ahead without it....still worked
DDWRT build 20675 and Samsung printer
several years later and still more useful than the wiki - as the dev/usb is not valid for all models.
ReplyDeleteyours worked as expected and don't have to use the netgear/etc usb redirector packages that don't stay connected
- very nice work and thanks
DD-WRT v24-sp2 (02/xx/15)
and
DD-WRT v3.0-r27715M kongac (08/23/15)
Netgear R6300V2
Worked great for my HL-2040 (the AK-47 of printers) on a TP-Link N750 (DD-WRT v24-sp2 (03/25/13) std), thanks!
ReplyDeleteInstallation on Windows worked well too, but with Ubuntu I'm having troubles. Ubuntu connects to the printer when I set it up as ipp://[router-IP]:9100, but it doesn't print, print jobs are not getting done. Anyone had the same problem?
I have tried to download and install package, but its saying file not found .. not sure what I am missing?
ReplyDeleteHi, have you tried to download the latest package?
Delete