Random Noise

cat /dev/random >> /dev/dsp

Experiments with OpenWRT and USR5465

with 12 comments

I recently purchased U.S Robotics USR5465 router. I chose it because it had 4MB flash and 16MB ram; enough to run  linux based distribution for router such as OpenWRT. Out of the box, this router runs linux kernel 2.4 along with busy box. But I was very much interested to run latest kernel (2.6.x) on it. With OpenWRT it is easy to create the development environment. Just login to your favorite linux as a non-root and follow few steps mention here. Once you configure your router kernel and run make command. OpenWRT automatically downloads required toochain source and compiles it for your PC.

USR5465 has one serial port and possibly a 12 pin JTAG. So, I brought myself a Nokia DKU-5 cable (SN: WT048000317).  This cable has a usb to serial converter; and it’s cheap! I cut/removed the phone connector end of the cable. After a little research, I found out that:

Phone connector Pin#        Wire Color        Signal
            8                 RED              GND
            7                 GREEN            TX
            6                 WHITE            RX
            4                 ORANGE           3.3 OUT  (Not used, do not connect!!)

After connecting wires to jumper J301, compiling ark3116 kernel module and using 115200 baud rate with 8-N-1, I was able to connect my laptop to the router. When I restarted the router I saw the boot messages from router. Here is how I connected the wires:

|o|  --->   GREEN   (TX)
|o|  --->   WHITE   (RX)
|o|  --->   RED     (GND)

o -> Power led

#################################     <--- Motherboard edge

Another advantage of this router is that it has a USB 2.0 port. To use usb, I had to use revision 13088 and patched it using this patch

svn checkout -r13088 https://svn.openwrt.org/openwrt/trunk kamikaze
patch -p1 < kamikaze-r13088-b43ssb-2.6.27.diff

I had to change “BUSWIDTH 2” to “BUSWIDTH 1” in drivers/mtd/maps/bcm47xx-flash.c file in order to get a working image. Otherwise I saw few “error -5” lines after booting.

I wasn’t able to connect to the internet, even after I got the image to boot successfully. I found that the problem was due to incorrect labeling of the WAN and the LAN ports by OpenWRT.  Since I was able to connect to the router using the serial port I changed the VLAN config in /etc/config/network to:

#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 5*"
        option vlan1    "4 5"

Only then I was able to get a valid IP address and connect to the internet.

Other than wireless (which didn’t bother me, as I always use wired connection) everything is now working perfectly. Since this model is not supported by OpenWRT, it doesn’t know the led configurations and does not recognize the model. So I had to add that info. in diag.c file. gpioctl utility was useful to find out the led and  reset button gpios.

You can download modified diag.c from here. Once you compile you should see WAN led and USB led litup (need to do some configuration for USB led).

Further I was also able to install VPNC on the router and connect to CISCO VPN without any problem 🙂 This makes it easier for me when using Vista x64, as cisco doesn’t provide vpn client for 64bit windows.


Written by Vivek Unune

December 10, 2008 at 3:28 am

Posted in openwrt

Tagged with ,

12 Responses

Subscribe to comments with RSS.

  1. Hi, I have your same router.
    I’m going to ask you a stupid questiond:
    do you think it is possible to use the USB port of USR5464 to connect a USB external Hard Disk?


    April 23, 2009 at 12:00 pm

    • Yes absolutely. You just need to compile appropriate modules (like ntfs or fat).

      Vivek Unune

      April 23, 2009 at 12:58 pm

  2. Mmm…
    One more silly question…
    You mean that I have to change totally the firmware with a compiled one, or shall I use the sourcecode of the USR firmware (that is available on the site) and add the modules?


    April 23, 2009 at 4:12 pm

    • Yes, you will have to compile a new firmware but not from USR source. Since USR source uses kernel 2.4, I recommend trying OpenWRT source which uses kernel 2.6. Setting up of a development/build environment for OpenWRT is very easy. You just need a linux machine and internet connection.

      Vivek Unune

      April 23, 2009 at 4:20 pm

  3. I was going trough the OpenWrt documentation.
    The problem is that I have a Mac…
    I don’t think I can compile programs, am I right?


    April 23, 2009 at 4:22 pm

    • You could try installing VirtualBox for Mac OS X, which is open source virtual machine software. Create a new linux vm using it and I think you should be fine.

      Vivek Unune

      April 23, 2009 at 4:28 pm

  4. I’ll try!
    Thank you, thank you very much for your help!


    April 23, 2009 at 4:32 pm

  5. This blog was quite helpful towards getting a functioning 3rd-party firmware, and I thank you. I was wondering where you got the boardnum of 35324. With the help of the folks of dd-wrt, I have found it to be 38256, and the wireless can be made to work on this router.


    November 25, 2009 at 4:03 am

  6. I had access to the boot messages using the serial port. When openwrt image boots, it will show the board number and the board type. I went back and changed my code to look for that.

    Vivek Unune

    November 25, 2009 at 4:29 am

    • Thanks for that info. It is what I suspected. I’ll get my serial interface hooked up “someday soon”.

      I do know that 35324 is incorrect for one of my USR5465’s, so it seems a real possibility that there are more than one revision of this product, each having different a boardnum. I have a few USR5465’s that I can test, but of course if mine all turn out to be 38256 it won’t prove that 35324 is wrong for you.

      Here’s some info you might find interesting:




      November 25, 2009 at 1:56 pm

      • Interesting thread indeed. I’ve double checked after re-flashing my router yesterday with a build compiled from trunk.

        Following code works and diag module returns USR5465 correctly:

        if(!strcmp(boardnum, "35324") && !strcmp(boardtype, "0x048e")) { /* USR5465* */
        return &platforms[USR5465];

        Now that I remember, the USB led lit-up only when I used the gpioctl, but openwrt doesn’t handle that when USB is plugged in.
        Also, I didn’t try compiling the wireless module. Did you say you got that working?

        Vivek Unune

        November 27, 2009 at 3:06 pm

      • Eko initially got the wireless working on a “test build”. As far as I know, he set the detection code module to always return the router type as USR5465, and no modifications to the wireless modules were necessary. The next step is to use the various nvram parameters to reliably distinguish the USR5465 from other models and put that code into a “working build”.

        A perhaps important caveat: the USR5465 uses Broadcom 5354 system-on-chip, and Eko’s firmware build was a modified version of one that works on the Asus WL-520GU/GC, which also uses the BCM5354 chip. So it’s a “new driver” (NEWD) build which is backward compatible with many older chips. The “vintage” (VINT) builds which are compatible with the oldest chips don’t work with the BCM5354.

        I have recently flashed another USR5465 with a test build. Its boardnum is 38038. That means 3 different boardnums on 3 routers so far. Hmmmm.


        November 29, 2009 at 2:03 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: