Random Noise

cat /dev/random >> /dev/dsp

Archive for December 2008

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 ,