OpenWRT on TP-Link WDR3600

Posted: 22nd January 2013 by knoppi in Computer Stuff, Hardware, Linux
Tags: , ,

For the history leading to this post, read TP-Link WDR3600: Router! Print-Server? and TP-Link WDR3600 – no information available.

After all the annoying information, I decided to change the firmware of my router. The main reason is that I had a weekend with 4 linux machines in my flat (all dual-boot) and none of them could access the usb-ip interface to the printer. As they also had Windows installed we just rebooted into Windows to install the driver there, which didn’t work out. Somehow you have to have the printer installed already, then the software can link the usb-ip interface to the already installed printer (correct me if I’m wrong). In summary: no possibility to use the network-printing under Linux, under Windows it is not very convenient. Actually I can use it only with one machine, so I had no reason to stay with the original firmware. Instead I decided to install OpenWRT (a Linux distribution for embedded devices). In the case it does not improve the situation it actually can’t make it worse.

Installing OpenWRT

OpenWRT has a very comprehensive documentation. It is worth having a closer look at it as mistakes in the process are not easily corrected. My further steps:

  1. Download an appropriate image. I chose openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin from http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/. In the filename you can see that I chose the image for my router, with a squashfs and the factory version. How to decide which filesystem to chose is explained on the OpenWRT page, the factory version allows for being installed via the original firmware’s webinterface.
  2. This is already step 2. Direct your browser to your router’s interface, choose “System Tools” -> “Upgrade Firmware”, upload your image and let the router do the update and the reboot. Note: I kept all the important manual pages of OpenWRT open as it should be expected that the internet connection does not work directly after the upgrade.
  3. Afterwards change the password as explained in the OpenWRT documentation and setup your internet connection, Wifi networks and so on.
Configuring OpenWRT

With these steps done I can do the same as with the firmware before or as with any normal router. The strengths of OpenWRT should lie within its flexibility and the possibility to install additional packages. Which ones do fulfill my needs? To learn about the possibilities a lot of busy persons wrote a lot of HowTos located under http://wiki.openwrt.org/doc/howto/start.

An important one might be Back to original firmware.

I postponed going through the following HowTos (not instantly needed but interesting for me):

Basis USB support

I started with USB Basic Support which told me that all the important modules are already installed. For convenience I also installed the usbutils package. This is what lsusb tells me:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB

Sounds good so far. I installed attached 4-port hub on one port and a my printer on the second port. In the hub I put a 4GB USB stick. They appear as

Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 006: ID 18a5:0304 Verbatim, Ltd
Bus 001 Device 005: ID 04e8:328e Samsung Electronics Co., Ltd CLP-310 Color Laser Printer

USB storage

First I thought, CUPS would be a good solution for the print server and as this needs storage space for spooling installing additional hard disc space seemed a good idea. Eventually I chose another print server than CUPS which needs no space for spooling. Thus the part on external storage has been moved to a separate post. If you only want to use the router as a print server, that’s fine to skip or to do it later. I did it before as more storage opens up nice opportunities as the router acting as central file server, as a media server etc.

Printer installation

My choice fell on the p910nd Printer Server. For the installation I simply followed the HowTo (you can do a ssh-login or install the package vie the web interface). The most complicated part was the installation on the client which is not part of this blog entry. Printers can be accessed directly via IPP on socket://router.ip:9100. And now the most important information: I can print from within Linux!

To give you an impression, my configuration /etc/config/p910nd reads:

config p910nd 'cfg1'
option device '/dev/usb/lp0'
option port '0'
option bidirectional '1'
option enabled '1'

Technical notes:

  • I installed kmod-usb-printer locally the printer server itself onto the USB disc.
  • For the installation on the USB storage the tutorial of the OPKG Package Manager is quite useful.
  1. […] is a continuation of my last post OpenWRT on TP-Link WDR3600. It deals with the use of my TP-Link WDR3600 as a central file […]

  2. Marchev says:

    Hi there,

    Can you please tell if OpenWRT is stable on WDR3600? I bought the router recently and I’m wondering whether I should it install OpenWRT on it. I was after DD-WRT but judging by the posts on the DD-WRT forum it seems that none of the builds is stable enough.

    Regards,
    Martin

    • knoppi says:

      Hi Martin!

      I’m running Open WRT for half a year now. Summarized, I can tell it is quite stable.
      If you intend, simply running it as a router, then simply go on.
      I also use it as a print server, as a media server and I’ve installed NFS and ownCloud to access the data stored on the attached USB harddrive. The latter is the only thing where I, sometimes, encounter problems.
      I don’t know yet if this is connected to the hard disk, not build for continuous operation, or the poor computing power of the router and the CPU-consuming design of ownCloud.

      • charly says:

        Hi,

        I recently bought WDR3600 and flashed openwrt 12.09. it;s able to read from a usb flash drive but not from a multislot usb card reader.
        from here, http://patinya-tuk.blogspot.sg/2009/09/usb-storage-howtoopenwrt.html, “TIP: The max_scsi_luns=8 bit is needed for multi-card readers and should be added to the end of the scsi_mod line in the /etc/modules.d/60-usb-storage file.”
        however, i cant find that line.

        do you manage to use multislot usb card reader with your wdr3600 openwrt?

        thank you.

        • knoppi says:

          Hi Charly!

          I never worked with multi-card readers on my router, just with a usb hub, which I thought was similar, but didn’t need extra options.

          About the line, you cannot find in /etc/modules.d/60-usb-storage: if it does not exist, why don’t you add it?
          It probably should look something like
          options scsi_mod max_scsi_luns=8

          But you have to search for the correct synax.

          • charly says:

            Thanks for your reply.
            The file exists but the line doesnt. the content of 60-usb-storage file is just

            usb-storage

            does it mean i need to modify the file so that it contains:

            usb-storage
            options scsi_mod max_scsi_luns=8

            ?

            what;s the file content syntax of the files in module.d for openwrt?
            what’s content of the file?

  3. knoppi says:

    Hi Charly!

    I think the syntax should be as in /etc/modprobe.d config files, and there it is just as you assume.

    man modprobe.d states:

    options modulename option...
    This command allows you to add options to the
    module modulename (which might be an alias)
    every time it is inserted into the kernel:
    whether directly (using modprobe modulename
    or because the module being inserted depends
    on this module.

    All options are added together: they can
    come from an option for the module itself,
    for an alias, and on the command line.

    So just go on. I think at this point you won’t break anything irrevertibly if you just try.

  4. charly says:

    Thanks for the fast response!
    i’ll give it a try.
    Cheers,

    Charly

  5. Max says:

    Thanks for the DIY knoppi, will be installing openwrt on my new WDR3600 tonight!