Random Noise

December 10, 2008

Experiments with OpenWRT and USR5465

Filed under: openwrt — Tags: , — Vivek Unune @ 3:28 am

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:

j301
|o|  --->   GREEN   (TX)
|o|  --->   WHITE   (RX)
|o|
|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.

7 Comments »

  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?

    Comment by Giovanni — April 23, 2009 @ 12:00 pm

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

      Comment by Vivek Unune — April 23, 2009 @ 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?

    Comment by Giovanni — April 23, 2009 @ 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.

      Comment by Vivek Unune — April 23, 2009 @ 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?

    Comment by Giovanni — April 23, 2009 @ 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.

      Comment by Vivek Unune — April 23, 2009 @ 4:28 pm

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

    Comment by Giovanni — April 23, 2009 @ 4:32 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.